boostorg / boostorg/boost-ci

CMake install tests failing when using dependend libraries

Open
#155 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
17
Forks
22
PR merge metrics
No merged PRs in 30d

Description

I tried Boost.CI on Boost.Locale where a test binary links against `Boost::locale` which privately links against `Boost::thread`.

This fails on some platforms, e.g. Ubuntu 20.04 as the Boost.Thread library cannot be found. See e.g. https://github.com/Flamefire/locale/runs/6047122561?check_suite_focus=true

> /home/runner/work/locale/boost-root/libs/locale/test/cmake_test/__build_cmake_install_test__/main: error while loading shared libraries: libboost_thread.so.1.80.0: cannot open shared object file: No such file or directory

But the library is installed:
> Installing: /home/runner/.local/lib/libboost_thread.so.1.80.0

Also on Windows the test also fails likely due to the same reason:

> 1/1 Test #1: main .............................Exit code 0xc0000135
> ***Exception: 0.01 sec

It looks like we'd need to add the library install path to `LD_LIBRARY_PATH` on Linux and **something** similar on Windows (`PATH`?) although I feel like this is something which should be handled by CMake but isn't.

Would be good if we could fix that "by default" in the Boost.CI samples.

@pdimov Any ideas?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.