[CMake] CMake Can't Find Boost.Filesystem in Docker Container

Mateusz Loskot mateusz at loskot.net
Sun Oct 28 06:38:38 EDT 2018


On Sun, 28 Oct 2018 at 11:26, Osman Zakir <osmanzakir90 at hotmail.com> wrote:
> In the Dockerfile for my project, the build process can't go any farther from the point where I'm trying to build the Jinja2Cpp library.  CMake isn't able to find Boost.Filesystem, but it's still able to build the library and write the files to "/usr/local/Jinja2Cpp/build" just fine.

TL;TR: That sounds like Boost.Filesystem is not required, just remove
from `find_package` COMPONENTS list.

First, I'd ensure the build works locally, not in any docker image.
If it does not work, request verbose output from `FindBoost.cmake` output b

set(Boost_DEBUG ON)
find_package(Boost ...)

Read it carefully and compare what details the module determines, if
they are correct.
For example, it may detect -gcc55- tag while your environment has
libboost_filesystem...-gcc5-...lib, etc.
There are many details involved and many places where it can get wrong.
For instance, see some listed here
https://github.com/boostorg/gil/blob/develop/CONTRIBUTING.md
search for section
"TIP: If CMake is failing to find Boost libraries, you can try a few hacks:"


Your report above is very general, not sufficient at all to pin point
where may possible problem be.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net


More information about the CMake mailing list