FS#64339 - [Boost] CMake fails to properly configurate Boost include directories

Attached to Project: Arch Linux
Opened by Alexey Morozov (AMorozov) - Thursday, 31 October 2019, 08:48 GMT
Last edited by Antonio Rojas (arojas) - Thursday, 31 October 2019, 08:56 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

CMake fails to configure projects which make use of Boost library.

Boost libraries in the project are configured like this

set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
set(Boost_DEBUG ON)
find_package(Boost 1.62 REQUIRED COMPONENTS system)

...

target_link_libraries(sometarget Boost::system)
...


Additional info:
* cmake 3.15.5-1
* boost 1.71.0-2


Here's the CMake output on configuration step:

...
-- Found Boost 1.71.0 at /lib64/cmake/Boost-1.71.0
-- Requested configuration: QUIET REQUIRED COMPONENTS system
-- BoostConfig: find_package(boost_headers 1.71.0 EXACT CONFIG REQUIRED QUIET HINTS /lib64/cmake)
-- Found boost_headers 1.71.0 at /lib64/cmake/boost_headers-1.71.0
-- BoostConfig: find_package(boost_system 1.71.0 EXACT CONFIG REQUIRED QUIET HINTS /lib64/cmake)
-- Found boost_system 1.71.0 at /lib64/cmake/boost_system-1.71.0
-- Boost toolset is gcc9 (GNU 9.2.0)
-- Scanning /lib64/cmake/boost_system-1.71.0/libboost_system-variant*.cmake
-- Including /lib64/cmake/boost_system-1.71.0/libboost_system-variant-shared.cmake
-- [ ] libboost_system.so.1.71.0
-- Including /lib64/cmake/boost_system-1.71.0/libboost_system-variant-static.cmake
-- [x] libboost_system.a
-- Adding boost_system dependencies: headers
...
-- Configuring done
CMake Error in src/server/coreutils/CMakeLists.txt:
Imported target "Boost::system" includes non-existent path

"/include"

in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

* The path was deleted, renamed, or moved to another location.

* An install or uninstall procedure did not complete successfully.

* The installation package was faulty and references files it does not
provide.



-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.

The bug happens because CMake erroneously sets Boost_DIR to /lib64/cmake/Boost-1.71.0 instead of /usr/lib/cmake/Boost-1.71.0 and then calculates include dirs as non-existent /include/... instead of /usr/include/... A similar bugs exist in number of projects, e.g. https://github.com/opencv/opencv/pull/14328/files/246733382f8558c7ea2eafda82f8bf28380fd455 or https://bugs.archlinux.org/task/63487 and caused by an ArchLinux-specific FS layout.
This task depends upon

Closed by  Antonio Rojas (arojas)
Thursday, 31 October 2019, 08:56 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#64224   FS#64132 

Loading...