FS#34785 - CMake fails to find boost after upgrade boost-1.52 => boost 1.53

Attached to Project: Arch Linux
Opened by Piotr Dziwinski (piotrdz) - Sunday, 14 April 2013, 20:27 GMT
Last edited by Andrea Scarpino (BaSh) - Monday, 15 April 2013, 12:39 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:
After recent system upgrade (boost 1.52.0-1 => 1.53.0-2 and boost-libs 1.52.0-1 => 1.53.0-2), in a project I develop, CMake no longer seems to find the libraries. I use the following CMake code:

set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)

set(Boost_ADDITIONALVERSION "1.51" "1.51.0")
find_package(Boost COMPONENTS system filesystem regex REQUIRED)

When run with Boost 1.52, it finds the libraries successfully. In case of Boost 1.53, it fails with messages:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
Boost_FILESYSTEM_LIBRARY (ADVANCED)
linked by target "xxx" in directory yyy
Boost_REGEX_LIBRARY (ADVANCED)
linked by target "xxx" in directory yyy
Boost_SYSTEM_LIBRARY (ADVANCED)
linked by target "xxx" in directory yyy

I also ran cmake with Boost_DEBUG set to 1 - see the attached file.

I'm not sure if that is the fault of boost or FindBoost.cmake, but it seems FindBoost.cmake should still work since there were no big changes in boost between 1.52 and 1.53. I suspect the fault lies with the way boost libraries are built.

Additional info:
* system upgraded to latest packages
* cmake is version 2.8.10.2-5
* tested on x86-64 and i686
* tested with both gcc-4.8 and clang-3.2-5 compilers

Steps to reproduce:
Install latest boost and boost-libs and try to run cmake with example code I gave.

Workaround:
Downgrade boost and boost-libs back to 1.52.
This task depends upon

Closed by  Andrea Scarpino (BaSh)
Monday, 15 April 2013, 12:39 GMT
Reason for closing:  Not a bug
Additional comments about closing:  boost 1.53 provides no static libs
Comment by Jan de Groot (JGC) - Monday, 15 April 2013, 11:33 GMT
My guess is that this is a duplicate of  FS#34491 

Can you try set(Boost_USE_STATIC_LIBS OFF) instead of ON?
Comment by Andrea Scarpino (BaSh) - Monday, 15 April 2013, 12:38 GMT
That's because you want to use the static libs and boost 1.53 provide none.

remove the set(Boost_USE_STATIC_LIBS ON) line.

EDIT: JGC beat me (I didn't refresh the page :)

Loading...