[Pkg-cmake-team] Bug#911088: cmake: Recognize /usr/include/x86_64-linux-gnu like /usr/include

Marc Glisse marc.glisse at inria.fr
Mon Oct 15 15:42:49 BST 2018


Package: cmake
Version: 3.12.3-1
Severity: normal

Dear Maintainer,

I regularly see cmake-generated makefiles with compiler flags like 
-isystem /usr/include/x86_64-linux-gnu (or worse with -I). Those horrors 
cause no end of trouble. It seems that cmake has special code to avoid 
adding -I/usr/include, it would be good to extend it to the multiarch 
directory.

Some steps to reproduce easily:

$ cat hello.cpp
int main(){}
$ cat CMakeLists.txt
cmake_minimum_required(VERSION 3.4.0)
project (hello)
add_executable(hello hello.cpp)
target_include_directories(hello SYSTEM PRIVATE /usr/include/x86_64-linux-gnu)
$ cmake . && make VERBOSE=1
[...]
/usr/bin/c++   -isystem /usr/include/x86_64-linux-gnu   -o CMakeFiles/hello.dir/hello.cpp.o -c /tmp/cm/hello.cpp

while if I replace /usr/include/x86_64-linux-gnu with /usr/include

/usr/bin/c++     -o CMakeFiles/hello.dir/hello.cpp.o -c /tmp/cm/hello.cpp

-- System Information:
Debian Release: buster/sid
   APT prefers unstable-debug
   APT policy: (500, 'unstable-debug'), (500, 'testing'), (500, 'stable'), (50, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, arm64, ppc64el, mips64el

Kernel: Linux 4.18.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages cmake depends on:
ii  cmake-data    3.12.3-1
ii  libarchive13  3.2.2-5
ii  libc6         2.27-6
ii  libcurl4      7.61.0-1
ii  libexpat1     2.2.6-1
ii  libgcc1       1:8.2.0-7
ii  libjsoncpp1   1.7.4-3
ii  librhash0     1.3.6-2
ii  libstdc++6    8.2.0-7
ii  libuv1        1.23.1-1
ii  procps        2:3.3.15-2
ii  zlib1g        1:1.2.11.dfsg-1

Versions of packages cmake recommends:
ii  gcc   4:8.1.0-1
ii  make  4.2.1-1.2

Versions of packages cmake suggests:
pn  cmake-doc    <none>
ii  ninja-build  1.8.2-1

-- no debconf information



More information about the Pkg-cmake-team mailing list