[Bug 1026359] Re: clang -O4 -use-gold-plugin fails (LLVMgold.so: undefined symbol: lto_codegen_compile_to_file)

Launchpad Bug Tracker 1026359 at bugs.launchpad.net
Mon Aug 27 19:46:10 UTC 2012


Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: llvm-3.1 (Ubuntu)
       Status: New => Confirmed

-- 
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:
  Confirmed

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