opSimulation Linux build not runnable on non-build system
When trying to run the downloaded release 1.1.0 (extracted to ~/work/opSimulation
) in a Docker container I get:
✔ developer ~/work
$ docker run -it --rm --volume $PWD/opSimulation:/opSim ubuntu:22.04 sh -c 'cd /opSim && ./opSimulation --version'
./opSimulation: error while loading shared libraries: libExpressionsLib.so.1: cannot open shared object file: No such file or directory
setting LD_LIBRARY_PATH=lib
results in binary being runnable:
✔ developer ~/work
$ docker run -it --rm --volume $PWD/opSimulation:/opSim ubuntu:22.04 sh -c 'cd /opSim && LD_LIBRARY_PATH=lib ./opSimulation --version'
./opSimulation 9999.9999.9999
- There seems to be an issue with
RPATH
of the binary. - I assume running the binary directly on the build system (like on the CI) will work due to libs being found in or via the build paths. To avoid this embarrassing situation in the future, CI (E2E) tests should either wipe the build path before running tests or the tests should maybe be executed on a different agent or inside a container.
- For the wrong version being shown see #264 (closed)