desktop-packages team mailing list archive
-
desktop-packages team
-
Mailing list archive
-
Message #133194
[Bug 1488254] Re: clang++ no longer ABI-compatible with g++
Launchpad has imported 7 comments from the remote bug at
https://llvm.org/bugs/show_bug.cgi?id=23529.
If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.
------------------------------------------------------------------------
On 2015-05-14T21:23:35+00:00 Bero-b wrote:
With the release of gcc 5.1, libstdc++ has started using the abi_tag
attribute.
The attribute is documented here:
https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Attributes.html
Its use in libstdc++ and effects on ABI compatibility between gcc and clang are pointed out here:
https://gcc.gnu.org/ml/gcc-patches/2015-04/msg00153.html
It would be great if clang could support the abi_tag attribute and
remain abi compatible with gcc.
Reply at: https://bugs.launchpad.net/ubuntu/+source/llvm-
toolchain-3.6/+bug/1488254/comments/0
------------------------------------------------------------------------
On 2015-05-15T11:08:15+00:00 Renato Golin wrote:
If I understand the problem, even old GCCs will have such compatibility
issues.
So, what GCC 5 is leading to, is a system that no other compiler can
coexist without supporting abi_tags. This is bad not just for Clang, but
for anyone experimenting with GCC 5 on a system based on 4.x, or
reverting the compiler to work around 5.0 bugs.
If GCC 5 cannot work alongside compilers that don't support abi_tag,
than maybe the abi_tag implementation needs to be reviewed, and
rewritten so that they do.
Reply at: https://bugs.launchpad.net/ubuntu/+source/llvm-
toolchain-3.6/+bug/1488254/comments/1
------------------------------------------------------------------------
On 2015-05-15T11:15:58+00:00 Renato Golin wrote:
I've added a few people to the bug, as this looks like a watershed
moment. I can't grasp the full extent of the problem right now, but I'm
hoping that Clang folks are already aware of the changes in libstdc++
and have a plan. :)
I'd also like to make sure we don't move away from libstdc++ just
because of that. We need to support all mainstream C++ libraries.
Reply at: https://bugs.launchpad.net/ubuntu/+source/llvm-
toolchain-3.6/+bug/1488254/comments/2
------------------------------------------------------------------------
On 2015-05-15T20:39:00+00:00 Richard-llvm wrote:
David has started looking into this. Apparently there are many
implementation bugs on the GCC side (in addition to all the other
problems with this attribute), and it's not yet clear how many of them
we'll need to be compatible with.
Reply at: https://bugs.launchpad.net/ubuntu/+source/llvm-
toolchain-3.6/+bug/1488254/comments/3
------------------------------------------------------------------------
On 2015-05-15T21:13:03+00:00 Tim Northover wrote:
Isn't this precisely the kind of thing cxx-abi-dev exists to make saner?
(Or would have, if it had been used).
Reply at: https://bugs.launchpad.net/ubuntu/+source/llvm-
toolchain-3.6/+bug/1488254/comments/4
------------------------------------------------------------------------
On 2015-06-20T05:32:52+00:00 Zeratul976 wrote:
Is there any update on this? The current ABI incompatibility between the
latest released versions of gcc and clang in their default
configurations is very unfortunate.
Reply at: https://bugs.launchpad.net/ubuntu/+source/llvm-
toolchain-3.6/+bug/1488254/comments/5
------------------------------------------------------------------------
On 2015-08-06T23:19:20+00:00 Jristz wrote:
Any news in this issue?
last real comment was from june and that near 3 months ago.
Reply at: https://bugs.launchpad.net/ubuntu/+source/llvm-
toolchain-3.6/+bug/1488254/comments/6
** Changed in: llvm
Status: Unknown => Confirmed
** Changed in: llvm
Importance: Unknown => Medium
--
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:
Confirmed
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
References