Bug#759303: Does not have multiarch include paths on !linux

Christoph Egger christoph at debian.org
Mon Aug 25 23:33:18 UTC 2014


Package: clang-3.4
Version: 1:3.4.2-7
Severity: important

Hi!

  On linux, clang adds the /usr/include/$triple to it's include
paths. On kfreebsd (and probably hurd) it doesn't -- proably somewhat
similar to #731711. Could that be fixed please?

Thanks

  Christoph

linux
> % touch test.c
>
> % clang-3.4 -v test.c
> Debian clang version 3.4.2-7 (tags/RELEASE_34/dot2-final) (based on LLVM 3.4.2)
> Target: x86_64-pc-linux-gnu
> Thread model: posix
> Found candidate GCC installation: /usr/bin/../lib/gcc/i486-linux-gnu/4.8
> Found candidate GCC installation: /usr/bin/../lib/gcc/i486-linux-gnu/4.8.3
> Found candidate GCC installation: /usr/bin/../lib/gcc/i586-linux-gnu/4.9
> Found candidate GCC installation: /usr/bin/../lib/gcc/i586-linux-gnu/4.9.1
> Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.4
> Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.4.6
> Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.4.7
> Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.5
> Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.5.3
> Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.6
> Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.6.4
> Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7
> Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7.4
> Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8
> Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8.3
> Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9
> Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9.1
> Found candidate GCC installation: /usr/lib/gcc/i486-linux-gnu/4.8
> Found candidate GCC installation: /usr/lib/gcc/i486-linux-gnu/4.8.3
> Found candidate GCC installation: /usr/lib/gcc/i586-linux-gnu/4.9
> Found candidate GCC installation: /usr/lib/gcc/i586-linux-gnu/4.9.1
> Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4
> Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4.6
> Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4.7
> Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.5
> Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.5.3
> Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6
> Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6.4
> Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7
> Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7.4
> Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
> Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.3
> Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
> Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.1
> Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9
>  "/usr/lib/llvm-3.4/bin/clang" -cc1 -triple x86_64-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name test.c -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -target-linker-version 2.24.51.20140727 -v -resource-dir /usr/lib/llvm-3.4/bin/../lib/clang/3.4.2 -internal-isystem /usr/include/clang/3.4.2/include/ -internal-isystem /usr/local/include -internal-isystem /usr/lib/llvm-3.4/bin/../lib/clang/3.4.2/include -internal-externc-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdebug-compilation-dir /tmp -ferror-limit 19 -fmessage-length 109 -mstackrealign -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o /tmp/test-f9f52c.o -x c test.c
> clang -cc1 version 3.4.2 based upon LLVM 3.4.2 default target x86_64-pc-linux-gnu
> ignoring nonexistent directory "/include"
> ignoring duplicate directory "/usr/include/clang/3.4.2/include"
> #include "..." search starts here:
> #include <...> search starts here:
>  /usr/include/clang/3.4.2/include
>  /usr/local/include
>  /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/include
>  /usr/include/x86_64-linux-gnu
>  /usr/include
> End of search list.
>  "/usr/bin/ld" --hash-style=both --build-id --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o a.out /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crt1.o /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crti.o /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/crtbegin.o -L/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9 -L/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu -L/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../lib64 -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib64 -L/usr/lib/x86_64-linux-gnu/../../lib64 -L/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../.. -L/lib -L/usr/lib /tmp/test-f9f52c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/crtend.o /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crtn.o
> /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crt1.o: In function `_start':
> /build/glibc-3yzGbK/glibc-2.19/csu/../sysdeps/x86_64/start.S:118: undefined reference to `main'
> clang: error: linker command failed with exit code 1 (use -v to see invocation)

