Bug 18202 - clang does not find gcc standard libs
Summary: clang does not find gcc standard libs
Status: RESOLVED DUPLICATE of bug 18138
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal major
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-14 14:42 CEST by Juan Magallon
Modified: 2016-04-14 14:46 CEST (History)
1 user (show)

See Also:
Source RPM: clang-3.8.0-9.mga6.src.rpm
CVE:
Status comment:


Attachments

Description Juan Magallon 2016-04-14 14:42:41 CEST
Current clang-3.8 seems to have a problem, it does not find the standard C++
headers/libs:

pandora:~/tmp> cat h.cc
#include <iostream>

int main()
{
    std::cout << "Hi" << std::endl;

    return 0;
}

pandora:~/tmp> clang++ -o h h.cc
h.cc:1:10: fatal error: 'iostream' file not found
#include <iostream>
          ^
1 error generated.

andora:~/tmp> clang++ -x c++ -v -E - < /dev/null
clang version 3.8.0 (tags/RELEASE_380/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
  "/usr/bin/clang-3.8" -cc1 -triple x86_64-unknown-linux-gnu -E -disable-free -disable-llvm-verifier -main-file-name - -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -v -dwarf-column-info -debugger-tuning=gdb -resource-dir /usr/bin/../lib64/clang/3.8.0 -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib64/clang/3.8.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdeprecated-macro -fdebug-compilation-dir /home/magallon/tmp -ferror-limit 19 -fmessage-length 103 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -o - -x c++ -
clang -cc1 version 3.8.0 based upon LLVM 3.8.0 default target x86_64-unknown-linux-gnu
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
  /usr/local/include
  /usr/bin/../lib64/clang/3.8.0/include
  /usr/include
End of search list.
# 1 "<stdin>"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 325 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "<stdin>" 2

Paths for /usr/include/c++/5.3.1 or /lib/gcc/x86_64-mageia-linux-gnu/5.3.1/include are missing.
Comment 1 Juan Magallon 2016-04-14 14:43:41 CEST
In fact, it cat neither find libraries.
With an empty C++ souce like:

int main()
{
	return 0;
}

it also fails:

werewolf:~/tmp> clang++ -o t t.cc
/usr/bin/ld: cannot find crtbegin.o: No such file or directory
/usr/bin/ld: cannot find -lstdc++
clang-3.8: error: linker command failed with exit code 1 (use -v to see invocation)

CC: (none) => jamagallon

Comment 2 Rémi Verschelde 2016-04-14 14:46:08 CEST
Duplicate of 18138.

*** This bug has been marked as a duplicate of bug 18138 ***

Status: NEW => RESOLVED
Resolution: (none) => DUPLICATE


Note You need to log in before you can comment on or make changes to this bug.