[Bug 1026359] Re: clang -O4 -use-gold-plugin fails (LLVMgold.so: undefined symbol: lto_codegen_compile_to_file)
Dmitrijs Ledkovs
launchpad at surgut.co.uk
Tue Aug 28 15:32:12 UTC 2012
To build the source package, I had to further modify the source file of
the generated control file....
diff -Nru llvm-3.1-3.1/debian/control.in/source llvm-3.1-3.1/debian/control.in/source
--- llvm-3.1-3.1/debian/control.in/source 2012-04-19 19:45:00.000000000 +0100
+++ llvm-3.1-3.1/debian/control.in/source 2012-08-28 15:15:09.000000000 +0100
@@ -1,7 +1,8 @@
Source: @PKGSOURCE@
Section: devel
Priority: optional
-Maintainer: LLVM Packaging Team <pkg-llvm-team at lists.alioth.debian.org>
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss at lists.ubuntu.com>
+XSBC-Original-Maintainer: LLVM Packaging Team <pkg-llvm-team at lists.alioth.debian.org>
Uploaders: Arthur Loiret <aloiret at debian.org>, Sylvestre Ledru <sylvestre at debian.org>
Build-Depends: debhelper (>= 8.1.3), flex, bison, dejagnu, tcl8.5, expect,
autoconf, automake1.9, perl, libtool, doxygen, chrpath, texinfo, quilt,
--
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1026359
Title:
clang -O4 -use-gold-plugin fails (LLVMgold.so: undefined symbol:
lto_codegen_compile_to_file)
Status in The Low Level Virtual Machine Compiler Infrastructure:
Confirmed
Status in “llvm-3.0” package in Ubuntu:
Fix Released
Status in “llvm-3.1” package in Ubuntu:
Fix Released
Bug description:
$ echo 'int main(){return 0;}' > foo.c
$ clang -O4 -use-gold-plugin foo.c
/usr/bin/ld.gold.real: error: /usr/bin/../lib/LLVMgold.so: could not load plugin library: /usr/bin/../lib/LLVMgold.so: undefined symbol: lto_codegen_compile_to_file
/usr/bin/ld.gold.real: error: /tmp/foo-KzG9X9.o:1:3: invalid character
/usr/bin/ld.gold.real: error: /tmp/foo-KzG9X9.o:1:3: syntax error, unexpected $end
/usr/bin/ld.gold.real: error: /tmp/foo-KzG9X9.o: not an object or archive
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crt1.o(.text+0x20): error: undefined reference to 'main'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
$ ld.gold -v -plugin /usr/lib/llvm-3.0/lib/LLVMgold.so
GNU gold (GNU Binutils for Ubuntu 2.22.52.20120713) 1.11
/usr/bin/ld.gold.real: error: /usr/lib/llvm-3.0/lib/LLVMgold.so: could not load plugin library: /usr/lib/llvm-3.0/lib/LLVMgold.so: undefined symbol: lto_codegen_compile_to_file
It seems that LLVMgold.so is missing a dependency on libLTO.so.
Things work if I set that as an LD_PRELOAD.
ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: llvm-3.0-dev 3.0-9
ProcVersionSignature: Ubuntu 3.5.0-4.4-generic 3.5.0-rc6
Uname: Linux 3.5.0-4-generic x86_64
NonfreeKernelModules: openafs nvidia
ApportVersion: 2.4-0ubuntu2
Architecture: amd64
Date: Wed Jul 18 18:20:18 2012
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha amd64 (20101202)
SourcePackage: llvm-3.0
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/llvm/+bug/1026359/+subscriptions
More information about the Ubuntu-sponsors
mailing list