Java UnsatistfiedLinkError with CTRE_PhoenixCCI library

We have written some very simple code that just runs two VictorSPXs for testing. On one of our robots it works successfully. On the other robot it throws the following UnsatisfiedLinkError:

 ********** Robot program starting ********** 
 java.lang.UnsatisfiedLinkError: no CTRE_PhoenixCCI in java.library.path: [/usr/local/frc/third-party/lib] 
 	at java.base/java.lang.ClassLoader.loadLibrary(Unknown Source) 
 	at java.base/java.lang.Runtime.loadLibrary0(Unknown Source) 
 	at java.base/java.lang.System.loadLibrary(Unknown Source) 
 	at com.ctre.phoenix.CTREJNIWrapper.<clinit>( 
 	at com.ctre.phoenix.motorcontrol.can.BaseMotorController.<init>( 
 	at com.ctre.phoenix.motorcontrol.can.VictorSPX.<init>( 
 	...code that creates the VictorSPX

We did the following on both bots:

  • Reimaging and updating the RoboRIO to 2019_v13, multiple times
  • Updating all ids and firmware of Victors to 4.15, and ensuring that they are connected
  • Installed the Phoenix libraries version 5.13.0
  • Update the version of the file in vendordeps to 5.13.0

But they still exhibit different behaviour. Any ideas?

Did you install the Phoenix Tuner server on the roboRIO? That might help…

Yes I used it to configure all the motor controllers on the robots, and I have tried running code both with the server installed and uninstalled and got the same error

I found a file at C:\Users\Public\frc2019\maven\com\ctre\phoenix\cci\5.13.0\\linux\athena\shared\ , which I believe is the file missing at /usr/local/frc/third-party/lib on the RoboRIO. Maybe I could try manually copy the file there?

That’s worth a try, but what is supposed to happen is the WPI VSCode extension is supposed to install that for you. It’s the deployFrcCppLibrariesRoborio task in the gradle deploy.

Additionally, if you are using latest Tuner, then it almost certainly got placed already when you installed Diag Server.

If you are using Kickoff Tuner, then this may be the root-cause but only if you incorrectly used LifeBoat (instead of Tuner) to install libraries.

I was using Phoenix Tuner 1.2 to install the server, which I believe to be the latest version. I never used LifeBoat. I’ll check for the deployFrcCppLibrariesRoborio task when I get to the robot

I copied the file manually and it ended up working, but I wasn’t able to get it to work automatically

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.