-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java 1.5 issue "undefined symbol: libusb_init" on Linux #31
Comments
This could be due to the You might be able to use the instructions in this Stack Overflow question to work out what you need to do on your system to overcome this situation. One answer suggests using |
But why would 0.3.1 work and 0.4.0 not... When I use official version of 0.3.1 it works, when I use 0.4.0 I rebuilt not... |
I tried using 0.3.1 binaries with 0.4.0 java sources. This one works better, but read command doesn't work. I have seen that there were some changes (HidDeviceInfo file was removed), which might be reason why read command doesnt work (I get -2 returned instead of data)... Did you change how you make binaries from 0.3.1 till next (current) version? |
Hmm, looking over 0.3.1 there's nothing in the If you got the binaries from the Bitcoin Solutions staging repo (as referenced in the README) then it's possible that later ones were compiled under Java 8 targeting a Java 6 language level and byte code format. From the look of the error message it's a problem with the dynamic linking between the signal11/hidapi library and your libusb. I've no idea why earlier binaries were working unless something changed on your system between when you compiled them and now. Perhaps it would be worth re-compiling the old ones and seeing if they still work? |
I didn't compile binaries. I just took them from your jar file. Now I took them from your repository... they are stored under src/main/resources. |
I recompiled with old sources 0.3.1 (and using also old binaries) and it works now (not with new ones, it seems like you might be correct, perhaps new binaries are targeting higher java version)... Since I need this for java 5 I made fork of this project, which is now "locked" at 0.3.1. I will merge changes if you make some, but since you also changed Java implementation from 0.3.1 to 0.4 I will have to be very carefull... If someone needs Java 5 version it has name hid4java-j15 (here on github)... You can close this ticket... Thanks for your help and you did good work with this library... Start of using USB hid in my project was much easier than I expected. |
OK. Thanks for the feedback. Closing. |
Hi !
I used 0.3.1 for testing so far, now my library (classes) is ready for production, so I build 0.4.0 version locally, but now when I try to run it, I get problem with binary file (I use linux-amd64). This is what I get...
symbol lookup error: /home/andy/workspaces/andy-iplayground4/ggc/hid4java/target/classes/linux-amd64/libhidapi.so: undefined symbol: libusb_init
Do I need any special dependencies on system to run with new version?
And before you ask, I build my own version because I need 1.5 compatibility.
Andy
The text was updated successfully, but these errors were encountered: