![]() |
Issues with JNI .so for FRC
We are attempting to build a JNI shared library for use in our java code. We are using ant to build the library as follows:
Code:
<target name="CowMXP_JNI-build"> |
Re: Issues with JNI .so for FRC
Quote:
Code:
austin[23463] iron ~/local/robotics/971-Robot-Code/bazel-971-Robot-Code/external/allwpilib_ni_libraries_repo |
Re: Issues with JNI .so for FRC
Note that libRoboRIO_FRC_ChipObject requires other libraries, so you'll probably need to link to nearly every .so in cpp/current/lib. There's two ways to do this: the standard JNI .so (which is built using gradle) explicitly links every .so except libwpi.so and libwpi_2015.so. When building C++ via eclipse, libwpi.so is referenced, which is actually a text file which references libwpi_2015.so, which is also a text file which references a bunch of .so's as well as a couple of .a's.
|
Re: Issues with JNI .so for FRC
Got it - we later found that libHALAthena.so was missing from the roboRIO and copied over all libs to /usr/lib. Finally worked.
|
All of of those libraries (with the exception of libHALAthena.so) were taken directly from the roboRIO to start with. They're in a few ni locations, a find on /usr should show them.
|
Re: Issues with JNI .so for FRC
New issue - when the JNI library is loaded, our Talons refuse to enable in auto / teleop. Any insight into this?
|
Re: Issues with JNI .so for FRC
Quote:
One thing I do wonder about is if you are using the default WPILib in addition to the custom built JNI. The default WPILib has the JNI library built into the JAR, and I wonder if the built in one is conflicting with the custom one you built. Are you modifying WPILib completely, or just trying to add something on top? |
Re: Issues with JNI .so for FRC
Quote:
|
Re: Issues with JNI .so for FRC
Nevermind - found the bug in our JNI code! Had multiple calls to HALInitialize. I'll post notes on the stuff we did when I have some free time.
|
| All times are GMT -5. The time now is 10:58. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi