Bug 1257899

Summary: cmake 3.3.1 doesn't find boost
Product: [Fedora] Fedora Reporter: Ankur Sinha (FranciscoD) <sanjay.ankur>
Component: cmakeAssignee: Orion Poplawski <orion>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 22CC: fedora, helio, jreznik, ltinkl, orion, rdieter
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
URL: http://www.cmake.org/Bug/view.php?id=15717
Whiteboard:
Fixed In Version: 3.3.1-3.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-19 21:51:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ankur Sinha (FranciscoD) 2015-08-28 11:08:10 UTC
Description of problem:
The new 3.3.1 version seems to not find boost correctly. I've tested this on two systems.

Version-Release number of selected component (if applicable):
3.3.1

How reproducible:
Always

Steps to Reproduce:
1. Upgrade to 3.3.1 from updates-testing
2. Try to compile a program that uses boost
3.

Actual results:
Wont find boost

Expected results:
Should find boost

Additional info:

This is the directive in use:
> FIND_PACKAGE(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS mpi
> serialization program_options date_time)

Here are the boost packages I have installed (all of them!):

> [asinha@cs-1e114-2  build(develop %=)]$ rpm -qa \*boost\*
> boost-1.57.0-6.fc22.x86_64
> boost-python3-1.57.0-6.fc22.x86_64
> boost-test-1.57.0-6.fc22.x86_64
> boost-math-1.57.0-6.fc22.x86_64
> boost-regex-1.57.0-6.fc22.x86_64
> boost-build-1.57.0-6.fc22.noarch
> boost-openmpi-1.57.0-6.fc22.x86_64
> boost-system-1.57.0-6.fc22.x86_64
> boost-devel-1.57.0-6.fc22.x86_64
> boost-mpich-1.57.0-6.fc22.x86_64
> boost-openmpi-devel-1.57.0-6.fc22.x86_64
> boost-timer-1.57.0-6.fc22.x86_64
> boost-signals-1.57.0-6.fc22.x86_64
> boost-log-1.57.0-6.fc22.x86_64
> boost-openmpi-python-1.57.0-6.fc22.x86_64
> boost-graph-1.57.0-6.fc22.x86_64
> boost-container-1.57.0-6.fc22.x86_64
> boost-mpich-python-1.57.0-6.fc22.x86_64
> boost-jam-1.57.0-6.fc22.x86_64
> boost-serialization-1.57.0-6.fc22.x86_64
> boost-graph-mpich-1.57.0-6.fc22.x86_64
> boost-examples-1.57.0-6.fc22.x86_64
> boost-date-time-1.57.0-6.fc22.x86_64
> boost-iostreams-1.57.0-6.fc22.x86_64
> boost-doc-1.57.0-6.fc22.x86_64
> boost-coroutine-1.57.0-6.fc22.x86_64
> boost-graph-openmpi-1.57.0-6.fc22.x86_64
> boost-context-1.57.0-6.fc22.x86_64
> boost-wave-1.57.0-6.fc22.x86_64
> ibus-typing-booster-1.2.11-1.fc22.noarch
> boost-thread-1.57.0-6.fc22.x86_64
> boost-python3-devel-1.57.0-6.fc22.x86_64
> boost-python-1.57.0-6.fc22.x86_64
> boost-gdb-printers-5-1.fc22.noarch
> boost-program-options-1.57.0-6.fc22.x86_64
> boost-atomic-1.57.0-6.fc22.x86_64
> boost-locale-1.57.0-6.fc22.x86_64
> boost-random-1.57.0-6.fc22.x86_64
> boost-chrono-1.57.0-6.fc22.x86_64
> boost-mpich-devel-1.57.0-6.fc22.x86_64
> boost-filesystem-1.57.0-6.fc22.x86_64
> boost-static-1.57.0-6.fc22.x86_64

Sure enough, the required boost libraries are present:

