|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0011375||CMake||CMake||public||2010-10-28 05:25||2016-06-10 14:31|
|Assigned To||Bill Hoffman|
|Target Version||Fixed in Version|
|Summary||0011375: CMake searching of library path on AMD64 architectures with GNU/Linux|
|Description||When searching for libraries in pure CXX projects in Linux on 64 bits systems, the lib64 directories are not searched, even with the FIND_LIBRARY_USE_LIB64_PATHS macro set. Adding the 64 prefix works in pure C or hybrid C/CXX projects.|
|Additional Information||The file hierarchy standard (http://www.pathname.com/fhs/pub/fhs-2.3.html#LIB64 [^]) specifies that the "lib" directories will house 32bits binaries on PPC64, s390x, sparc64 and AMD64 architectures running GNU/Linux.|
While the FIND_LIBRARY_USE_LIB64_PATHS property allows to mitigate this problem, it still has a few quircks :
* Even setting the property at global level do not seem to apply to subsequent find_package calls
* If a 32bit library with the adequate name is found in "lib" directories, it will be used instead of the native version
|Tags||No tags attached.|
Matthieu Volat (reporter)
Hmm, it seems that my test was a bit hasty:
The problem was observed with a pure C++ project (using the macro PROJECT(myproject CXX) at the begining of the CMakeLists.txt).
Tracking the issue, i went into the cmFindLibraryCommand.cxx file and saw at begining of the cmFindLibraryCommand::AddLib64Paths() function that searching for lib64 variants is only enabled when project is C-enabled.
Transforming it in a C/CXX enabled project is a workaround. I tried enlarging the conditional to allow CXX projects, but it was a mitigated success since some findpackages calls requires a C compiler to build their internal test programs. Maybe this bug should be closed and reopened with a proper description of the problem?
David Cole (manager)
You don't need to close and re-open the bug. As the reporter of a still open bug, you should be able to edit the summary and description fields to reflect reality.
Would you mind re-phrasing this issue to tell us exactly what the problem is and what you think should be done to fix it?
Matthieu Volat (reporter)
I'm sorry, I can't find where to edit the description of the bug report. A correct rephrasement of the issue should be :
"When searching for libraries in pure CXX projects in Linux on 64 bits systems, the lib64 directories are not searched, even with the FIND_LIBRARY_USE_LIB64_PATHS macro set. Adding the 64 prefix works in pure C or hybrid C/CXX projects."
Kitware Robot (administrator)
Resolving issue as `moved`.
This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.
|2010-10-28 05:25||Matthieu Volat||New Issue|
|2010-11-02 07:29||Matthieu Volat||Note Added: 0022770|
|2011-01-17 16:53||David Cole||Note Added: 0024831|
|2011-01-17 17:00||David Cole||Assigned To||=> Bill Hoffman|
|2011-01-17 17:00||David Cole||Status||new => assigned|
|2011-01-21 10:56||Matthieu Volat||Note Added: 0024993|
|2011-01-21 11:03||David Cole||Description Updated|
|2016-06-10 14:28||Kitware Robot||Note Added: 0041759|
|2016-06-10 14:28||Kitware Robot||Status||assigned => resolved|
|2016-06-10 14:28||Kitware Robot||Resolution||open => moved|
|2016-06-10 14:31||Kitware Robot||Status||resolved => closed|
|Copyright © 2000 - 2018 MantisBT Team|