[Solved] Issues compiling hidapi

This forum is for discussion about general software issues.

[Solved] Issues compiling hidapi

Postby technosf » Tue Jan 20, 2015 6:22 am

Hiya all,

I have a USB Relay 2 that I'm planning on using Darryls code (https://github.com/darrylb123/usbrelay) to use to switch on and off the power to a usb 3 hub and and hard drive from my plug.

On the way to compiling usbrelay, I need hidapi (http://www.signal11.us/oss/hidapi), and here I have met with a problem. Although I I have everything working on Suse (it has hidapi as a package), there are issues on Arch (where I need to compile hidapi from source): During linking, I'm getting this error - and being relatively new to Linux linking, would like help to address:

$this->bbcode_second_pass_code('', 'g++ -Wall -g hid-libusb.o ../hidtest/hidtest.o `pkg-config libusb-1.0 libudev --libs` -o hidtest
/usr/bin/ld: hid-libusb.o: undefined reference to symbol 'pthread_join@@GLIBC_2.4'
/usr/lib/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:25: recipe for target 'hidtest' failed
make: *** [hidtest] Error 1')

Hints/help would be greatly appreciated!
Last edited by technosf on Sun Feb 01, 2015 10:05 pm, edited 1 time in total.
[size=85] MochaBin 5G || NSA325 [/size]
technosf
 
Posts: 147
Joined: Sat Jan 08, 2011 10:54 pm

Re: Issues compiling hidapi

Postby pepedog » Tue Jan 20, 2015 8:47 am

You could make you own package, a hint here
https://aur.archlinux.org/packages/hi/hidapi/PKGBUILD
Think it is essential you use the wiki to look up abs, aur, makepkg, swapfile, and pacman of course
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Issues compiling hidapi

Postby technosf » Sun Feb 01, 2015 8:38 pm

Thanks Pepedog, that PKGBUILD worked great: I added "arm" to the architecture and it compiled up fine. The libraries got installed to /usr/local/lib, and I had to copy them to /usr/lib before I could compile the relay control software I got from github:

https://github.com/darrylb123/usbrelay


If you think this would be helpful to put in the ArchLinuxArm repetoire, please let me know what I can do to help make that happen.


Cheers,

T
[size=85] MochaBin 5G || NSA325 [/size]
technosf
 
Posts: 147
Joined: Sat Jan 08, 2011 10:54 pm


Return to General

Who is online

Users browsing this forum: No registered users and 25 guests