> [asinha@cs-1e114-2  build(develop %=)]$ ls /usr/lib64/libboost_*
> /usr/lib64/libboost_atomic.a            
>  /usr/lib64/libboost_filesystem.so        
>  /usr/lib64/libboost_math_c99f.so.1.57.0        
>  /usr/lib64/libboost_program_options.so.1.57.0 
>  /usr/lib64/libboost_system.so
> /usr/lib64/libboost_atomic.so           
>  /usr/lib64/libboost_filesystem.so.1.57.0 
>  /usr/lib64/libboost_math_c99l.a                
>  /usr/lib64/libboost_python3.a                 
>  /usr/lib64/libboost_system.so.1.57.0
> /usr/lib64/libboost_atomic.so.1.57.0     /usr/lib64/libboost_graph.a 
>               /usr/lib64/libboost_math_c99l.so               
>  /usr/lib64/libboost_python3.so                
>  /usr/lib64/libboost_test_exec_monitor.a
> /usr/lib64/libboost_chrono.a             /usr/lib64/libboost_graph.so
>               /usr/lib64/libboost_math_c99l.so.1.57.0        
>  /usr/lib64/libboost_python3.so.1.57.0         
>  /usr/lib64/libboost_thread.a
> /usr/lib64/libboost_chrono.so           
>  /usr/lib64/libboost_graph.so.1.57.0      
>  /usr/lib64/libboost_math_c99.so                
>  /usr/lib64/libboost_python.a                  
>  /usr/lib64/libboost_thread.so
> /usr/lib64/libboost_chrono.so.1.57.0    
>  /usr/lib64/libboost_iostreams.a          
>  /usr/lib64/libboost_math_c99.so.1.57.0         
>  /usr/lib64/libboost_python.so                 
>  /usr/lib64/libboost_thread.so.1.57.0
> /usr/lib64/libboost_container.a         
>  /usr/lib64/libboost_iostreams.so         
>  /usr/lib64/libboost_math_tr1.a                 
>  /usr/lib64/libboost_python.so.1.57.0          
>  /usr/lib64/libboost_timer.a
> /usr/lib64/libboost_container.so        
>  /usr/lib64/libboost_iostreams.so.1.57.0  
>  /usr/lib64/libboost_math_tr1f.a                
>  /usr/lib64/libboost_random.a                  
>  /usr/lib64/libboost_timer.so
> /usr/lib64/libboost_container.so.1.57.0  /usr/lib64/libboost_locale.a
>               /usr/lib64/libboost_math_tr1f.so               
>  /usr/lib64/libboost_random.so                 
>  /usr/lib64/libboost_timer.so.1.57.0
> /usr/lib64/libboost_context.a           
>  /usr/lib64/libboost_locale.so            
>  /usr/lib64/libboost_math_tr1f.so.1.57.0        
>  /usr/lib64/libboost_random.so.1.57.0          
>  /usr/lib64/libboost_unit_test_framework.a
> /usr/lib64/libboost_context.so          
>  /usr/lib64/libboost_locale.so.1.57.0     
>  /usr/lib64/libboost_math_tr1l.a                
>  /usr/lib64/libboost_regex.a                   
>  /usr/lib64/libboost_unit_test_framework.so
> /usr/lib64/libboost_context.so.1.57.0    /usr/lib64/libboost_log.a   
>               /usr/lib64/libboost_math_tr1l.so               
>  /usr/lib64/libboost_regex.so                  
>  /usr/lib64/libboost_unit_test_framework.so.1.57.0
> /usr/lib64/libboost_coroutine.a         
>  /usr/lib64/libboost_log_setup.a          
>  /usr/lib64/libboost_math_tr1l.so.1.57.0        
>  /usr/lib64/libboost_regex.so.1.57.0           
>  /usr/lib64/libboost_wave.a
> /usr/lib64/libboost_coroutine.so        
>  /usr/lib64/libboost_log_setup.so         
>  /usr/lib64/libboost_math_tr1.so                
>  /usr/lib64/libboost_serialization.a           
>  /usr/lib64/libboost_wave.so
> /usr/lib64/libboost_coroutine.so.1.57.0 
>  /usr/lib64/libboost_log_setup.so.1.57.0  
>  /usr/lib64/libboost_math_tr1.so.1.57.0         
>  /usr/lib64/libboost_serialization.so          
>  /usr/lib64/libboost_wave.so.1.57.0
> /usr/lib64/libboost_date_time.a          /usr/lib64/libboost_log.so  
>               /usr/lib64/libboost_prg_exec_monitor.a         
>  /usr/lib64/libboost_serialization.so.1.57.0   
>  /usr/lib64/libboost_wserialization.a
> /usr/lib64/libboost_date_time.so        
>  /usr/lib64/libboost_log.so.1.57.0        
>  /usr/lib64/libboost_prg_exec_monitor.so        
>  /usr/lib64/libboost_signals.a                 
>  /usr/lib64/libboost_wserialization.so
> /usr/lib64/libboost_date_time.so.1.57.0 
>  /usr/lib64/libboost_math_c99.a           
>  /usr/lib64/libboost_prg_exec_monitor.so.1.57.0 
>  /usr/lib64/libboost_signals.so                
>  /usr/lib64/libboost_wserialization.so.1.57.0
> /usr/lib64/libboost_exception.a         
>  /usr/lib64/libboost_math_c99f.a          
>  /usr/lib64/libboost_program_options.a          
>  /usr/lib64/libboost_signals.so.1.57.0
> /usr/lib64/libboost_filesystem.a        
>  /usr/lib64/libboost_math_c99f.so         
>  /usr/lib64/libboost_program_options.so         
>  /usr/lib64/libboost_system.a

