Public bug reported:

We have third party libraries that worked fine on Ubuntu 15.04 x86_64
using boost1.55 and gcc-4.9.2.

These libraries (we do not have access to the source, so recompiling is
not an option) rely on the old ABI for std::string

On 15.10, if we disable the CXX11 ABI, we get a linker error when
linking against boost libraries.

I am attaching sample code to reproduce the issue.

# this works fine
g++ -o main main.cc -lboost_program_options

# this does not
g++ -o main main.cc -lboost_program_options  -D_GLIBCXX_USE_CXX11_ABI=0

alex@wily:~$ g++ -o main main.cc -lboost_program_options  
-D_GLIBCXX_USE_CXX11_ABI=0
/tmp/ccVJh1if.o: In function `main':
main.cc:(.text+0x8f): undefined reference to 
`boost::program_options::options_description::options_description(std::string 
const&, unsigned int, unsigned int)'
/tmp/ccVJh1if.o:(.rodata._ZTVN5boost15program_options11typed_valueISscEE[_ZTVN5boost15program_options11typed_valueISscEE]+0x38):
 undefined reference to 
`boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&,
 std::vector<std::string, std::allocator<std::string> > const&, bool) const'
/tmp/ccVJh1if.o: In function `boost::program_options::typed_value<std::string, 
char>::name() const':
main.cc:(.text._ZNK5boost15program_options11typed_valueISscE4nameEv[_ZNK5boost15program_options11typed_valueISscE4nameEv]+0x35):
 undefined reference to `boost::program_options::arg'
/tmp/ccVJh1if.o: In function `boost::program_options::typed_value<std::string, 
char>::xparse(boost::any&, std::vector<std::string, std::allocator<std::string> 
> const&) const':
main.cc:(.text._ZNK5boost15program_options11typed_valueISscE6xparseERNS_3anyERKSt6vectorISsSaISsEE[_ZNK5boost15program_options11typed_valueISscE6xparseERNS_3anyERKSt6vectorISsSaISsEE]+0xa9):
 undefined reference to `boost::program_options::validate(boost::any&, 
std::vector<std::string, std::allocator<std::string> > const&, std::string*, 
int)'
collect2: error: ld returned 1 exit status

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: libboost1.58-dev 1.58.0+dfsg-3.1ubuntu1
ProcVersionSignature: Ubuntu 4.2.0-16.19-generic 4.2.3
Uname: Linux 4.2.0-16-generic x86_64
ApportVersion: 2.19.1-0ubuntu4
Architecture: amd64
Date: Tue Nov 10 15:04:35 2015
Dependencies:
 
InstallationDate: Installed on 2015-11-09 (0 days ago)
InstallationMedia: Ubuntu-Server 15.10 "Wily Werewolf" - Release amd64 
(20151021)
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: boost1.58
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: boost1.58 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug wily

** Attachment added: "Sample code to demonstrate the issue"
   https://bugs.launchpad.net/bugs/1514717/+attachment/4515915/+files/main.cc

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1514717

Title:
  linker error when disabling CXX11_ABI

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/boost1.58/+bug/1514717/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to