Bug 87491 - glibc-2.3.2 breaks static link
Summary: glibc-2.3.2 breaks static link
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: boost (Show other bugs)
(Show other bugs)
Version: 1
Hardware: i386 Linux
medium
high
Target Milestone: ---
Assignee: Benjamin Kosnik
QA Contact: Brian Brock
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-03-27 17:55 UTC by Neal D. Becker
Modified: 2013-08-09 05:46 UTC (History)
1 user (show)

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


Attachments (Terms of Use)

Description Neal D. Becker 2003-03-27 17:55:28 UTC
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 17:56:00 UTC
My code does not use threads

Comment 2 Jakub Jelinek 2003-03-28 18:26:26 UTC
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 10:46:52 UTC
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 19:03:34 UTC
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.