Skip to content

CMake install tests failing when using dependend libraries #155

@Flamefire

Description

@Flamefire

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions