Neal D. Becker wrote: > I just installed boost_1_30_0 and updated to glibc-2.3.2 on my RH8.0 > Linux box. Now I have problems to create a static link of my > executable. > > I'm wondering what is the correct link procedure. > > 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<ch ar, > 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'
[...] > It seems adding -lpthread fixes this, but 1) I don't use thread 2) it > isn't needed for normal (nonstatic) link, and wasn't needed before > the updates. You need -DBOOST_DISABLE_THREADS since on your platform Boost.Config cannot automatically determine whether -lpthread has been supplied. Glibc used to have weak stub definitions of pthread_mutex_* that did nothing; apparently its newer version no longer does. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost