clang 3.8 incompatibility with boost since 15.04

Bug #1606355 reported by Ariel Faigon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
llvm-toolchain-3.8 (Ubuntu)
New
Undecided
Unassigned

Bug Description

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.

Revision history for this message
Ariel Faigon (ariel.faigon) wrote :

Oops, sorry for the 'geany' package setting. Fixing this to clang-3.8

affects: geany (Ubuntu) → llvm-toolchain-3.8 (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.