3 May 2012 01:58
Re: HIDAPI FreeBSD Patch Version 2
Xiaofan Chen <xiaofanc <at> gmail.com>
2012-05-02 23:58:54 GMT
2012-05-02 23:58:54 GMT
On Thu, May 3, 2012 at 6:26 AM, Alan Ott <alan <at> signal11.us> wrote: > On 05/02/2012 11:02 AM, Xiaofan Chen wrote: >> On Wed, May 2, 2012 at 10:52 PM, Xiaofan Chen <xiaofanc <at> gmail.com> wrote: >>>>> Try using git-am instead of patch. >>>>> git am 0001-FreeBSD-Add-FreeBSD-implementation.patch >> So I think the patch is good. The issues with the hidtest >> Makefile for Linux still needs to be fixed (works under >> Ubuntu but failed under Fedora, OpenSuse and Arch). > > I have attached the latest rev of the HIDAPI FreeBSD patches. Patches 2 > and 3 are just cleanup, but may as well get tested too. These work on > Linux (Ubuntu 10.04) and FreeBSD 9 for me and build in linux/ libusb/ > and testgui/ . > > Xiaofan, some of the problems you listed before are really strange, and > seem to me to indicate that your working directory is maybe hosed. > > Make sure that your working directory is clean (using git status and > possibly git-reset --hard [REVISION] (be careful with that one) ) and > that you have reverted Alex's original patch and my other patches, then > check to make sure that your git log matches what's on github (at least > the first handful of entries): > https://github.com/signal11/hidapi/commits/master I do not think my git tree was bad since they are fresh git checkout. > Once you've done that, apply these 3 patches with git-am: > git am [patch files in order] > > Or, you could just blow away your repo and re-clone. Yes that is what I did. But the new set of patch applies cleanly under Fedora 16. I still need to add -lpthread to the Linux Makefile. If not I will have the same problem. Other than that, things work fine under Fedora 16. [mcuee <at> localhost libusb]$ make -f Makefile.linux cc -Wall -g -fpic -c -I../hidapi `pkg-config libusb-1.0 --cflags` hid.c -o hid.o hid.c: In function ‘hid_open_path’: hid.c:774:10: warning: variable ‘num_devs’ set but not used [-Wunused-but-set-variable] g++ -Wall -g -fpic -c -I../hidapi `pkg-config libusb-1.0 --cflags` ../hidtest/hidtest.cpp -o ../hidtest/hidtest.o g++ -Wall -g hid.o ../hidtest/hidtest.o `pkg-config libusb-1.0 --libs` -lrt -o hidtest-libusb /usr/bin/ld: hid.o: undefined reference to symbol 'pthread_create <at> <at> GLIBC_2.1' /usr/bin/ld: note: 'pthread_create <at> <at> GLIBC_2.1' is defined in DSO /lib/libpthread.so.0 so try adding it to the linker command line /lib/libpthread.so.0: could not read symbols: Invalid operation collect2: ld returned 1 exit status make: *** [hidtest-libusb] Error 1 -- -- Xiaofan ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
RSS Feed