kfreebsd
> % touch test.c
> % clang-3.4 -v test.c 
> Debian clang version 3.4.2-8 (tags/RELEASE_34/dot2-final) (based on LLVM 3.4.2)
> Target: x86_64-pc-kfreebsd-gnu
> Thread model: posix
> Selected GCC installation: 
>  "/usr/lib/llvm-3.4/bin/clang" -cc1 -triple x86_64-pc-kfreebsd-gnu -S -disable-free -disable-llvm-verifier -main-file-name test.c -mrelocation-model static -mdisable-fp-elim -fmath-errno -mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version 2.24.51.20140818 -v -resource-dir /usr/lib/llvm-3.4/bin/../lib/clang/3.4.2 -fno-dwarf-directory-asm -fdebug-compilation-dir /tmp -ferror-limit 19 -fmessage-length 109 -mstackrealign -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o /tmp/test-3ad65f.s -x c test.c
> clang -cc1 version 3.4.2 based upon LLVM 3.4.2 default target x86_64-pc-kfreebsd-gnu
> #include "..." search starts here:
> #include <...> search starts here:
>  /usr/local/include
>  /usr/lib/llvm-3.4/bin/../lib/clang/3.4.2/include
>  /usr/include
> End of search list.
>  "/usr/bin/gcc" -v -c -m64 -o /tmp/test-741ad6.o -x assembler /tmp/test-3ad65f.s
> Using built-in specs.
> COLLECT_GCC=/usr/bin/gcc-4.9.real
> Target: x86_64-kfreebsd-gnu
> Configured with: ../src/configure -v --with-pkgversion='Debian 4.9.1-4' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --disable-libitm --disable-libsanitizer --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-kfreebsd-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-kfreebsd-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-kfreebsd-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --with-arch-32=i586 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-kfreebsd-gnu --host=x86_64-kfreebsd-gnu --target=x86_64-kfreebsd-gnu
> Thread model: posix
> gcc version 4.9.1 (Debian 4.9.1-4) 
> COLLECT_GCC_OPTIONS='-v' '-c' '-m64' '-o' '/tmp/test-741ad6.o' '-mtune=generic' '-march=x86-64'
>  as -v --64 -o /tmp/test-741ad6.o /tmp/test-3ad65f.s
> GNU assembler version 2.24.51 (x86_64-kfreebsd-gnu) using BFD version (GNU Binutils for Debian) 2.24.51.20140818
> COMPILER_PATH=/usr/lib/gcc/x86_64-kfreebsd-gnu/4.9/:/usr/lib/gcc/x86_64-kfreebsd-gnu/4.9/:/usr/lib/gcc/x86_64-kfreebsd-gnu/:/usr/lib/gcc/x86_64-kfreebsd-gnu/4.9/:/usr/lib/gcc/x86_64-kfreebsd-gnu/
> LIBRARY_PATH=/usr/lib/gcc/x86_64-kfreebsd-gnu/4.9/:/usr/lib/gcc/x86_64-kfreebsd-gnu/4.9/../../../x86_64-kfreebsd-gnu/:/usr/lib/gcc/x86_64-kfreebsd-gnu/4.9/../../../../lib/:/lib/x86_64-kfreebsd-gnu/:/lib/../lib/:/usr/lib/x86_64-kfreebsd-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-kfreebsd-gnu/4.9/../../../:/lib/:/usr/lib/
> COLLECT_GCC_OPTIONS='-v' '-c' '-m64' '-o' '/tmp/test-741ad6.o' '-mtune=generic' '-march=x86-64'
>  "/usr/bin/gcc" -v -m64 -o a.out /tmp/test-741ad6.o
> Using built-in specs.
> COLLECT_GCC=/usr/bin/gcc-4.9.real
> COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-kfreebsd-gnu/4.9/lto-wrapper
> Target: x86_64-kfreebsd-gnu
> Configured with: ../src/configure -v --with-pkgversion='Debian 4.9.1-4' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --disable-libitm --disable-libsanitizer --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-kfreebsd-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-kfreebsd-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-kfreebsd-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --with-arch-32=i586 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-kfreebsd-gnu --host=x86_64-kfreebsd-gnu --target=x86_64-kfreebsd-gnu
> Thread model: posix
> gcc version 4.9.1 (Debian 4.9.1-4) 
> COMPILER_PATH=/usr/lib/gcc/x86_64-kfreebsd-gnu/4.9/:/usr/lib/gcc/x86_64-kfreebsd-gnu/4.9/:/usr/lib/gcc/x86_64-kfreebsd-gnu/:/usr/lib/gcc/x86_64-kfreebsd-gnu/4.9/:/usr/lib/gcc/x86_64-kfreebsd-gnu/
> LIBRARY_PATH=/usr/lib/gcc/x86_64-kfreebsd-gnu/4.9/:/usr/lib/gcc/x86_64-kfreebsd-gnu/4.9/../../../x86_64-kfreebsd-gnu/:/usr/lib/gcc/x86_64-kfreebsd-gnu/4.9/../../../../lib/:/lib/x86_64-kfreebsd-gnu/:/lib/../lib/:/usr/lib/x86_64-kfreebsd-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-kfreebsd-gnu/4.9/../../../:/lib/:/usr/lib/
> COLLECT_GCC_OPTIONS='-v' '-m64' '-o' 'a.out' '-mtune=generic' '-march=x86-64'
>  /usr/lib/gcc/x86_64-kfreebsd-gnu/4.9/collect2 -plugin /usr/lib/gcc/x86_64-kfreebsd-gnu/4.9/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-kfreebsd-gnu/4.9/lto-wrapper -plugin-opt=-fresolution=/tmp/ccjeFFMs.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64_fbsd --hash-style=gnu -dynamic-linker /lib/ld-kfreebsd-x86-64.so.1 -o a.out /usr/lib/gcc/x86_64-kfreebsd-gnu/4.9/../../../x86_64-kfreebsd-gnu/crt1.o /usr/lib/gcc/x86_64-kfreebsd-gnu/4.9/../../../x86_64-kfreebsd-gnu/crti.o /usr/lib/gcc/x86_64-kfreebsd-gnu/4.9/crtbegin.o -L/usr/lib/gcc/x86_64-kfreebsd-gnu/4.9 -L/usr/lib/gcc/x86_64-kfreebsd-gnu/4.9/../../../x86_64-kfreebsd-gnu -L/usr/lib/gcc/x86_64-kfreebsd-gnu/4.9/../../../../lib -L/lib/x86_64-kfreebsd-gnu -L/lib/../lib -L/usr/lib/x86_64-kfreebsd-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-kfreebsd-gnu/4.9/../../.. /tmp/test-741ad6.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-kfreebsd-gnu/4.9/crtend.o /usr/lib/gcc/x86_64-kfreebsd-gnu/4.9/../../../x86_64-kfreebsd-gnu/crtn.o
> /usr/lib/gcc/x86_64-kfreebsd-gnu/4.9/../../../x86_64-kfreebsd-gnu/crt1.o: In function `_start':
> /build/glibc-oa7ZKi/glibc-2.19/csu/../ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/start.S:133: undefined reference to `main'
> collect2: error: ld returned 1 exit status
> clang: error: linker (via gcc) command failed with exit code 1 (use -v to see invocation)


-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: kfreebsd-amd64 (x86_64)

Kernel: kFreeBSD 10.1-0-amd64
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages clang-3.4 depends on:
ii  libc0.1                  2.19-9
ii  libc0.1-dev [libc6-dev]  2.19-9
ii  libclang-common-3.4-dev  1:3.4.2-8
ii  libclang1-3.4            1:3.4.2-8
ii  libffi6                  3.1-2
ii  libgcc-4.9-dev           4.9.1-4
ii  libgcc1                  1:4.9.1-4
ii  libllvm3.4               1:3.4.2-8
ii  libobjc-4.9-dev          4.9.1-4
ii  libstdc++-4.9-dev        4.9.1-4
ii  libstdc++6               4.9.1-4
ii  libtinfo5                5.9+20140712-2

Versions of packages clang-3.4 recommends:
ii  llvm-3.4-dev  1:3.4.2-7
ii  python        2.7.8-1

Versions of packages clang-3.4 suggests:
pn  clang-3.4-doc  <none>
pn  gnustep        <none>
pn  gnustep-devel  <none>

-- no debconf information



More information about the Pkg-llvm-team mailing list