Bug 87491 - glibc-2.3.2 breaks static link
glibc-2.3.2 breaks static link
Status: CLOSED INSUFFICIENT_DATA
Product: Fedora
Classification: Fedora
Component: boost (Show other bugs)
1
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Benjamin Kosnik
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-03-27 12:55 EST by Neal D. Becker
Modified: 2013-08-09 01:46 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-10-28 15:03:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Neal D. Becker 2003-03-27 12:55:28 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

Description of problem:
After updating to glibc-2.3.2, static linking is broken:

g++ -Wall -I ../../src/fixed -I ../../src/float  -O3 -ffast-math
-fstrict-aliasing -m3dnow -ggdb -march=athlon-xp -mcpu=athlon-xp -fprofile-arcs
 -D_GNU_SOURCE -Wp,-MMD,.d/Test34.d -o Test34 Test34.o -L. -liTest -lpopt
-lcephes -lfftw -static
Test34.o: In function
`boost::detail::shared_count::shared_count[in-charge]<std::basic_ofstream<char,
std::char_traits<char> >*, boost::checked_deleter<std::basic_ofstream<char,
std::char_traits<char> > > >(std::basic_ofstream<char, std::char_traits<char>
>*, boost::checked_deleter<std::basic_ofstream<char, std::char_traits<char> > >)':
/usr/include/c++/3.2/iostream:62: undefined reference to `pthread_mutex_init'
Test34.o: In function
`boost::detail::sp_counted_base_impl<std::basic_ofstream<char,
std::char_traits<char> >*, boost::checked_deleter<std::basic_ofstream<char,
std::char_traits<char> > > >::~sp_counted_base_impl [in-charge]()':
/usr/include/c++/3.2/iostream:62: undefined reference to `pthread_mutex_destroy'
Test34.o: In function
`boost::detail::sp_counted_base_impl<std::basic_ofstream<char,
std::char_traits<char> >*, boost::checked_deleter<std::basic_ofstream<char,
std::char_traits<char> > > >::~sp_counted_base_impl [in-charge deleting]()':
/usr/include/c++/3.2/iostream:62: undefined reference to `pthread_mutex_destroy'
Test34.o: In function `boost::detail::sp_counted_base::~sp_counted_base
[in-charge]()':
/usr/include/c++/3.2/iostream:62: undefined reference to `pthread_mutex_destroy'
Test34.o: In function `boost::detail::sp_counted_base::~sp_counted_base
[in-charge deleting]()':
/usr/include/c++/3.2/iostream:62: undefined reference to `pthread_mutex_destroy'
collect2: ld returned 1 exit status
make: *** [Test34] Error 1


Version-Release number of selected component (if applicable):
glibc-2.3.2-4.80

How reproducible:
Always

Steps to Reproduce:
1.make
2.
3.
    

Additional info:
Comment 1 Neal D. Becker 2003-03-27 12:56:00 EST
My code does not use threads
Comment 2 Jakub Jelinek 2003-03-28 13:26:26 EST
That looks like boost is broken (or whatever uses pthread_* functions without
making them #pragma weak and using only conditionally (as does e.g. libstdc++).
Can you find out what exactly uses them without making them weak?
Comment 3 Ulrich Drepper 2003-10-03 06:46:52 EDT
This is a bug in boost.  It has non-weak references to the thread functions in
libboost_filesystem.a.  Note that not all references are non-weak:

         U pthread_mutex_destroy
         U pthread_mutex_init
         w pthread_mutex_lock
         w pthread_mutex_unlock

Reassigning.
Comment 4 John Thacker 2006-10-28 15:03:34 EDT
Note that FC1 and FC2 are no longer supported even by Fedora Legacy.  Please
install a still supported version and retest.  If this still occurs on FC3 or
FC4 and is a security issue, please reopen and assign to that version and Fedora
Legacy.  If it still occurs on FC5 or FC6, please reopen and assign to the
correct version.

Note You need to log in before you can comment on or make changes to this bug.