[Bug 1488254] Re: clang++ no longer ABI-compatible with g++

Launchpad Bug Tracker 1488254 at bugs.launchpad.net
Sun Aug 7 17:01:54 UTC 2016


*** This bug is a duplicate of bug 1510042 ***
    https://bugs.launchpad.net/bugs/1510042

This bug was fixed in the package llvm-toolchain-3.8 - 1:3.8.1-7ubuntu2

---------------
llvm-toolchain-3.8 (1:3.8.1-7ubuntu2) yakkety; urgency=medium

  * Ignore test results on i386, as done on any other architecture.
  * Don't use gold on powerpc, not supporting secure-plt.

 -- Matthias Klose <doko at ubuntu.com>  Sun, 07 Aug 2016 12:45:46 +0200

** Changed in: llvm-toolchain-3.8 (Ubuntu)
       Status: Confirmed => Fix Released

-- 
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/1488254

Title:
  clang++ no longer ABI-compatible with g++

Status in LLVM:
  Confirmed
Status in llvm-toolchain-3.6 package in Ubuntu:
  Confirmed
Status in llvm-toolchain-3.8 package in Ubuntu:
  Fix Released

Bug description:
  $ cat foo.cc
  #include <string>
  std::string hello = "Hello, world!\n";
  $ cat bar.cc
  #include <string>
  #include <iostream>
  extern std::string hello;
  int main() {
      std::cout << hello;
      return 0;
  }
  $ g++ -c foo.cc && g++ foo.o bar.cc && ./a.out
  Hello, world!
  $ clang++ -c foo.cc && clang++ foo.o bar.cc && ./a.out
  Hello, world!
  $ g++ -c foo.cc && clang++ foo.o bar.cc && ./a.out
  /tmp/bar-34fb23.o: In function `main':
  bar.cc:(.text+0x14): undefined reference to `hello'
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  $ clang++ -c foo.cc && g++ foo.o bar.cc && ./a.out
  /tmp/ccqU38Mh.o: In function `main':
  bar.cc:(.text+0x5): undefined reference to `hello[abi:cxx11]'
  collect2: error: ld returned 1 exit status

  In practice, this means that many programs using C++ libraries other
  than libstdc++ fail to compile with clang++. For example, mosh fails
  with undefined references to
  google::protobuf::internal::empty_string_,
  google::protobuf::MessageLite::InitializationErrorString() const, and
  google::protobuf::MessageLite::SerializeAsString() const.

To manage notifications about this bug go to:
https://bugs.launchpad.net/llvm/+bug/1488254/+subscriptions



More information about the Ubuntu-sponsors mailing list