-
Notifications
You must be signed in to change notification settings - Fork 106
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
run make_release_linux.sh #14
Comments
Run make_release_linux.sh after successful build. This script does not build, it only copies build products. |
the file name is therefore a 'lie' or at least 'misleading', i would at least expect it to MAKE (what?) a RELEASE (for what?) LINUX. |
Hello rochajoel,
You are welcome to fork and contribute.
Thanks!
P.
|
I already did, i'm not an expert on using git, but i tried to make a linux folder on my fork, and added a Makefile on that root folder, have a look at it if you'd like. Given what i have on my fork, all we need is to deploy libusb artifacts to include/usb and to lib/usb/x86 to be able to build the relay cmd utility. |
Any decent Linux dusribution should include libusb. All you need is to install it using apt-get or whatever, then it's .h file will be found automatically.
Regards,
P.
---
Sent from Outlook<https://aka.ms/sdimjr> for iPad
…________________________________
From: rochajoel <[email protected]>
Sent: Friday, March 17, 2017 4:12:56 PM
To: pavel-a/usb-relay-hid
Cc: Pavel A.; Comment
Subject: Re: [pavel-a/usb-relay-hid] run make_release_linux.sh (#14)
I already did, i'm not an expert on using git, but i tried to make a linux folder on my fork, and added a Makefile on that root folder, have a look at it if you'd like. Given what i have on my fork, all we need is to deploy libusb artifacts to include/usb and to lib/usb/x86 to be able to build the relay cmd utility.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#14 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AHaeSbB-rovnipd39183qI8y1BklF2c3ks5rmpTogaJpZM4LBFMA>.
|
Great! If you like my changes be my guest to push them to your repository! Cheers, Joel. |
How to build command line version on linux? I tried make: libusb-config: Command not found |
Please have a look at my repository https://github.com/rochajoel/usb-relay-hid As i have run into the same issue, i contributed with a makefile capable of building the cmd line utility. You are still required to build libusb on your own and to put it on the correct paths, see my repository for more details. |
Probably you don’t have libusb-dev installed. This stuff comes with libusb-dev.
From: Sergey<mailto:[email protected]>
Sent: Sat, April 8, 2017 17:25
To: pavel-a/usb-relay-hid<mailto:[email protected]>
Cc: pavel a<mailto:[email protected]>, Comment<mailto:[email protected]>
How to build command line version on linux? I tried cd commandline/makemake && make as given in the wiki but encountered following error:
make: libusb-config: Command not found
make: libusb-config: Command not found
gcc -O -Wall -I.. -I../../lib -fPIC -c -o usbrelay-cmd.o ../usbrelay-cmd.c
../usbrelay-cmd.c: In function ‘enumFunc’:
../usbrelay-cmd.c:84:2: warning: statement with no effect [-Wunused-value]
(context); // ~ unreferenced warning
^
gcc -O -Wall -I.. -I../../lib -fPIC -c -o hiddata_libusb01.o ../hiddata_libusb01.c
../hiddata_libusb01.c:14:17: fatal error: usb.h: No such file or directory
compilation terminated.
: recipe for target 'hiddata_libusb01.o' failed
make: *** [hiddata_libusb01.o] Error 1
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#14 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AHaeSRfG9pFCvwjn7Sb1hR8LP9GS5gLhks5rt5jNgaJpZM4LBFMA>.
|
You DON'T NEED libusb installed on your system, AS LONG AS you have the libraries. See this: If i wanted to have support for ARM, i would have to cross-compile libusb for ARM and include it in (...)linux/lib/usb/arm to be able to compile this utility If you want to cross-compile run: ARCH=arm make clean all I never tested it, but any feedback is welcome! :) |
Thanks @pavel-a I installed libusb-dev and the build succeeded. |
@rochajoel I will try your method on another linux machine and update soon. |
@rochajoel cross compile won't work ARCH=arm make clean all host
target |
Thank you for the negative feedback. However, the reason why the build fails is unclear to me. Can you be more specific? |
and I copy hidusb-relay-cmd to my router
|
Your build is probably not using any cross compiler such as arm-linux-gnueabi-gcc (or something of the like). It uses plain gcc. Are you using the sources from my fork of this repository? It's been a long time since i've looked into this. Please inspect my makefile and make sure it contains instructions to use a cross-compiler. (Maybe you have to define it?) Any way. The problem is that you are not cross compiling. Use readelf or ldd to inspect the output binary so that you know it is in the proper ARM format. |
If you look closely into my Makefile, it does not declare the ARM GCC compiler, it just has some statements that help you organize the libs in folders preceeded by the name of the arch you are targeting. It is hard coded to work with GCC so, either you create a sym link of GCC to your cross compiler, or you change the CC definition to your cross compiler name. You can even change it so that if ARCH == x86 it uses gcc, otherwise it will use arm-linux-****-gcc. Also: from your log i can see you are probably forgetting to cross compile libusb! |
Is there ARM binary available or any instructions how to compile this on Raspberry Pi? |
@ekakela if you like Golang , you can try my lib |
https://github.com/ekakela : I think one can manage to build this for ARM, at least i think i did (it's been a while and i did not save the bin) however, you have to change some stuff as i say in the previous comments above. |
Managed to get it working with your branch. |
Can someone help me with more instructions to run this on a respberrypi? I copied rochajoel git to /domoticz/scripts/ but it's unable to run... I also used input from this git: https://github.com/bbqkees/Domoticz-Pi-USB8-relay-board-SOS-solutions. I have that board I want to run on the pi. But it's always giving this error: |
Have you built the executable? Please make sure to build it before you try to run it. And if you run into some issue, please post the build log so that we can help. Thanks! |
Of course. There is no such file usbrelay-cmd. The correct name is hidusb-relay.cmd. Regards, |
Ik was following BBQkees instructions to get this to run. Where can I find more instructions on how you build this on the pi? Or does someone know where i can find more on how they build/compile. I now some Linux commands but nothing from programming. Sorry |
Dear Team,
I run make_release_linux.sh to build on Linux, but it's failed
I think there are some missing files, could you please help me solve it?
Best regards.
The text was updated successfully, but these errors were encountered: