[Bug 1025863] New: clang++ assumes gccN-c++ is available
http://bugzilla.opensuse.org/show_bug.cgi?id=1025863 Bug ID: 1025863 Summary: clang++ assumes gccN-c++ is available Classification: openSUSE Product: openSUSE Distribution Version: Leap 42.2 Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Development Assignee: bnc-team-screening@forge.provo.novell.com Reporter: rguenther@suse.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- I get
g++ -S t.C clang++ -S t.C t.C:1:10: fatal error: 'iostream' file not found #include <iostream> ^ 1 error generated.
which is because clang seems to search for installed compilers: stat("/usr/bin/../lib64/gcc/x86_64-suse-linux/4.8", {st_mode=S_IFDIR|0755, st_si ze=1234, ...}) = 0 stat("/usr/bin/../lib64/gcc/x86_64-suse-linux/4.8/64/crtbegin.o", 0x7ffe7d06f550 ) = -1 ENOENT (No such file or directory) stat("/usr/bin/../lib64/gcc/x86_64-suse-linux/4.8/crtbegin.o", {st_mode=S_IFREG| 0644, st_size=2712, ...}) = 0 ... stat("/usr/bin/../lib64/gcc/x86_64-suse-linux/6", {st_mode=S_IFDIR|0755, st_size =1356, ...}) = 0 stat("/usr/bin/../lib64/gcc/x86_64-suse-linux/6/64/crtbegin.o", 0x7ffe7d06f550) = -1 ENOENT (No such file or directory) stat("/usr/bin/../lib64/gcc/x86_64-suse-linux/6/crtbegin.o", {st_mode=S_IFREG|0644, st_size=2736, ...}) = 0 ... stat("/usr/bin/../lib64/gcc/x86_64-suse-linux/5", {st_mode=S_IFDIR|0755, st_size=1364, ...}) = 0 stat("/usr/bin/../lib64/gcc/x86_64-suse-linux/7", {st_mode=S_IFDIR|0755, st_size=1296, ...}) = 0 stat("/usr/bin/../lib64/gcc/x86_64-suse-linux/7/64/crtbegin.o", 0x7ffe7d06f550) = -1 ENOENT (No such file or directory) stat("/usr/bin/../lib64/gcc/x86_64-suse-linux/7/crtbegin.o", {st_mode=S_IFREG|0644, st_size=2488, ...}) = 0 and then, without further checking, assumes the "newest" also provides libstdc++ headers: stat("/usr/bin/../lib64/gcc/x86_64-suse-linux/7/../../../../include/c++/7", 0x7f fe7d06ea10) = -1 ENOENT (No such file or directory) stat("/usr/bin/../lib64/gcc/x86_64-suse-linux/7/include/g++-v7.", 0x7ffe7d06ea10 ) = -1 ENOENT (No such file or directory) stat("/usr/bin/../lib64/gcc/x86_64-suse-linux/7/include/g++-v7", 0x7ffe7d06ea10) = -1 ENOENT (No such file or directory) stat("/usr/bin/../lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/in clude/c++/7", 0x7ffe7d06ea10) = -1 ENOENT (No such file or directory) stat("/usr/bin/../lib64/gcc/x86_64-suse-linux/7/../../../../include/c++", {st_mode=S_IFDIR|0755, st_size=14, ...}) = 0 to bad, while I have gcc7 installed I did not install gcc7-c++. I find the behavior confusing (the error reporting even more so) and would have expected the SUSE clang++ uses the system compilers standard library. Note that llvm-clang doesn't even require any installed libstdc++ headers so w/o installing gcc-c++ the error message would be similarly cryptic. Just checked Leap 42.2 where I ran into it, might be fixed in Tumbleweed (but I guess not as the above looks like upstream behavior) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1025863
http://bugzilla.opensuse.org/show_bug.cgi?id=1025863#c3
--- Comment #3 from Michal Srb
http://bugzilla.opensuse.org/show_bug.cgi?id=1025863
http://bugzilla.opensuse.org/show_bug.cgi?id=1025863#c5
--- Comment #5 from Michal Srb
participants (1)
-
bugzilla_noreply@novell.com