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

WIP: Support for Haiku #30

Closed
wants to merge 2 commits into from
Closed

WIP: Support for Haiku #30

wants to merge 2 commits into from

Conversation

z3ntu
Copy link
Collaborator

@z3ntu z3ntu commented Jun 19, 2019

From: https://github.com/haikuports/haikuports/blob/master/dev-libs/hidapi/patches/hidapi-20160919.patchset

I haven't tested this yet, just applied the patch. Fails at libusb_get_active_config_descriptor (around line 866 in libusb/hid.c)

@Begasus
Copy link
Contributor

Begasus commented Feb 3, 2020

From: https://github.com/haikuports/haikuports/blob/master/dev-libs/hidapi/patches/hidapi-20160919.patchset

I haven't tested this yet, just applied the patch. Fails at libusb_get_active_config_descriptor (around line 866 in libusb/hid.c)

@z3ntu it builds ok here with the patchset, does it fail for you?

@Begasus
Copy link
Contributor

Begasus commented Feb 3, 2020

@Youw maybe libiconv should be included in the requirements?
Without it we get (on running the test):

Testing ...
make: Nothing to be done for 'hidtest'.
runtime_loader: /sources/hidapi-a6a622ffb680c55da0de787ff93b80280498330f/libusb/.libs/libhidapi.so.0.0.0: Could not resolve symbol 'libiconv_close'
resolve symbol "libiconv_close" returned: -2147478780
runtime_loader: /sources/hidapi-a6a622ffb680c55da0de787ff93b80280498330f/libusb/.libs/libhidapi.so.0.0.0: Troubles relocating: Symbol not found

exporting it to the LDFLAGS before build we get:

unable to open device

Any thoughts on this?

Using:
https://github.com/Begasus/hidapi/commit/74b3719f01e9a8efd0bfdd4a16e405b3c3bd3e2a
should fix the detection for libiconv (updated link)

EDIT this was done in a virtual environment, so the outcome probably is as expected

@Youw
Copy link
Member

Youw commented Feb 3, 2020

I've got your message, but I'll be able to give you a proper answer in a couple of days.
If it is really urgent, let me know, and I'll try to get to it sooner.

@z3ntu
Copy link
Collaborator Author

z3ntu commented Feb 4, 2020

I haven't tested this yet, just applied the patch. Fails at libusb_get_active_config_descriptor (around line 866 in libusb/hid.c)

@z3ntu it builds ok here with the patchset, does it fail for you?

This wasn't a build failure but a runtime failure I saw on Haiku (using whatever Haiku version was latest in June 2019). I am not 100% sure anymore what exactly happened but I guess I ran my software using hidapi and it failed to open the device or similar - and stepping through with a debugger I got to this libusb_get_active_config_descriptor line which failed. I can fire up my VM again in the evening and check what exactly happens there.

@Begasus
Copy link
Contributor

Begasus commented Feb 4, 2020

I haven't tested this yet, just applied the patch. Fails at libusb_get_active_config_descriptor (around line 866 in libusb/hid.c)

@z3ntu it builds ok here with the patchset, does it fail for you?

This wasn't a build failure but a runtime failure I saw on Haiku (using whatever Haiku version was latest in June 2019). I am not 100% sure anymore what exactly happened but I guess I ran my software using hidapi and it failed to open the device or similar - and stepping through with a debugger I got to this libusb_get_active_config_descriptor line which failed. I can fire up my VM again in the evening and check what exactly happens there.

Thanks for looking into this, if you can find the time to launch your VM try to see if you can update your Haiku install to the latest hrev, that way we won't miss anything that maybe has been fixed in the meantime 👍

@Begasus
Copy link
Contributor

Begasus commented Feb 4, 2020

I've got your message, but I'll be able to give you a proper answer in a couple of days.
If it is really urgent, let me know, and I'll try to get to it sooner.

Thanks! It's not that urgent, getting the patch in I linked should take care of the detection for libiconv, so no need to change anything (at least I don't think so) in the main source

@Youw
Copy link
Member

Youw commented Feb 9, 2020

@Youw maybe libiconv should be included in the requirements?

if by requirements you mean:
AC_CHECK_LIB([iconv], [libiconv_open], [LIBS_LIBUSB_PRIVATE="${LIBS_LIBUSB_PRIVATE} -liconv"], [hidapi_lib_error libiconv]), then it is already included (as far as I can tell)

or is it something else?

@z3ntu
Copy link
Collaborator Author

z3ntu commented Feb 9, 2020

Let's close this in favor of #141 to not split the messages in two different PRs.

@z3ntu z3ntu closed this Feb 9, 2020
@mcuee mcuee added libusb Related to libusb backend Haiku Related to Haiku OS (using libusb backend) labels Jul 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Haiku Related to Haiku OS (using libusb backend) libusb Related to libusb backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants