MantisBT - CMake
View Issue Details
0015373CMakeModulespublic2015-01-27 09:022016-06-10 14:31
Dimitri Merejkowsky 
Kitware Robot 
normalminoralways
closedmoved 
LinuxArchLinux
 
 
0015373: GNUInstallDirs is not correct for ArchLinux
When setting CMAKE_INSTALL_PREFIX to /usr, CMAKE_INSTALL_FULL_LIBDIR is set to
/usr/lib64, which is not correct since the /usr merge :

https://www.archlinux.org/news/update-filesystem-201301-1-and-glibc-217-2-together/ [^]

# CMakeLists.txt:

cmake_minimum_required(VERSION 3.1)
project(foo)

include(GNUInstallDirs)

message(STATUS "CMAKE_INSTALL_FULL_LIBDIR: ${CMAKE_INSTALL_FULL_LIBDIR}")


$ cmake -DCMAKE_INSTALL_PREFIX=/usr

Output is /usr/lib64, should be /usr/lib
No tags attached.
Issue History
2015-01-27 09:02Dimitri MerejkowskyNew Issue
2015-01-27 09:02Dimitri MerejkowskyNote Added: 0037831
2015-01-27 09:12Richard ShawNote Added: 0037832
2015-01-27 09:13Brad KingNote Added: 0037833
2015-01-27 09:20Richard ShawNote Added: 0037835
2016-06-10 14:29Kitware RobotNote Added: 0042703
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0037831)
Dimitri Merejkowsky   
2015-01-27 09:02   
Note that the problem may not be limited to Arch. I think fedora also has /usr/lib64 as a symlink now
(0037832)
Richard Shaw   
2015-01-27 09:12   
No, I don't think that this change in Arch is directly related to usr merge, while they may have done it at the same time, there's nothing about usr merge that requires that lib64 go away, it is still a real directory on Fedora. The only thing usr merge did was add symlinks from /lib -> /usr/lib and /lib64 -> /usr/lib64.

How does Arch handle multi-arch now? Is it more like Debian with an arch designator directory under /usr/lib?
(0037833)
Brad King   
2015-01-27 09:13   
The logic here:

 http://www.cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/GNUInstallDirs.cmake;hb=v3.1.1#l124 [^]

decides between lib and lib64, and accounts for Debian policy. It needs to be taught the policies for other distros.
(0037835)
Richard Shaw   
2015-01-27 09:20   
https://wiki.archlinux.org/index.php/multilib [^]

Ok, that's not at all complicated :)

So:
Arch 32 -> /usr/lib
Arch 64 -> /usr/lib
Arch 64 multi-lib 32-bit libraries -> /usr/lib32
(0042703)
Kitware Robot   
2016-06-10 14:29   
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.