View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0011465 | CMake | Modules | public | 2010-11-16 05:56 | 2011-06-15 09:03 | ||||
Reporter | Jens Mueller | ||||||||
Assigned To | Philip Lowman | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | no change required | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake 2.8.3 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0011465: FindBoost does not check the version of the found libraries | ||||||||
Description | I have an old Boost version installed in my system and a newer version local in my home. FindBoost finds the newer version (that's why it passes my required version passed to FindBoost) but uses the libraries in the system which are older than the required version. It does so because the system libraries are mt but the local version is not mt and Boost_USE_MULTITHREADED defaults to ON. In any case I think it's a bug to use the older libraries since they do not meet the required version. I suggest to check for version of library if that is possible. If that check cannot be performed a warning should be reported. I think is bug is quite severe since CMake gives the impression to the user that it made sure the requirements. The user ends up with using a library that she didn't expect. | ||||||||
Steps To Reproduce | You need to have at least two boost versions in CMake's search path (version a and version b with a < b). You require version b in your CMakeLists.txt. The libraries of version b need to be found after the ones of version a (are searched later in the search path). Let's say that for version b we installed no libraries at all. Even though the requirements cannot be met FindBoost will use the libraries of version a. | ||||||||
Additional Information | This bug is related to this bug http://public.kitware.com/Bug/bug_view_page.php?bug_id=11019 [^] | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0023420) Philip Lowman (developer) 2010-11-18 23:01 |
Jens, This bug is related to a rather bizarre behavior of find_library() and other functions like find_path() where instead of every possible library name being searched in every possible library path, the reverse happens. E.g. find_library(FOO NAMES foo foo2 PATHS /first /second) will search: /first/libfoo.so /second/libfoo.so /first/libfoo2.so /second/libfoo2.so Because there are so many possible Boost library name permutations and paths, what ends up happening sometime is that FindBoost picks up the wrong thing. Until this issue is fixed, the only solution I have at present (introduced in CMake 2.8.3) is setting the variable Boost_NO_SYSTEM_PATHS This effectively prevents finding Boost libraries outside of the discovered Boost include directory (unless the user has set BOOST_ROOT or BOOST_LIBRARYDIR, or one of the CMake variables like CMAKE_PREFIX_PATH, then those paths are also considered). P.S. I don't think searching the libraries for version information would be technically practical to do because of speed (even if each library had a symbol with the version number of Boost, which is doubtful). |
(0026874) Philip Lowman (developer) 2011-06-15 09:03 |
Can't remove version check from filename as it could break people. Suggested workaround is to use Boost_NO_SYSTEM_PATHS & BOOST_ROOT. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2010-11-16 05:56 | Jens Mueller | New Issue | |
2010-11-16 10:12 | Philip Lowman | Assigned To | => Philip Lowman |
2010-11-16 10:12 | Philip Lowman | Status | new => assigned |
2010-11-18 23:01 | Philip Lowman | Note Added: 0023420 | |
2011-06-15 09:03 | Philip Lowman | Note Added: 0026874 | |
2011-06-15 09:03 | Philip Lowman | Status | assigned => closed |
2011-06-15 09:03 | Philip Lowman | Resolution | open => no change required |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |