Closed brainstorm closed 4 years ago
Fixes https://github.com/openpnp/openpnp-capture/issues/27, btw :)
Thanks @brainstorm. If you have a moment, can you verify that the resulting binary does not have any external dependencies? It looks to me like it might end up requiring libjpeg installed by the user, which makes the binary likely to fail in confusing ways for users. You can check the external dependencies with ldd library.so
. If it is using libjpeg (or anything else) as a shared dependency, check out the CMakeLists.txt to see how we fix this issue using turbojpeg.
There does seem to be some libjpeg issues here: https://travis-ci.org/github/openpnp/openpnp-capture/jobs/676039253
I'm suspicious about all three added dependencies:
- build-essential
- cmake
- libjpeg-dev
Why were these needed?
TL;DR: Sorry, yes, please, kill those 3 dependencies from .travisci.yml
;)
Sure (OSX does not have ldd
, so resorting to the docker container itself). There doesn't seem to be such an external dep:
$ docker run -it -v $PWD:/openpnp-capture openpnp-capture-rpi3-arm64 bash
root@b7d320bc76de:/openpnp-capture# ldd build/libopenpnp-capture.so
libstdc++.so.6 => /usr/lib/aarch64-linux-gnu/libstdc++.so.6 (0x00000040008d8000)
libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000004000a65000)
libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000004000b22000)
libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000004000b46000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000004000b75000)
/lib/ld-linux-aarch64.so.1 (0x0000004000000000)
Plus they are explicitly disabled on CMakeLists, right?:
https://github.com/openpnp/openpnp-capture/blob/master/CMakeLists.txt#L121
You are totally right on the three deps. Those dependencies are not needed on .travisci.yml
because the TravisCI VMs already ships with them. Otherwise you find things like this on bare docker containers or VMs (what the users will find):
$ docker run -it -v $PWD:/openpnp-capture openpnp-capture-rpi3-arm64 ./bootstrap_linux.sh
/bin/mkdir: cannot create directory ‘build’: File exists
/openpnp-capture/bootstrap_linux.sh: 4: /openpnp-capture/bootstrap_linux.sh: cmake: not found
$ docker run -it -v $PWD:/openpnp-capture openpnp-capture-rpi3-arm64 ./bootstrap_linux.sh
/bin/mkdir: cannot create directory ‘build’: File exists
CMake Error at CMakeLists.txt:14 (project):
The CMAKE_C_COMPILER:
/usr/bin/cc
is not a full path to an existing compiler tool.
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
CMake Error at CMakeLists.txt:14 (project):
The CMAKE_CXX_COMPILER:
/usr/bin/c++
is not a full path to an existing compiler tool.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "/openpnp-capture/build/CMakeFiles/CMakeOutput.log".
See also "/openpnp-capture/build/CMakeFiles/CMakeError.log".
But you are spot on, they are not needed on this particular CI context and the error messages from TravisCI suggest that libjpeg-dev
is interfering with newer libjpeg-dev
headers and CMake/gcc.
This is a bit weird since my builds were pristine pre-merging:
https://travis-ci.org/github/openpnp/openpnp-capture/jobs/676036339 https://travis-ci.org/github/openpnp/openpnp-capture/builds/676036337
As discussed on the Discord server, here you have some ARM64 action without docker nor github actions (reusing the existing TravisCI recipe and deploy keys), hope the build doesn't fail too much ;)
It works fine locally using docker on OSX: