Bug#744872: clang-3.5: once gcc-4.9 and g++-4.9 are installed, clang stops properly building existing projects

Bradley Small bsmall at quoininc.com
Tue Apr 15 16:47:52 UTC 2014


Package: clang-3.5
Version: 1:3.5~svn201651-1
Severity: important

Dear Maintainer,


   * What led up to the situation?
Already installed system with gcc/g++-4.8 and clang-3.5 installed functions
properly. Installing gcc/g++-4.9 was followed by make failing on clang error.

/usr/bin/../lib/gcc/x86_64-linux-
gnu/4.9/../../../../include/c++/4.9/cstddef:51:11: error: no member named
'max_align_t' in the global namespace

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

This lead me to believe gcc/g++-4.9 to be the problem.

So I changed the command line from "clang++" to:
        CC := clang++ --gcc-toolchain=/usr/lib/gcc/x86_64-linux-gnu/4.8
-I/usr/include/c++/4.8 -I/usr/include/x86_64-linux-gnu/c++/4.8


   * What was the outcome of this action?
This resulted in the error:
/usr/bin/ld: cannot find crtbegin.o: No such file or directory

The linking command is revealed as:
 "/usr/bin/ld" -whole-archive /usr/bin/../lib/clang/3.5/lib/linux/libclang_rt
..asan-x86_64.a -no-whole-archive -export-dynamic --hash-style=both --build-id
--eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o
build/cxxtest/com/lowes/ss/utility/log/test/TestMessage /usr/bin/../lib/x86_64
-linux-gnu/crt1.o /usr/bin/../lib/x86_64-linux-gnu/crti.o crtbegin.o
-L/usr/bin/../lib/x86_64-linux-gnu -L/lib/x86_64-linux-gnu -L/lib/../lib64
-L/usr/lib/x86_64-linux-gnu -L/usr/bin/../lib -L/lib -L/usr/lib -ldl -lpthread
/tmp/TestMessage-647d52.o /tmp/Config-f35d8e.o /tmp/Event-fd4117.o /tmp/Header-
abbe0e.o /tmp/Log-3aa79c.o /tmp/Logger-600dd6.o /tmp/Process-fc9491.o /tmp
/Utility_impl-28e69f.o /tmp/ProcessLinux-d3b92b.o /tmp/SinkSyslogLinux-7562cf.o
/tmp/TraceFunctionLinux-e2fefd.o /tmp/TraceBackLinux-4e9d23.o -lpthread -lrt
-ldl -lm -export-dynamic -lstdc++ -lm -lgcc_s -lgcc -lpthread -lc -lgcc_s -lgcc
crtend.o /usr/bin/../lib/x86_64-linux-gnu/crtn.o

   * What outcome did you expect instead?
I expected it to work, ignoring gcc/g++-4.9 and using the toolchain of 4.8. As
a side note, I was surprised that once choosing the toolchain for 4.8 I still
had to indicate the system includes as well.



-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (800, 'unstable'), (700, 'testing'), (100, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.13-1-amd64 (SMP w/4 CPU cores)
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.5 depends on:
ii  libc6                    2.18-4
ii  libclang-common-3.5-dev  1:3.5~svn201651-1
ii  libclang1-3.5            1:3.5~svn201651-1
ii  libedit2                 3.1-20140213-1
ii  libffi6                  3.1~rc1+r3.0.13-12
ii  libgcc-4.8-dev           4.8.2-19
ii  libgcc1                  1:4.9-20140411-2
ii  libllvm3.5               1:3.5~svn201651-1
ii  libobjc-4.8-dev          4.8.2-19
ii  libstdc++-4.8-dev        4.8.2-19
ii  libstdc++6               4.9-20140411-2
ii  libtinfo5                5.9+20140118-1

Versions of packages clang-3.5 recommends:
ii  llvm-3.5-dev  1:3.5~svn201651-1
ii  python        2.7.5-5

clang-3.5 suggests no packages.

-- no debconf information



More information about the Pkg-llvm-team mailing list