WIP: Support for Haiku #30

Closed
z3ntu wants to merge 2 commits from haiku into master
z3ntu commented 2019-06-19 10:17:33 -05:00 (Migrated from github.com)

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)

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 commented 2020-02-03 06:58:43 -06:00 (Migrated from github.com)

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?

> 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 commented 2020-02-03 07:10:15 -06:00 (Migrated from github.com)

@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:
github.com/Begasus/hidapi@74b3719f01
should fix the detection for libiconv (updated link)

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

@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 commented 2020-02-03 16:39:45 -06:00 (Migrated from github.com)

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.

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 commented 2020-02-04 02:44:30 -06:00 (Migrated from github.com)

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.

> > ~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 commented 2020-02-04 05:04:34 -06:00 (Migrated from github.com)

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 👍

> > > ~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 :+1:
Begasus commented 2020-02-04 05:05:54 -06:00 (Migrated from github.com)

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

> 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 commented 2020-02-09 08:41:41 -06:00 (Migrated from github.com)

@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?

> @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 commented 2020-02-09 10:10:52 -06:00 (Migrated from github.com)

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

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

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-libusb/hidapi!30
No description provided.