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
Cannot build BaseExample #74
Comments
Nervermind. I had an issue with my go-path. I am sorry! Everything works like it should. |
Me again. The issue still is there when trying to cross compile for arm. It does happen for all version (5,6,7). |
Hi @masseelch. I haven't tried cross-compiling for ARM. However, you will probably have to cross compile As for cross-compiling a Go application using CC=arm-linux-gnueabi-gcc CGO_ENABLED=1 GOOS=linux GOARCH=arm GOARM=7 go build |
In my case I want to build for raspberry pi and there is a precombiled version of I however did just now learn about |
No problem. Let me know how it goes. |
Progress so far: I downloaded the official crosscompiling tools and linked the header files and library already present on the latest raspberrypios buster. The build itself is succeeding i think, but there are linker errors i have to resolve yet. » CPATH=/workspace/libvlc-go/include LD_LIBRARY_PATH=/workspace/libvlc-go/lib CC=/workspace/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc CGO_ENABLED=1 GOOS=linux GOARCH=arm GOARM=7 go build main.go
# github.com/adrg/libvlc-go/v3
/home/jcl/Code/display/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lvlc
/home/jcl/Code/display/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lvlc
/home/jcl/Code/display/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lvlc
/home/jcl/Code/display/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lvlc
/home/jcl/Code/display/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lvlc
/home/jcl/Code/display/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lvlc
/home/jcl/Code/display/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lvlc
/home/jcl/Code/display/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lvlc
/home/jcl/Code/display/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lvlc
/home/jcl/Code/display/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lvlc
/home/jcl/Code/display/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lvlc
/home/jcl/Code/display/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lvlc
/home/jcl/Code/display/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lvlc
/home/jcl/Code/display/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lvlc
/home/jcl/Code/display/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lvlc
collect2: error: ld returned 1 exit status If you have any ideas I'd appreciate. |
Is CPATH=/workspace/libvlc-go/include CGO_LDFLAGS="-L/workspace/libvlc-go/lib" LD_LIBRARY_PATH=/workspace/libvlc-go/lib CC=/workspace/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc CGO_ENABLED=1 GOOS=linux GOARCH=arm GOARM=7 go build main.go |
Yes, this resolved the linker issue but got me a new one.
The same happens when i tried building with dockercross. |
|
After adding in all required libraries I detected, that the tools i mentioned above had been compiled with Thank you for your help. For anyone landing here:
|
I tried to run this but the build fails with
» ls /usr/lib | grep libvlc libvlccore.so libvlccore.so.9 libvlccore.so.9.0.0 libvlc.so libvlc.so.5 libvlc.so.5.6.0
I use Kernel 5.4.116-1-MANJARO.
The text was updated successfully, but these errors were encountered: