Problem with 254's library

So we are looking into using 254’s library, which was released in 2015. This is the code in question: https://github.com/Team254/FRC-2015. However, we are running into issues. Deploying is successful, but there is no robot code. From the Riolog, we get the error below. Any idea what could be causing it and how to fix it? Thanks.

Exception in thread “main” java.lang.UnsatisfiedLinkError: /var/volatile/tmp/libwpilibJavaJNI1540268506574750731.so: libFRC_NetworkCommunication.so.1: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1929)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1814)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1083)
at edu.wpi.first.wpilibj.hal.JNIWrapper.<clinit>(JNIWrapper.java:53)
at edu.wpi.first.wpilibj.RobotBase.initializeHardwareConfiguration(RobotBase.java:167)
at edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:179)

libwpilibJava is depending on libFRC_NetworkCommunication.so.1 and cannot find it.
Perhaps you need to check if the FRC java is installed correctly?
Can you deploy a simple java robot program and have it load correctly?

A potential fix we tried was to switch away from their snapshotted WPI and replace it with the newest version. When we did that, the gyrothread broke, so we commented out the parts of the code that used it to see if it worked. That resulted in a successful deploy.

Any ideas on what could be wrong with the gyrothread? I’ll post the exact error we get without gyrothread commented out once I get to the lab today.

Well, the code was written against the 2015 API, and you probably have the 2016 API loaded. There are compatibility issues when using different versions of the API!

A little googling turned up a copy of the 2015 API Javadoc and the 2016 API Javadoc. Since you mentioned Gyro code, I checked out that area… It seems that 2015 had a Gyro class, while 2016 instead had a Gyro Interface, which lists several known implementations. So, that’s one possible difference in the API that would cause old code to have serious issues with the newer API!

That said, I’m not going to go through and do any code analysis to figure out what the exact problem is and where to fix it… that I leave up to you!

We also tried using their snapshotted version of WPI though, and it gave us a similar(but not identical) error with unsatisfiedlinkerrors as shown in the original question.

The error that we get when switching to the updated library is below:
Any ideas how to fix the notifier or JNI? We will also be looking into these meanwhile.
Error at edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:206): ERROR Unhandled exception instantiating robot com.team254.frc2015.Robot java.lang.UnsatisfiedLinkError: com.team254.lib.util.NotifierJNI.initializeNotifierJVM(Ljava/nio/IntBuffer;)V at [com.team254.lib.util.NotifierJNI.initializeNotifierJVM(Native Method), com.team254.lib.util.Notifier.<clinit>(Notifier.java:27), com.team254.lib.util.gyro.GyroThread.<init>(GyroThread.java:27), com.team254.frc2015.HardwareAdaptor.<clinit>(HardwareAdaptor.java:46), com.team254.frc2015.OperatorInterface.<init>(OperatorInterface.java:12), com.team254.frc2015.Robot.<init>(Robot.java:40), sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method), sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62), sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45), java.lang.reflect.Constructor.newInstance(Constructor.java:408), java.lang.Class.newInstance(Class.java:433), edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:204)]

Our robot code this year was written in Java and ran fine.

Are you also running the 2015 image?

We have v19 on the roborio right now. Do you know which version the 2015 image corresponds to?

We managed to get drivetrain code running using the updated version of wpi. We added try-catch statements inside the Notifier, which allowed us to enable successfully. However, we obtained the Notifier class by decompiling the old wpi version and copy pasting it, so we were wondering if this is acceptable or if there is a better way of doing it? Additionally, we were wondering about the general changes from the 2015 to 2016 libraries, and would we likely have to make further changes to use the 2017 wpi library? Thanks.