Hi

I was trying to build, in linux, a completely static executable that uses libboost_regex;

I issued

configure LDFLAGS="-static"
make LDFLAGS="-all-static"

but when it comes to linking I get this error:

/bin/bash ../libtool --tag=CXX --mode=link g++ -g -O2 -L/usr/lib -all-static -o check-regexp check-regexp_cmd.o check-regexp.o -lboost_regex ../gl/libgnu.la libtool: link: g++ -g -O2 -static -o check-regexp check-regexp_cmd.o check-regexp.o -L/usr/lib -lboost_regex ../gl/.libs/libgnu.a /usr/lib/libboost_regex.a(static_mutex.o): In function `boost::scoped_static_mutex_lock::unlock()':
(.text+0x16): undefined reference to `pthread_mutex_unlock'
[...]
/usr/lib/gcc/i486-linux-gnu/4.3.3/libstdc++.a(locale.o): In function `__gnu_cxx::__scoped_lock::~__scoped_lock()': (.text._ZN9__gnu_cxx13__scoped_lockD1Ev[__gnu_cxx::__scoped_lock::~__scoped_lock()]+0x18): undefined reference to `pthread_mutex_unlock' /usr/lib/gcc/i486-linux-gnu/4.3.3/libstdc++.a(locale.o): In function `std::locale::_Impl::_M_install_cache(std::locale::facet const*, unsigned int)': (.text._ZNSt6locale5_Impl16_M_install_cacheEPKNS_5facetEj+0x2a): undefined reference to `pthread_mutex_lock' /usr/lib/gcc/i486-linux-gnu/4.3.3/libstdc++.a(locale.o): In function `std::locale::_Impl::_M_install_cache(std::locale::facet const*, unsigned int)': (.text._ZNSt6locale5_Impl16_M_install_cacheEPKNS_5facetEj+0x56): undefined reference to `pthread_mutex_unlock'

what am I doing wrong?

thanks in advance
        Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net



_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to