Skip to content

The llvm+clang c++ compiler cannot find -lstdc++ #5942

@certik

Description

@certik

I installed llvm+clang, but the c++ compiler does not work:

$ clang++ a.c 
clang-5.0: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
/usr/bin/ld: cannot find -lstdc++
clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)

This error in turn causes #5941. Here is how it was configured:

$ spack find -dlv [email protected]
==> 1 installed packages.
-- linux-ubuntu16.04-x86_64 / [email protected] -------------------------
vvs4bks    [email protected]+all_targets build_type=Release +clang+compiler-rt+gold+internal_unwind+libcxx~link_dylib+lldb+polly~shared_libs
atc354d        ^[email protected]+gold~libiberty patches=0a0ca84889b6727dc0cc88650f55fd79452dddba762674a83a153374792fdaac ~plugins
z4rue2x            ^[email protected]+bzip2+curses+git~libunistring+libxml2 patches=9acdb4e73f67c241b5ef32505c9ddf7cf6884ca8ea661692f21dca28483b04b8 +tar+xz
bmyxoqb                ^[email protected]+shared
zqliw5y                ^[email protected]~python
2tho6an                    ^[email protected]
yvlwvyz                    ^[email protected]+pic+shared
jtmz6tz                ^[email protected] patches=4110a40613b800da2b2888c352b64c75a82809d48341061e4de5861e8b28423f,f84b2708a42777aadcc7f502a261afe10ca5646a51c1ef8b5e60d2070d926b57 ~symlinks
f3sg6dt                ^[email protected] patches=08921fcbd732050c74ddf1de7d8ad95ffdbc09f8b4342456fa2f6a0dd02a957c,5c314db58d005043bf407abaf25eb9823b9032a22fd12a0b142d4bf548130fa4,d428578be7fb99b831eb61e53b8d88a859afe08b479a21238180899707d79ce4,e34d2470461037933737c0a60fbcc5d5ea905fefb6b414b4a2e88a440fcae23a
hrqaevt        ^[email protected]
nreklkn        ^[email protected]
n6pbabv            ^[email protected] patches=123082ab3483ded78e86d7c809e98a804b3465b4683c96bd79a2fd799f572244 +pic+shared~tk~ucs4
ztgs5rp                ^[email protected]
323dute                ^[email protected]
25axhq6                ^[email protected]
ljvueky        ^[email protected]
nx2htpr            ^[email protected]~jit+utf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions