You have been subscribed to a public bug:

Since 15.04, people trying to use clang++ as their compiler fail linking
due to different mangling schemes (ABI versions) between clang-3.8 and
g++.

In Ubuntu 16.04 libboost-* packages are all compiled with g++ 5.x.

So trying to use clang++ to link with them fails with undefined symbols.
Here's one example of such error:

./libvw.a(parse_args.o): In function
`boost::program_options::typed_value<unsigned long, char>::name()
const': parse_args.cc:
.text._ZNK5boost15program_options11typed_valueImcE4nameEv[_ZNK5boost15program_options11typed_valueImcE4nameEv]+0x27):
undefined reference to `boost::program_options::arg'


This is a regression. Binaries compiled with clang++ used to be compatible with 
binaries compiled with gcc/g++.

All the details can be found in the upstream bug here:

   https://llvm.org/bugs/show_bug.cgi?id=23529

A patch was released back in March 23 2016 which so far has been working
well for early testers.

Why this bug should get more attention?

In my experience, clang on 12.04 was about 2x faster than g++ in compile
times and its generated code up to 6% faster than code generated by the
g++ toolchain (for my application, vowpal-wabbit).  So I switched to
clang.  The moment I upgraded to LTS (16.04) I discovered I can no
longer use clang on Ubuntu.  Essentially, the clang shipped with Ubuntu
16.04 LTS is no longer working with the shipped boost libraries
rendering clang on 16.04 pretty useless.

I'm opening this bug on launchpad to increase visibility into the
problem and help accelerate the integration of this patch into Ubuntu.

** Affects: llvm-toolchain-3.8 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: abi clang++ g++ libboost
-- 
clang 3.8 incompatibility with boost since 15.04
https://bugs.launchpad.net/bugs/1606355
You received this bug notification because you are a member of Desktop 
Packages, which is subscribed to llvm-toolchain-3.8 in Ubuntu.

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to