desktop-packages team mailing list archive
-
desktop-packages team
-
Mailing list archive
-
Message #133178
[Bug 1488254] [NEW] clang++ no longer ABI-compatible with g++
Public bug reported:
$ 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.
** Affects: llvm
Importance: Unknown
Status: Unknown
** Affects: llvm-toolchain-3.6 (Ubuntu)
Importance: Undecided
Status: New
** Bug watch added: llvm.org/bugs/ #23529
http://llvm.org/bugs/show_bug.cgi?id=23529
** Also affects: llvm via
http://llvm.org/bugs/show_bug.cgi?id=23529
Importance: Unknown
Status: Unknown
--
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to llvm-toolchain-3.6 in Ubuntu.
https://bugs.launchpad.net/bugs/1488254
Title:
clang++ no longer ABI-compatible with g++
Status in LLVM:
Unknown
Status in llvm-toolchain-3.6 package in Ubuntu:
New
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
Follow ups
-
[Bug 1488254]
From: Lighttpd-2, 2016-02-19
-
[Bug 1488254]
From: Dmitry-polukhin, 2016-02-19
-
[Bug 1488254]
From: Dmitry-polukhin, 2016-02-05
-
[Bug 1488254]
From: Andreybokhanko, 2016-02-05
-
[Bug 1488254]
From: Renato Golin, 2016-02-05
-
[Bug 1488254]
From: David-abdurachmanov, 2016-02-05
-
[Bug 1488254]
From: Yaron-keren, 2016-02-05
-
[Bug 1488254]
From: Lighttpd-2, 2016-02-05
-
[Bug 1488254]
From: Yaron-keren, 2016-01-29
-
[Bug 1488254]
From: Andreybokhanko, 2016-01-29
-
[Bug 1488254]
From: Hfinkel, 2016-01-22
-
[Bug 1488254]
From: Renato Golin, 2016-01-22
-
[Bug 1488254]
From: Bero-b, 2016-01-22
-
[Bug 1488254]
From: Renato Golin, 2016-01-22
-
[Bug 1488254]
From: Lighttpd-2, 2016-01-22
-
[Bug 1488254]
From: Renato Golin, 2016-01-22
-
[Bug 1488254]
From: Lighttpd-2, 2016-01-22
-
[Bug 1488254]
From: Andrey Vihrov, 2016-01-22
-
[Bug 1488254]
From: Renato Golin, 2016-01-22
-
[Bug 1488254]
From: Octoploid, 2016-01-22
-
[Bug 1488254]
From: Renato Golin, 2016-01-22
-
[Bug 1488254]
From: Lighttpd-2, 2016-01-22
-
[Bug 1488254]
From: Octoploid, 2016-01-22
-
[Bug 1488254]
From: Lighttpd-2, 2016-01-22
-
[Bug 1488254]
From: Renato Golin, 2016-01-22
-
[Bug 1488254]
From: Stephan-bergmann-secondary, 2016-01-22
-
[Bug 1488254]
From: Octoploid, 2016-01-22
-
[Bug 1488254]
From: Renato Golin, 2016-01-22
-
[Bug 1488254]
From: Octoploid, 2016-01-22
-
[Bug 1488254]
From: Renato Golin, 2016-01-22
-
[Bug 1488254]
From: Hfinkel, 2016-01-22
-
[Bug 1488254]
From: James-molloy-u, 2016-01-22
-
[Bug 1488254]
From: Giacomopoz, 2016-01-22
-
[Bug 1488254]
From: Renato Golin, 2016-01-22
-
[Bug 1488254]
From: Tim Jones, 2016-01-22
-
[Bug 1488254]
From: Daniel-f-starke, 2016-01-22
-
[Bug 1488254]
From: T-hans, 2016-01-22
-
[Bug 1488254]
From: Steven Noonan, 2015-12-18
-
[Bug 1488254]
From: İsmail Dönmez, 2015-12-04
-
[Bug 1488254]
From: Rnk, 2015-12-04
-
[Bug 1488254]
From: Benzejaa, 2015-11-20
-
[Bug 1488254] Re: clang++ no longer ABI-compatible with g++ in wily
From: Daniel van Vugt, 2015-10-27
-
[Bug 1488254] Re: clang++ no longer ABI-compatible with g++ in wily
From: Launchpad Bug Tracker, 2015-10-27
-
[Bug 1488254] Re: clang++ no longer ABI-compatible with g++ in wily
From: Daniel van Vugt, 2015-10-27
-
[Bug 1488254]
From: Lighttpd-2, 2015-10-02
-
[Bug 1488254]
From: Lighttpd-2, 2015-09-13
-
[Bug 1488254]
From: Lighttpd-2, 2015-09-13
-
[Bug 1488254]
From: Lighttpd-2, 2015-09-13
-
[Bug 1488254]
From: Richard-llvm, 2015-09-13
-
[Bug 1488254]
From: Lighttpd-2, 2015-09-13
-
[Bug 1488254]
From: Lighttpd-2, 2015-09-08
-
[Bug 1488254] Re: clang++ no longer ABI-compatible with g++
From: Bug Watch Updater, 2015-08-24