Skip to content
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

undefined symbol: hid_get_product_string #4

Open
ChristophHaag opened this issue Nov 30, 2017 · 5 comments
Open

undefined symbol: hid_get_product_string #4

ChristophHaag opened this issue Nov 30, 2017 · 5 comments

Comments

@ChristophHaag
Copy link

So when I try to open the demo project I get this error

ERROR: open_dynamic_library: Can't open dynamic library: /home/chris/oldhome/build/godot_openhmd/demo/bin/libgodot_openhmd.so. Error: /home/chris/oldhome/build/godot_openhmd/demo/bin/libgodot_openhmd.so: undefined symbol: hid_get_product_string

I can make that error go away with LD_PRELOAD=/usr/lib/libhidapi-libusb.so bin/godot.x11.tools.64 but then I get

ERROR: open_dynamic_library: Can't open dynamic library: /home/chris/oldhome/build/godot_openhmd/demo/bin/libgodot_openhmd.so. Error: /home/chris/oldhome/build/godot_openhmd/demo/bin/libgodot_openhmd.so: undefined symbol: usbi_backend

and it doesn't look like preloading libusb helps.

Apparently there is something wrong with linking those libraries.

@BastiaanOlij
Copy link
Member

Because this was originally implemented as a module in Godot I had to statically link in those libraries, I'm starting to wonder if I have forgotten to include something, I remember I had to make a few weird changes to make it compile properly as these libraries are supposed to be used as dynamic libraries.

The code really needs to change to use the libraries in their original form which will result in having to run through each libraries normal compilation (which for me is a problem because their windows builds are notoriously bad as its mostly linux developers working on these things).

@alex9099
Copy link

Same

@BastiaanOlij
Copy link
Member

Sorry guys, I still haven't had a lot of luck getting back into this. I spend a few hours last week redoing the build logic on my Mac. Most of that was trying to get homebrew to work (why does Apple always supply such old versions of these tools?!?!) and after I finally got it to work, got autoconf to work, got automake to work, half the 3rd party tools just won't compile on Mac.

I'll retry on my windows machine when I have a bit more time but I remember I had issues with libhid on windows because its using constructs only available on *nix based OS's but I might get lucky that things have been fixed since I last tried.

@ChristophHaag did you ever get anywhere rewriting the scons file to use the compiled libraries instead of trying to recompile all the 3rd party libraries themselves? The writeup hradec did in the readme does cronical how to compile the 3rd party libraries directly but the scons setup doesn't actually use the resulting libraries and recompiles everything with my hacked together approach. The code should be gutted and redone to link the libraries in correctly.

@rmonthil
Copy link

I have the same issue, did someone manage to make it work ?

@rmonthil
Copy link

rmonthil commented Mar 1, 2019

This did work to solve my issue, hopefully it will help someone with the same issue :

I had this issue because I ran :
scons platform=x11
and I should have run :
scons platform=linux
It still didn't work because of an issue with the compilation of libusb.

I just had to compile it manually running the following commands in the libusb folder :
./autogen.sh
./configure
make

Then I ran again :
scons platform=linux
And I launched the demo and it worked well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants