https://bugzilla.novell.com/show_bug.cgi?id=893359 https://bugzilla.novell.com/show_bug.cgi?id=893359#c2 --- Comment #2 from Josua Mayer <josua.m@t-online.de> 2014-09-12 14:22:24 UTC --- Thanks for taking a look at this report; So I first started with clang on 13.1, C-Code: clang -v -mfloat-abi=hard -o helloworld helloworld.c clang version 3.3 (branches/release_33 183898) Target: armv7l-unknown-linux-gnueabi Thread model: posix "/usr/bin/clang-3.3" -cc1 -triple armv7-unknown-linux-gnueabi -S -disable-free -disable-llvm-verifier -main-file-name helloworld.c -mrelocation-model static -mdisable-fp-elim -fmath-errno -mconstructor-aliases -target-abi aapcs-linux -target-cpu cortex-a8 -mfloat-abi hard -v -resource-dir /usr/bin/../lib/clang/3.3 -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/clang/3.3/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -fno-dwarf-directory-asm -fdebug-compilation-dir /home/josua -ferror-limit 19 -fmessage-length 180 -mstackrealign -fno-signed-char -fobjc-runtime=gcc -fobjc-default-synthesize-properties -fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops -o /tmp/helloworld-4PwlKk.s -x c helloworld.c clang -cc1 version 3.3 based upon LLVM 3.3svn default target armv7l-unknown-linux-gnueabi ignoring nonexistent directory "/include" #include "..." search starts here: #include <...> search starts here: /usr/local/include /usr/bin/../lib/clang/3.3/include /usr/include End of search list. "/usr/bin/as" -mfloat-abi=hard -o /tmp/helloworld-82tOzv.o /tmp/helloworld-4PwlKk.s "/usr/bin/ld" -z relro -X --hash-style=gnu --hash-style=both --build-id --enable-new-dtags --eh-frame-hdr -m armelf_linux_eabi -dynamic-linker /lib/ld-linux.so.3 -o helloworld /usr/lib/crt1.o /usr/lib/crti.o crtbegin.o -L/lib -L/usr/lib /tmp/helloworld-82tOzv.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed crtend.o /usr/lib/crtn.o /usr/bin/ld: cannot find crtbegin.o: Datei oder Verzeichnis nicht gefunden /usr/bin/ld: cannot find -lgcc /usr/bin/ld: cannot find -lgcc_s clang-3.3: error: linker command failed with exit code 1 (use -v to see invocation) But now to the C++ part and libstdc++. I first thought that too, but according to zypper both libstdc++48-devel and libstdc++-devel are installed. After all, g++ can compile it fine on the same system. Anyway, here comes the -v output: clang++ -v -mfloat-abi=hard -o helloworld helloworld.cpp clang version 3.3 (branches/release_33 183898) Target: armv7l-unknown-linux-gnueabi Thread model: posix "/usr/bin/clang-3.3" -cc1 -triple armv7-unknown-linux-gnueabi -S -disable-free -disable-llvm-verifier -main-file-name helloworld.cpp -mrelocation-model static -mdisable-fp-elim -fmath-errno -mconstructor-aliases -target-abi aapcs-linux -target-cpu cortex-a8 -mfloat-abi hard -v -resource-dir /usr/bin/../lib/clang/3.3 -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/clang/3.3/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdeprecated-macro -fno-dwarf-directory-asm -fdebug-compilation-dir /home/josua -ferror-limit 19 -fmessage-length 180 -mstackrealign -fno-signed-char -fobjc-runtime=gcc -fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops -o /tmp/helloworld-dwtb3F.s -x c++ helloworld.cpp clang -cc1 version 3.3 based upon LLVM 3.3svn default target armv7l-unknown-linux-gnueabi ignoring nonexistent directory "/include" #include "..." search starts here: #include <...> search starts here: /usr/local/include /usr/bin/../lib/clang/3.3/include /usr/include End of search list. helloworld.cpp:1:10: fatal error: 'iostream' file not found #include <iostream> ^ 1 error generated. Here is the result on x86_64 where it works fine. The first look shows that /usr/include/c++ is missing on arm, but present as a relative path to gcc on x86_64. clang++ -v -o helloworld helloworld.cpp clang version 3.3 (branches/release_33 183898) Target: x86_64-suse-linux Thread model: posix "/usr/bin/clang-3.3" -cc1 -triple x86_64-suse-linux -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name helloworld.cpp -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -v -resource-dir /usr/bin/../lib64/clang/3.3 -internal-isystem /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../include/c++/4.8 -internal-isystem /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../include/c++/4.8/x86_64-suse-linux -internal-isystem /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../include/c++/4.8/backward -internal-isystem /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../include/x86_64-suse-linux/c++/4.8 -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib64/clang/3.3/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdeprecated-macro -fdebug-compilation-dir /home/josua -ferror-limit 19 -fmessage-length 180 -mstackrealign -fobjc-runtime=gcc -fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops -o /tmp/helloworld-3L6cof.o -x c++ helloworld.cpp clang -cc1 version 3.3 based upon LLVM 3.3svn default target x86_64-suse-linux ignoring nonexistent directory "/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../include/x86_64-suse-linux/c++/4.8" ignoring nonexistent directory "/include" #include "..." search starts here: #include <...> search starts here: /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../include/c++/4.8 /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../include/c++/4.8/x86_64-suse-linux /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../include/c++/4.8/backward /usr/local/include /usr/bin/../lib64/clang/3.3/include /usr/include End of search list. "/usr/bin/ld" -z relro --hash-style=gnu --hash-style=both --build-id --enable-new-dtags --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o helloworld /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/crt1.o /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/crti.o /usr/lib64/gcc/x86_64-suse-linux/4.8/crtbegin.o -L/usr/lib64/gcc/x86_64-suse-linux/4.8 -L/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.8/../../.. -L/lib -L/usr/lib /tmp/helloworld-3L6cof.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib64/gcc/x86_64-suse-linux/4.8/crtend.o /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/crtn.o By adding c++-pathcs to the commandline I can get to the same result as the c-code: clang++ -v -mfloat-abi=hard -I/usr/include/c++/4.8/ -I/usr/include/c++/4.8/armv7hl-suse-linux-gnueabi/ -o helloworld helloworld.cpp Now errors look equal to compiling helloworld.c. I also tested on opensuse-factory in a chroot (clang version 3.4.2 (tags/RELEASE_342/final 213642) ) with the same results. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.