clang is unable to link binaries/libraries
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
clang (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
*compiling* a simple test program such as this
int
main ()
{
;
return 0;
}
works out fine:
$ clang -v -c conftest.c
clang version 2.9 (tags/RELEASE_
Target: x86_64-pc-linux-gnu
Thread model: posix
"/usr/bin/clang" -cc1 -triple x86_64-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-
clang -cc1 version 2.9 based upon llvm 2.9 hosted on x86_64-pc-linux-gnu
ignoring duplicate directory "/usr/include/
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/include/
/usr/bin/
/usr/include
End of search list.
$
Linking it however, does not:
$ clang -v -o conftest conftest.o
clang version 2.9 (tags/RELEASE_
Target: x86_64-pc-linux-gnu
Thread model: posix
"/usr/bin/ld" --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/
/usr/bin/
/usr/bin/
/usr/bin/
/usr/bin/
/usr/bin/
clang: error: linker command failed with exit code 1 (use -v to see invocation)
$
I am currently rebuilding clang/llvm-2.9 to verify if the information I found on the internet is true:
"gcc used to build clang is not in a standard location" http://
ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: clang 2.9-8
ProcVersionSign
Uname: Linux 3.0.0-11-generic x86_64
NonfreeKernelMo
ApportVersion: 1.22.1-0ubuntu2
Architecture: amd64
Date: Sun Sep 18 00:11:38 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
ProcEnviron:
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/usr/bin/zsh
SourcePackage: clang
UpgradeStatus: Upgraded to oneiric on 2011-07-14 (65 days ago)
nope, even after my rebuild of the package, the only thing it does manage to find is -lc