[cfe-users] Basic clang usage fails for 32-bit
Robert Dailey
rcdailey.lists at gmail.com
Wed Jan 21 11:44:53 PST 2015
First here is my version of clang:
$ clang --version
Ubuntu clang version 3.5-1ubuntu1 (trunk) (based on LLVM 3.5)
Target: x86_64-pc-linux-gnu
Thread model: posix
I'm running the following command:
$ clang++ -m32 -Wl,--verbose test.cpp|grep libgcc
And I get the output below. I'm running Mint 17 64-bit, it's a fresh
install. I've installed the following packages:
clang, g++-multilib
What is going on? Why can't I compile a 32-bit application?
/usr/bin/ld: skipping incompatible
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/libstdc++.so when searching
for -lstdc++
/usr/bin/ld: skipping incompatible
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/libstdc++.a when searching
for -lstdc++
/usr/bin/ld: cannot find -lstdc++
/usr/bin/ld: skipping incompatible
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/libgcc_s.so when searching
for -lgcc_s
attempt to open /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/libgcc_s.so succeeded
/usr/bin/ld: cannot find -lgcc_s
attempt to open /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/libgcc_s.a failed
attempt to open
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../i386-linux-gnu/libgcc_s.so
failed
/usr/bin/ld: skipping incompatible
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/libgcc.a when searching for
-lgcc
attempt to open
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../i386-linux-gnu/libgcc_s.a
failed
attempt to open
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../lib32/libgcc_s.so
failed
attempt to open
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../lib32/libgcc_s.a
failed
attempt to open /usr/bin/../lib/i386-linux-gnu/libgcc_s.so failed
/usr/bin/ld: cannot find -lgcc
attempt to open /usr/bin/../lib/i386-linux-gnu/libgcc_s.a failed
attempt to open /usr/bin/../lib32/libgcc_s.so failed
attempt to open /usr/bin/../lib32/libgcc_s.a failed
attempt to open /lib/i386-linux-gnu/libgcc_s.so failed
attempt to open /lib/i386-linux-gnu/libgcc_s.a failed
attempt to open /lib/../lib32/libgcc_s.so failed
attempt to open /lib/../lib32/libgcc_s.a failed
attempt to open /usr/lib/i386-linux-gnu/libgcc_s.so failed
attempt to open /usr/lib/i386-linux-gnu/libgcc_s.a failed
attempt to open /usr/lib/../lib32/libgcc_s.so failed
attempt to open /usr/lib/../lib32/libgcc_s.a failed
attempt to open /usr/lib/x86_64-linux-gnu/../../lib32/libgcc_s.so failed
attempt to open /usr/lib/x86_64-linux-gnu/../../lib32/libgcc_s.a failed
attempt to open
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../libgcc_s.so failed
attempt to open
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../libgcc_s.a failed
attempt to open /usr/bin/../lib/libgcc_s.so failed
attempt to open /usr/bin/../lib/libgcc_s.a failed
attempt to open /lib/libgcc_s.so failed
attempt to open /lib/libgcc_s.a failed
attempt to open /usr/lib/libgcc_s.so failed
attempt to open /usr/lib/libgcc_s.a failed
attempt to open /usr/i386-linux-gnu/lib32/libgcc_s.so failed
attempt to open /usr/i386-linux-gnu/lib32/libgcc_s.a failed
attempt to open /usr/x86_64-linux-gnu/lib32/libgcc_s.so failed
attempt to open /usr/x86_64-linux-gnu/lib32/libgcc_s.a failed
attempt to open //usr/local/lib/i386-linux-gnu/libgcc_s.so failed
attempt to open //usr/local/lib/i386-linux-gnu/libgcc_s.a failed
attempt to open //usr/local/lib32/libgcc_s.so failed
attempt to open //usr/local/lib32/libgcc_s.a failed
attempt to open //lib/i386-linux-gnu/libgcc_s.so failed
attempt to open //lib/i386-linux-gnu/libgcc_s.a failed
attempt to open //lib32/libgcc_s.so failed
attempt to open //lib32/libgcc_s.a failed
attempt to open //usr/lib/i386-linux-gnu/libgcc_s.so failed
attempt to open //usr/lib/i386-linux-gnu/libgcc_s.a failed
attempt to open //usr/lib32/libgcc_s.so failed
attempt to open //usr/lib32/libgcc_s.a failed
attempt to open //usr/local/lib/libgcc_s.so failed
attempt to open //usr/local/lib/libgcc_s.a failed
attempt to open //lib/libgcc_s.so failed
attempt to open //lib/libgcc_s.a failed
attempt to open //usr/lib/libgcc_s.so failed
attempt to open //usr/lib/libgcc_s.a failed
attempt to open /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/libgcc.so failed
attempt to open /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/libgcc.a succeeded
attempt to open
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../i386-linux-gnu/libgcc.so
failed
attempt to open
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../i386-linux-gnu/libgcc.a
failed
attempt to open
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../lib32/libgcc.so
failed
attempt to open
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../lib32/libgcc.a
failed
attempt to open /usr/bin/../lib/i386-linux-gnu/libgcc.so failed
attempt to open /usr/bin/../lib/i386-linux-gnu/libgcc.a failed
attempt to open /usr/bin/../lib32/libgcc.so failed
attempt to open /usr/bin/../lib32/libgcc.a failed
attempt to open /lib/i386-linux-gnu/libgcc.so failed
attempt to open /lib/i386-linux-gnu/libgcc.a failed
attempt to open /lib/../lib32/libgcc.so failed
attempt to open /lib/../lib32/libgcc.a failed
attempt to open /usr/lib/i386-linux-gnu/libgcc.so failed
attempt to open /usr/lib/i386-linux-gnu/libgcc.a failed
attempt to open /usr/lib/../lib32/libgcc.so failed
attempt to open /usr/lib/../lib32/libgcc.a failed
attempt to open /usr/lib/x86_64-linux-gnu/../../lib32/libgcc.so failed
attempt to open /usr/lib/x86_64-linux-gnu/../../lib32/libgcc.a failed
attempt to open
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../libgcc.so failed
attempt to open
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../libgcc.a failed
attempt to open /usr/bin/../lib/libgcc.so failed
attempt to open /usr/bin/../lib/libgcc.a failed
attempt to open /lib/libgcc.so failed
attempt to open /lib/libgcc.a failed
attempt to open /usr/lib/libgcc.so failed
attempt to open /usr/lib/libgcc.a failed
attempt to open /usr/i386-linux-gnu/lib32/libgcc.so failed
attempt to open /usr/i386-linux-gnu/lib32/libgcc.a failed
attempt to open /usr/x86_64-linux-gnu/lib32/libgcc.so failed
attempt to open /usr/x86_64-linux-gnu/lib32/libgcc.a failed
attempt to open //usr/local/lib/i386-linux-gnu/libgcc.so failed
attempt to open //usr/local/lib/i386-linux-gnu/libgcc.a failed
attempt to open //usr/local/lib32/libgcc.so failed
attempt to open //usr/local/lib32/libgcc.a failed
attempt to open //lib/i386-linux-gnu/libgcc.so failed
attempt to open //lib/i386-linux-gnu/libgcc.a failed
attempt to open //lib32/libgcc.so failed
attempt to open //lib32/libgcc.a failed
attempt to open //usr/lib/i386-linux-gnu/libgcc.so failed
attempt to open //usr/lib/i386-linux-gnu/libgcc.a failed
attempt to open //usr/lib32/libgcc.so failed
attempt to open //usr/lib32/libgcc.a failed
attempt to open //usr/local/lib/libgcc.so failed
attempt to open //usr/local/lib/libgcc.a failed
attempt to open //lib/libgcc.so failed
attempt to open //lib/libgcc.a failed
attempt to open //usr/lib/libgcc.so failed
attempt to open //usr/lib/libgcc.a failed
clang: error: linker command failed with exit code 1 (use -v to see invocation)
More information about the cfe-users
mailing list