Open rolandjitsu opened 4 years ago
For anyone stumbling upon this ticket:
I was facing this exact issue trying to cross-compile an application that uses go-mmal for the Raspberry Pi 3 inside a Docker. For me the fix was to add -lvchiq_arm -lmmal_components -lcontainers
to the pkg-config file (mmal.pc) inside /opt/vc/lib/pkgconfig/mmal.pc, which now looks like:
$ cat /opt/vc/lib/pkgconfig/mmal.pc
prefix=/opt/vc
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: MMAL
Description: Multi-Media Abstraction Layer library for RPi
Version: 1
Requires: vcsm
Libs: -L${libdir} -lmmal -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host -lvchiq_arm -lmmal_components -lcontainers
Cflags: -I${includedir}
Describe the bug I'm trying to build a binary that uses the go-mmal package (mmal bindings for Go) using a Docker image:
But while building the Go binary, I get the following error:
To reproduce Try to build a simple Go bin that uses the package I linked above with the Docker image and cmd I've added above.
Expected behaviour I should be able to cross compile the Go binary without issues.
Actual behaviour It fails with the error described above.
System I'm building this on a macOS using Docker.
Docker image
uname -a
:Distro
cat /etc/os-release
:Logs If applicable, add the relevant output from
dmesg
or similar.Additional context Add any other relevant context for the problem.