[cmake-developers] [CMake 0013419]: Path mangled when searchign for lib64 directories

Mantis Bug Tracker mantis at public.kitware.com
Wed Jul 18 10:51:25 EDT 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=13419 
====================================================================== 
Reported By:                Andy Piper
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13419
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2012-07-18 10:51 EDT
Last Modified:              2012-07-18 10:51 EDT
====================================================================== 
Summary:                    Path mangled when searchign for lib64 directories
Description: 
When searching for "lib64" directories, all elements in the search-path that end
with "lib" are changed to "lib64". This makes it impossible for CMake to find
the libraries.




Steps to Reproduce: 
1. Start up a OpenSUSE or SLES machine

2. Create a directory /var/lib/myproject/lib64

2a (optional, if you don't want to be root):
    # chown -R <youruser>:users /var/lib/myproject
    ...then do the remaining steps as <youruser>

3. Copy /usr/lib64/libz.so to /var/lib/myproject/lib64/

4. Create the file /var/lib/myproject/CMakeLists.txt with this content:

    cmake_minimum_required(VERSION 2.8)
    project(lib64bug)
    set(CMAKE_FIND_ROOT_PATH ${CMAKE_SOURCE_DIR})
    find_library(MYZLIB NAMES libz.so
        ONLY_CMAKE_FIND_ROOT_PATH)
    if(MYZLIB STREQUAL "MYZLIB-NOTFOUND")
        message(FATAL_ERROR "Did not find zlib under ${CMAKE_SOURCE_DIR}")
    endif()
    message(STATUS "Found zlib: ${MYZLIB}")

5. Create the directory /var/lib/myproject/build and cd into it

6. Run "cmake .."

- The expected CMake output should end with

"-- Found zlib: /var/myproject/lib64/libz.so"

- The actual CMake output is :

"CMake Error at CMakeLists.txt:7 (message):
  Did not find zlib under /var/lib/myproject


-- Configuring incomplete, errors occurred!"

7. To see the bug in action, run this command (under bash or sh):

    strace cmake .. 2>&1 | grep myproject/lib64

...the output will show the path /var/lib/myproject being mangled to
/var/lib64/myproject

Additional Information: 
/var/lib/jenkins/workspace is the default workspace-root for Jenkins CI
installations on OpenSUSE (and possibly other Linux distributions). This exposes
all jenkins projects to this bug.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-07-18 10:51 Andy Piper     New Issue                                    
======================================================================




More information about the cmake-developers mailing list