and this is the error output I get:

> [asinha@cs-1e114-2  build(develop %=)]$ /usr/bin/cmake         
> -DCMAKE_C_FLAGS_RELEASE:STRING="-DNDEBUG"         
> -DCMAKE_CXX_FLAGS_RELEASE:STRING="-DNDEBUG"         
> -DCMAKE_Fortran_FLAGS_RELEASE:STRING="-DNDEBUG"         
> -DCMAKE_VERBOSE_
> MAKEFILE:BOOL=ON         -DCMAKE_INSTALL_PREFIX:PATH=/usr         
> -DINCLUDE_INSTALL_DIR:PATH=/usr/include         
> -DLIB_INSTALL_DIR:PATH=/usr/lib64         
> -DSYSCONF_INSTALL_DIR:PATH=/etc         
> -DSHARE_INSTALL_PREFIX:PATH=/usr/share   
>       -DLIB_SUFFIX=64         -DBUILD_SHARED_LIBS:BOOL=ON 
> -DBoost_DEBUG=1  ../                                                 
>                                                                      
>                                          
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:549 ]
> _boost_TEST_VERSIONS =
> 1.58.0;1.58;1.57.0;1.57;1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.
> 53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49;1.48.0;1.48;1.47.0
> ;1.47;1.46.1;1.46.0;1.46
> ;1.45.0;1.45;1.44.0;1.44;1.43.0;1.43;1.42.0;1.42;1.41.0;1.41
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:551 ]
> Boost_USE_MULTITHREADED = TRUE
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:553 ]
> Boost_USE_STATIC_LIBS = 
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:555 ]
> Boost_USE_STATIC_RUNTIME = 
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:557 ]
> Boost_ADDITIONAL_VERSIONS = 
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:559 ]
> Boost_NO_SYSTEM_PATHS = 
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:611 ] Declared as CMake
> or Environmental Variables:
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:613 ]   BOOST_ROOT = 
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:615 ]  
>  BOOST_INCLUDEDIR = 
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:617 ]  
>  BOOST_LIBRARYDIR = /usr/lib64
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:619 ]
> _boost_TEST_VERSIONS =
> 1.58.0;1.58;1.57.0;1.57;1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.
> 53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49;1.48.0;1.48;1.47.0
> ;1.47;1.46.1;1.46.0;1.46
> ;1.45.0;1.45;1.44.0;1.44;1.43.0;1.43;1.42.0;1.42;1.41.0;1.41
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:712 ] location of
> version.hpp: /usr/include/boost/version.hpp
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:736 ] version.hpp
> reveals boost 1.57.0
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:822 ] guessed
> _boost_COMPILER = -gcc51
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:832 ]
> _boost_MULTITHREADED = -mt
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:875 ]
> _boost_RELEASE_ABI_TAG = -
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:877 ]
> _boost_DEBUG_ABI_TAG = -d
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:931 ]
> _boost_LIBRARY_SEARCH_DIRS_RELEASE =
> /usr/lib64/mpich/lib;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH_boost_LI
> BRARY_SEARCH_DIRS_DEBUG   =
> /usr/lib64/mpich/lib;NO_DEFAULT_PATH;NO_CMAKE_FIND_
> ROOT_PATH
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:1016 ] Component
> -specific library search paths for mpi: /usr/lib64/mpich/lib
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:1043 ] Searching for
> MPI_LIBRARY_RELEASE: boost_mpi-gcc51-mt-1_57;boost_mpi-gcc51
> -mt;boost_mpi-mt-1_57;boost_mpi-mt;boost_mpi
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:343 ] 
>  Boost_LIBRARY_DIR_RELEASE = /usr/lib64/mpich/lib
> _boost_LIBRARY_SEARCH_DIRS_RELEASE =
> /usr/lib64/mpich/lib;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:1085 ] Searching for
> MPI_LIBRARY_DEBUG: boost_mpi-gcc51-mt-d-1_57;boost_mpi-gcc51-mt
> -d;boost_mpi-mt-d-1_57;boost_mpi-mt-d;boost_mpi-mt;boost_mpi
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:343 ] 
>  Boost_LIBRARY_DIR_DEBUG = /usr/lib64/mpich/lib
> _boost_LIBRARY_SEARCH_DIRS_DEBUG =
> /usr/lib64/mpich/lib;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:1043 ] Searching for
> SERIALIZATION_LIBRARY_RELEASE: boost_serialization-gcc51-mt
> -1_57;boost_serialization-gcc51-mt;boost_serialization-mt
> -1_57;boost_serialization-mt;boost_serialization
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:343 ] 
>  Boost_LIBRARY_DIR_RELEASE = /usr/lib64/mpich/lib
> _boost_LIBRARY_SEARCH_DIRS_RELEASE =
> /usr/lib64/mpich/lib;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:1085 ] Searching for
> SERIALIZATION_LIBRARY_DEBUG: boost_serialization-gcc51-mt-d
> -1_57;boost_serialization-gcc51-mt-d;boost_serialization-mt-d
> -1_57;boost_serialization-mt-d;boost_serializatio$
> -mt;boost_serialization
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:343 ] 
>  Boost_LIBRARY_DIR_DEBUG = /usr/lib64/mpich/lib
> _boost_LIBRARY_SEARCH_DIRS_DEBUG =
> /usr/lib64/mpich/lib;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:1043 ] Searching for
> PROGRAM_OPTIONS_LIBRARY_RELEASE: boost_program_options-gcc51-mt
> -1_57;boost_program_options-gcc51-mt;boost_program_options-mt
> -1_57;boost_program_options-mt;boost_program_$ptions
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:343 ] 
>  Boost_LIBRARY_DIR_RELEASE = /usr/lib64/mpich/lib
> _boost_LIBRARY_SEARCH_DIRS_RELEASE =
> /usr/lib64/mpich/lib;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:1085 ] Searching for
> PROGRAM_OPTIONS_LIBRARY_DEBUG: boost_program_options-gcc51-mt-d
> -1_57;boost_program_options-gcc51-mt-d;boost_program_options-mt-d
> -1_57;boost_program_options-mt-d;boost_pr$gram_options
> -mt;boost_program_options
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:343 ] 
>  Boost_LIBRARY_DIR_DEBUG = /usr/lib64/mpich/lib
> _boost_LIBRARY_SEARCH_DIRS_DEBUG =
> /usr/lib64/mpich/lib;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:1043 ] Searching for
> DATE_TIME_LIBRARY_RELEASE: boost_date_time-gcc51-mt
> -1_57;boost_date_time-gcc51-mt;boost_date_time-mt
> -1_57;boost_date_time-mt;boost_date_time
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:343 ] 
>  Boost_LIBRARY_DIR_RELEASE = /usr/lib64/mpich/lib
> _boost_LIBRARY_SEARCH_DIRS_RELEASE =
> /usr/lib64/mpich/lib;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:1085 ] Searching for
> DATE_TIME_LIBRARY_DEBUG: boost_date_time-gcc51-mt-d
> -1_57;boost_date_time-gcc51-mt-d;boost_date_time-mt-d
> -1_57;boost_date_time-mt-d;boost_date_time-mt;boost_date_time
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:343 ] 
>  Boost_LIBRARY_DIR_DEBUG = /usr/lib64/mpich/lib
> _boost_LIBRARY_SEARCH_DIRS_DEBUG =
> /usr/lib64/mpich/lib;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
> -- [ /usr/share/cmake/Modules/FindBoost.cmake:1151 ] Boost_FOUND = 1
> CMake Error at /usr/share/cmake/Modules/FindBoost.cmake:1245
> (message):
>   Unable to find the requested Boost libraries.
> 
>   Boost version: 1.57.0
> 
>   Boost include path: /usr/include
> 
>   Could not find the following Boost libraries:
> 
>           boost_serialization
>           boost_program_options
>           boost_date_time
> 
>   Some (but not all) of the required Boost libraries were found.  You
> may
>   need to install these additional Boost libraries.  Alternatively,
> set
>   BOOST_LIBRARYDIR to the directory containing Boost libraries or
> BOOST_ROOT
>   to the location of Boost.
> Call Stack (most recent call first):
>   CMakeLists.txt:21 (FIND_PACKAGE)
> 
> 
> -- Configuring incomplete, errors occurred!
> See also "/home/asinha/Documents/02_Code/00_repos/00_mine/herts
> -research-repo/auryn/build/CMakeFiles/CMakeOutput.log".

