Comments (15)
Note Java will have this issue as well, since it no longer includes ntcore, cscore or jni in the jar itself. I would much rather prefer figuring out how to put the dependency version in the pom. I'm hoping we can do that fairly easily using things built into gradle, as I think it's too late before the season to add another package structure to our maven repo.
from allwpilib.
I believe this can be done in Gradle. I'm not sure if it's the same with the version of the Maven Plugin that is used in this repo, but you can modify the Pom directly from the DSL https://github.com/Open-RIO/ToastAPI/blob/development/build.gradle#L228-L240
from allwpilib.
@ThadHouse Hey having an issue with the code running on the RIO where I think your comment comes into play. I am using gradle to grab dependencies from the maven repository. I have opencv, cscore, athena, athena-jni, NetworkTables all being included in the jar. Yet when going into the rio an try and run robotCommand, Java complains it cannot find JNI. Not sure what is missing...
Exception in thread "main" java.lang.UnsatisfiedLinkError: no wpilibJavaJNI in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1119)
at edu.wpi.first.wpilibj.hal.JNIWrapper.<clinit>(JNIWrapper.java:22)
at edu.wpi.first.wpilibj.RobotBase.initializeHardwareConfiguration(RobotBase.java:171)
at edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:194)
from allwpilib.
No native libraries are included anymore in any of the WPILib Java Jars. In order to run them, you will need to deploy all the files inside the following following dependencies
- athena-jni
- athena-runtime
- opencv-jni
In addition, you will need to get the athena-uberzip artifact from the cscore repo, and deploy the libcscore.so file, and all the files ending in .3.1. You do not need to extract the rest of the files from that archive.
from allwpilib.
Oh and they all need to be deployed to /usr/local/frc/lib
. Along with running ldconfig
after deploying the libraries.
from allwpilib.
from allwpilib.
I believe the cause of the issue here (for Java) is that since we're publishing zip files and not the actual compilation output, Maven doesn't have the correct dependencies. The C++ root cause is that Maven was in no way designed to do what we're doing with it. 😄 @ThadHouse, we'll want to fix this as part of our artifact cleanup.
from allwpilib.
@ThadHouse After updating the firmware on our RoboRIO from the 2017 firmware to the 2018 firmware, we are getting the same error that @dixonwille mentioned on Jan 8, 2017. That is, we are getting this error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no wpilibJavaJNI in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867) at java.lang.Runtime.loadLibrary0(Runtime.java:870) at java.lang.System.loadLibrary(System.java:1122) at edu.wpi.first.wpilibj.hal.JNIWrapper.<clinit>(JNIWrapper.java:22) at edu.wpi.first.wpilibj.RobotBase.initializeHardwareConfiguration(RobotBase.java:171) at edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:194)
Sure enough, when we check the /usr/local/frc/lib directory on the RIO, there is no wpilibJavaJNI.so file there (or anything similarly named). Can anyone suggest why this file might now be missing OR where we can get the file? I have looked in MANY of the artifacts on the maven repository at http://first.wpi.edu/FRC/roborio/maven/release
and I am not finding the file in any of those artifacts. Your help would be greatly appreciated.
from allwpilib.
Are you guys using the 2018 eclipse or gradlerio release? The name of that library changed for 2018, and so did more of the maven locations.
from allwpilib.
We are deploying with 2018 eclipse and just started to learn about gradlerio, but haven't gotten very far with Gradlerio. We'd be happy to start using gradlerio if that will fix this problem.
from allwpilib.
Hmm. 2018 eclipse should work just fine. You definitely upgraded the plugins to 2018, right? And did an Rio reimage?
from allwpilib.
@ThadHouse Thanks, your questions helped us figure out what the issue was. As I mentioned, we had new firmware deployed to the robot, but we had the remnants of a working gradle build that was working for 2017, but we didn't have fully updated to work with 2018 and GradleRIO. We got the project updated to use GradleRIO and we now at least have a different error that we can work on tomorrow. We no longer are getting the error I mentioned above. Thanks again!
from allwpilib.
Bottom line is that we were running code with 2017 WPI lib dependencies included, but deploying to a RIO with 2018 firmware/libraries installed on it. Thus the reason our robot code was trying to load a library which no longer exists.
from allwpilib.
This hasn't been 100% fixed, but with the merge to the uber repo, all utilities now have the same version. So for users, this should be much easier. I'm going to leave the issue open though.
from allwpilib.
This should no longer be an issue with the move to GradleRIO.
from allwpilib.
Related Issues (20)
- Add 2D addressable LED display class
- Rotation2d(0,0) should be some sort of NaN HOT 19
- Synchronize C++ and Java versions of BooleanEvent HOT 1
- Trigger.onChange has no test HOT 3
- cmake build broken as of 2024.1.1 HOT 11
- WPIMath JNI classes should use single runtime loader
- .type NT topics do not always set the SmartDashboard property
- Move apriltag into the monorepo via upstream_utils HOT 2
- Move imgui into the monorepo via upstream_utils HOT 1
- Move libssh into the monorepo via upstream_utils HOT 1
- Move GoogleTest into the monorepo via upstream_utils HOT 2
- Move libssh into the monorepo via upstream_utils HOT 1
- Add upstream_utils commands for bumping a tag and exporting patches HOT 1
- AHRS crashes on startup due to RuntimeDetector removal HOT 11
- Offset LED patterns only offset writes, not reads
- #6767 drastically increases test times HOT 2
- Add compression option for WPILOGs HOT 2
- HALSimWS sends 1 and 0 instead of true and false for `SimBoolean`s
- "Can't load AMD 64-bit .dll on a IA 32-bit platform" HOT 4
- `SimDeviceSim.resetData()` Disables `SimDevice` Messages on Open WebSockets Connections
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from allwpilib.