unresolved symbols using bfd linker

Bug #1415317 reported by Jerry Quinn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
binutils (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Linking a c++ program gets unresolved symbols using the default bfd linker. Switching to gold solves the problem.

* Linking with gold

jlquinn@tiamat:~/mt/libanalytic/src/lid$ g++ -fuse-ld=gold -L/home/jlquinn/mt/lib/x86_64/opt -o /home/jlquinn/mt/bin/x86_64/opt/lidTester /home/jlquinn/mt/obj/x86_64/opt/libanalytic/src/lid/lidTester.o -L/home/jlquinn/mt/lib/x86_64/opt -llid -lmaxent -llm -lACEcommon -lboost_iostreams -lboost_thread -lboost_system -lpthread -licuio -licuuc -licui18n -licudata -ldl -lcrypto -lyajl -lcurl -lz -lxml2 -lm
jlquinn@tiamat:~/mt/libanalytic/src/lid$

* Linking with bfd

jlquinn@tiamat:~/mt/libanalytic/src/lid$ g++ -L/home/jlquinn/mt/lib/x86_64/opt -o /home/jlquinn/mt/bin/x86_64/opt/lidTester /home/jlquinn/mt/obj/x86_64/opt/libanalytic/src/lid/lidTester.o -L/home/jlquinn/mt/lib/x86_64/opt -llid -lmaxent -llm -lACEcommon -lboost_iostreams -lboost_thread -lboost_system -lpthread -licuio -licuuc -licui18n -licudata -ldl -lcrypto -lyajl -lcurl -lz -lxml2 -lm
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::thread::start_thread_noexcept()'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::thread::detach()'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::detail::thread_data_base::~thread_data_base()'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::iostreams::detail::gzip_footer::reset()'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::iostreams::detail::gzip_header::process(char)'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::iostreams::detail::bzip2_base::do_init(bool, void* (*)(void*, int, int), void (*)(void*, void*), void*)'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::iostreams::detail::gzip_header::reset()'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::thread::native_handle()'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::iostreams::detail::gzip_footer::process(char)'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::iostreams::detail::bzip2_base::end(bool)'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::iostreams::detail::zlib_base::before(char const*&, char const*, char*&, char*)'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::iostreams::zlib_error::check(int)'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::iostreams::zlib::default_compression'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::iostreams::detail::bzip2_base::after(char const*&, char*&)'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::iostreams::detail::zlib_base::do_init(boost::iostreams::zlib_params const&, bool, void* (*)(void*, unsigned int, unsigned int), void (*)(void*, void*), void*)'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::iostreams::zlib::stream_end'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::iostreams::detail::bzip2_base::before(char const*&, char const*, char*&, char*)'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `vtable for boost::detail::thread_data_base'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::iostreams::detail::bzip2_base::check_end(char const*, char const*)'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::iostreams::detail::zlib_base::zlib_base()'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::iostreams::bzip2::stream_end'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::iostreams::bzip2_error::check(int)'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::iostreams::detail::zlib_base::~zlib_base()'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::iostreams::detail::zlib_base::after(char const*&, char*&, bool)'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::iostreams::detail::bzip2_base::~bzip2_base()'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::iostreams::zlib::default_strategy'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `typeinfo for boost::detail::thread_data_base'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::iostreams::zlib::okay'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::iostreams::detail::bzip2_base::bzip2_base(boost::iostreams::bzip2_params const&)'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::iostreams::bzip2::ok'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::thread::join_noexcept()'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::iostreams::detail::zlib_base::reset(bool, bool)'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::iostreams::zlib::sync_flush'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::iostreams::detail::bzip2_base::decompress()'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::iostreams::detail::zlib_base::xinflate(int)'
/home/jlquinn/mt/lib/x86_64/opt/libmaxent.so: undefined reference to `boost::iostreams::zlib::deflated'

jlquinn@tiamat:~$ lsb_release -rd
Description: Ubuntu 14.04.1 LTS
Release: 14.04

jlquinn@tiamat:~$ apt-cache policy binutils
binutils:
  Installed: 2.24-5ubuntu3
  Candidate: 2.24-5ubuntu3
  Version table:
 *** 2.24-5ubuntu3 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: binutils 2.24-5ubuntu3
ProcVersionSignature: Ubuntu 3.13.0-44.73-generic 3.13.11-ckt12
Uname: Linux 3.13.0-44-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.6
Architecture: amd64
CurrentDesktop: Unity
Date: Tue Jan 27 23:56:46 2015
Dependencies:
 gcc-4.9-base 4.9.1-0ubuntu1
 libc6 2.19-0ubuntu6.5
 libgcc1 1:4.9.1-0ubuntu1
 multiarch-support 2.19-0ubuntu6.5
 zlib1g 1:1.2.8.dfsg-1ubuntu1
InstallationDate: Installed on 2014-10-08 (111 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
SourcePackage: binutils
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Jerry Quinn (jlquinn) wrote :
Revision history for this message
Matthias Klose (doko) wrote :

please attach the required objects and/or sources

Changed in binutils (Ubuntu):
status: New → Incomplete
Revision history for this message
Jerry Quinn (jlquinn) wrote :

It's a proprietary application. I'll first try to create a small test case. If that doesn't work, will objects stripped of symbols and debugging be sufficient for looking at the problem?

Revision history for this message
Jerry Quinn (jlquinn) wrote :
Revision history for this message
Jerry Quinn (jlquinn) wrote :
Revision history for this message
Jerry Quinn (jlquinn) wrote :
Revision history for this message
Jerry Quinn (jlquinn) wrote :
Revision history for this message
Jerry Quinn (jlquinn) wrote :
Revision history for this message
Jerry Quinn (jlquinn) wrote :
Download full text (3.8 KiB)

jlquinn@tiamat:~/bug$ g++ -fuse-ld=gold -fPIC -fno-omit-frame-pointer -o lidTester liblid.so libme.so liblm.so libcommon.so -lm -lboost_serialization -lboost_filesystem -lboost_regex -lboost_iostreams -lboost_thread -lboost_system -lpthread -licuio -licui18n -licuuc -licudata

jlquinn@tiamat:~/bug$ g++ -fuse-ld=bfd -fPIC -fno-omit-frame-pointer -o lidTester liblid.so libme.so liblm.so libcommon.so -lm -lboost_serialization -lboost_filesystem -lboost_regex -lboost_iostreams -lboost_thread -lboost_system -lpthread -licuio -licui18n -licuuc -licudata
libme.so: undefined reference to `boost::thread::native_handle()'
libme.so: undefined reference to `boost::iostreams::zlib::deflated'
libme.so: undefined reference to `boost::iostreams::detail::zlib_base::before(char const*&, char const*, char*&, char*)'
libme.so: undefined reference to `boost::iostreams::zlib_error::check(int)'
libme.so: undefined reference to `boost::iostreams::zlib::okay'
libme.so: undefined reference to `boost::iostreams::detail::bzip2_base::decompress()'
libme.so: undefined reference to `boost::iostreams::detail::zlib_base::reset(bool, bool)'
libme.so: undefined reference to `boost::iostreams::detail::gzip_footer::reset()'
libme.so: undefined reference to `boost::iostreams::zlib::stream_end'
libme.so: undefined reference to `typeinfo for boost::detail::thread_data_base'
libme.so: undefined reference to `boost::iostreams::detail::bzip2_base::check_end(char const*, char const*)'
libme.so: undefined reference to `boost::iostreams::detail::zlib_base::xinflate(int)'
libme.so: undefined reference to `boost::iostreams::detail::zlib_base::do_init(boost::iostreams::zlib_params const&, bool, void* (*)(void*, unsigned int, unsigned int), void (*)(void*, void*), void*)'
libme.so: undefined reference to `boost::iostreams::detail::bzip2_base::after(char const*&, char*&)'
libme.so: undefined reference to `boost::iostreams::detail::bzip2_base::before(char const*&, char const*, char*&, char*)'
libme.so: undefined reference to `boost::detail::thread_data_base::~thread_data_base()'
libme.so: undefined reference to `icu_52::RegexPattern::compile(icu_52::UnicodeString const&, unsigned int, UParseError&, UErrorCode&)'
libme.so: undefined reference to `boost::iostreams::detail::zlib_base::zlib_base()'
libme.so: undefined reference to `boost::thread::detach()'
libme.so: undefined reference to `boost::iostreams::detail::gzip_footer::process(char)'
libme.so: undefined reference to `boost::thread::join_noexcept()'
libme.so: undefined reference to `boost::iostreams::detail::bzip2_base::bzip2_base(boost::iostreams::bzip2_params const&)'
libme.so: undefined reference to `boost::iostreams::bzip2_error::check(int)'
libme.so: undefined reference to `boost::iostreams::detail::zlib_base::~zlib_base()'
libme.so: undefined reference to `boost::iostreams::bzip2::ok'
libme.so: undefined reference to `boost::iostreams::detail::gzip_header::process(char)'
libme.so: undefined reference to `boost::iostreams::detail::gzip_header::reset()'
libme.so: undefined reference to `boost::iostreams::zlib::default_strategy'
libme.so: undefined reference to `boost::thread::start_thread_noexcept()'
libme.so: undefined reference t...

Read more...

Revision history for this message
Jerry Quinn (jlquinn) wrote :

Sorry, forgot to include the main program in the link commands:

jlquinn@tiamat:~/bug$ g++ -fuse-ld=gold -fPIC -fno-omit-frame-pointer -o lidTester lidTester.o liblid.so libme.so liblm.so libcommon.so -lm -lboost_serialization -lboost_filesystem -lboost_regex -lboost_iostreams -lboost_thread -lboost_system -lpthread -licuio -licui18n -licuuc -licudata

jlquinn@tiamat:~/bug$ g++ -fuse-ld=bfd -fPIC -fno-omit-frame-pointer -o lidTester lidTester.o liblid.so libme.so liblm.so libcommon.so -lm -lboost_serialization -lboost_filesystem -lboost_regex -lboost_iostreams -lboost_thread -lboost_system -lpthread -licuio -licui18n -licuuc -licudata
libme.so: undefined reference to `boost::thread::native_handle()'
.....

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for binutils (Ubuntu) because there has been no activity for 60 days.]

Changed in binutils (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Jerry Quinn (jlquinn) wrote :

Someone please look at this? The bug expired without any comment. It's an issue for development.

Changed in binutils (Ubuntu):
status: Expired → New
Revision history for this message
Jerry Quinn (jlquinn) wrote :

Ping. It's been 5 months since I filed this bug with no response.

Revision history for this message
Jerry Quinn (jlquinn) wrote :

Bump. Any thoughts?

Revision history for this message
Jerry Quinn (jlquinn) wrote :

Bump. We're still being bitten by this bug.

Revision history for this message
Jerry Quinn (jlquinn) wrote :

Bump.

Revision history for this message
Jerry Quinn (jlquinn) wrote :

Bump. This is still there.

Revision history for this message
Jerry Quinn (jlquinn) wrote :

Bump.

Revision history for this message
Jerry Quinn (jlquinn) wrote :

Bump. Anyone looking at this?

Revision history for this message
Jerry Quinn (jlquinn) wrote :

This bug affects Ubuntu 16.04 as well as 14.04.

Revision history for this message
Jerry Quinn (jlquinn) wrote :

This is very reproducible on multiple machines.

Changed in binutils (Ubuntu):
status: New → Confirmed
Revision history for this message
Jerry Quinn (jlquinn) wrote :

Bump. Someone please look?

Revision history for this message
Jerry Quinn (jlquinn) wrote :

Bump.

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.