Comment 1 Fedora Update System 2015-08-28 14:58:48 UTC
cmake-3.3.1-3.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-14510

Comment 2 Orion Poplawski 2015-08-28 15:25:17 UTC
I see you're making use of mpi.  How are you enabling that?

Comment 3 Orion Poplawski 2015-08-28 15:52:20 UTC
Think I figured this out.  Looks like FindBoost takes the first library component found and expects to find the other components there.  So it finds mpi first, but then it can't find the others because those libraries are in the standard location.  Workaround appears to be to move the mpi component to the end.

Comment 4 Orion Poplawski 2015-08-28 16:01:15 UTC
Filed upstream: http://www.cmake.org/Bug/view.php?id=15717

Comment 5 Fedora Update System 2015-08-28 18:57:15 UTC
cmake-3.3.1-3.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update cmake'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-14510

Comment 6 Fedora Update System 2015-09-19 21:51:38 UTC
cmake-3.3.1-3.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Ankur Sinha (FranciscoD) 2015-09-24 14:30:56 UTC
Won't this also be pushed to F23? :(

Comment 8 Orion Poplawski 2015-09-24 14:47:02 UTC
Of course it was - https://bodhi.fedoraproject.org/updates/FEDORA-2015-14277

Comment 9 Ankur Sinha (FranciscoD) 2015-09-25 13:07:42 UTC
Weird, I didn't get it after a dnf system-upgrade. I'll go investigate. Thanks Orion!