MantisBT - CMake | ||||||||||
View Issue Details | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||
0009657 | CMake | CMake | public | 2009-10-04 12:54 | 2009-10-05 11:09 | |||||
Reporter | Modestas Vainius | |||||||||
Assigned To | Brad King | |||||||||
Priority | normal | Severity | major | Reproducibility | always | |||||
Status | closed | Resolution | fixed | |||||||
Platform | OS | OS Version | ||||||||
Product Version | CMake-2-8 | |||||||||
Target Version | Fixed in Version | |||||||||
Summary | 0009657: Too low preference of /usr/local in CMAKE_SYSTEM_PREFIX_PATH | |||||||||
Description | According to FHS [1], /usr/local "is for use by the system administrator when installing software locally". However, CMAKE_SYSTEM_PREFIX_PATH is set to / /usr /usr/local in Modules/Platform/UnixPaths.cmake:12. This way both /usr and / (software installed by system) are preferred to /usr/local (software installed by administrator). However, cmake should prefer the version installed by administrator if there is any. This is especially important for commands like FIND_PATH() which searches /include and /usr/include before /usr/local/include due to this bug. I believe the order should be: /usr/local / /usr Not sure if / and /usr should be reversed either but probably it is not that significant. CMake 2.8-rc2 on Debian GNU/Linux. Applies to CMake 2.6 too. 1. http://www.pathname.com/fhs/pub/fhs-2.3.html#USRLOCALLOCALHIERARCHY [^] | |||||||||
Steps To Reproduce | ||||||||||
Additional Information | CMakeLists.txt -------------- project(testproject C) cmake_minimum_required(VERSION 2.6) find_path(AAA_INCLUDE aaa.h) Output ------ $ rm -f CMakeCache.txt ; strace -e trace=file -- cmake . 2>&1 | grep aaa.h # Searches my $PATH access("/mnt/sda2/usr/local/bin/aaa.h", R_OK) = -1 ENOENT (No such file or directory) access("/mnt/sda2/usr/bin/aaa.h", R_OK) = -1 ENOENT (No such file or directory) access("/bin/aaa.h", R_OK) = -1 ENOENT (No such file or directory) access("/mnt/sda2/usr/games/aaa.h", R_OK) = -1 ENOENT (No such file or directory) # Searches each <path>/include in ${CMAKE_SYSTEM_PREFIX_PATH}. Bug is evident. access("/include/aaa.h", R_OK) = -1 ENOENT (No such file or directory) access("/usr/include/aaa.h", R_OK) = -1 ENOENT (No such file or directory) access("/usr/aaa.h", R_OK) = -1 ENOENT (No such file or directory) access("/usr/local/include/aaa.h", R_OK) = -1 ENOENT (No such file or directory) access("/usr/local/aaa.h", R_OK) = -1 ENOENT (No such file or directory) access("/mnt/sda2/usr/include/aaa.h", R_OK) = -1 ENOENT (No such file or directory) access("/mnt/sda2/usr/aaa.h", R_OK) = -1 ENOENT (No such file or directory) # Searches each <path> in ${CMAKE_SYSTEM_INCLUDE_PATH} access("/usr/include/w32api/aaa.h", R_OK) = -1 ENOENT (No such file or directory) access("/usr/X11R6/include/aaa.h", R_OK) = -1 ENOENT (No such file or directory) access("/usr/include/X11/aaa.h", R_OK) = -1 ENOENT (No such file or directory) access("/opt/local/include/aaa.h", R_OK) = -1 ENOENT (No such file or directory) access("/usr/pkg/include/aaa.h", R_OK) = -1 ENOENT (No such file or directory) access("/opt/csw/include/aaa.h", R_OK) = -1 ENOENT (No such file or directory) access("/opt/include/aaa.h", R_OK) = -1 ENOENT (No such file or directory) access("/usr/openwin/include/aaa.h", R_OK) = -1 ENOENT (No such file or directory) | |||||||||
Tags | No tags attached. | |||||||||
Relationships |
| |||||||||
Attached Files | ||||||||||
Issue History | ||||||||||
Date Modified | Username | Field | Change | |||||||
2009-10-04 12:54 | Modestas Vainius | New Issue | ||||||||
2009-10-04 15:18 | Bill Hoffman | Status | new => assigned | |||||||
2009-10-04 15:18 | Bill Hoffman | Assigned To | => Brad King | |||||||
2009-10-05 11:09 | Brad King | Note Added: 0017947 | ||||||||
2009-10-05 11:09 | Brad King | Status | assigned => closed | |||||||
2009-10-05 11:09 | Brad King | Resolution | open => fixed | |||||||
2010-01-13 13:17 | Brad King | Relationship added | related to 0010136 |
Notes | |||||
|
|||||
|
|