Boost logo

Boost :

From: Christoph Ludwig (cludwig_at_[hidden])
Date: 2005-05-10 04:29:59


Hi,

this post belongs to the thread
<url:http://lists.boost.org/MailArchives/boost/msg76063.php> but I don't have
that thread in my local archive anymore.

I face the same problem as Curtis Spencer did. Linking an application built
with g++ 3.4.3 against boost_serialization-gcc-mt produces warnings from the
linker:

  g++ -pthread -g -O2 -pthread -o testsuite-LaRed testsuite-LaRed.o ReductionTestdata.o testcase-Testdata.o testcase-Matrix.o testcase-GS.o testcase-LLL.o testcase-BKZ.o testcase-RSR.o -L/home/cludwig/Cxx/gcc3.4/LaRed-0.1-BUILD/src /home/cludwig/Cxx/gcc3.4/LaRed-0.1-BUILD/src/.libs/liblared_ntl.a /home/cludwig/Cxx/gcc3.4/LaRed-0.1-BUILD/src/.libs/liblared.a -lboost_unit_test_framework-gcc-mt -lboost_serialization-gcc-mt -lboost_filesystem-gcc-mt -L/home/cludwig/Cxx/gcc3.4/usr/lib/ -lntl /usr/lib/libgmp.a
  `.gnu.linkonce.t._ZNK5boost7archive17archive_exception4whatEv' referenced in section `.rodata' of /home/cludwig/Cxx/gcc3.4/usr/lib//libboost_serialization-gcc-mt.a(basic_iarchive.o): defined in discarded section `.gnu.linkonce.t._ZNK5boost7archive17archive_exception4whatEv' of /home/cludwig/Cxx/gcc3.4/usr/lib//libboost_serialization-gcc-mt.a(basic_iarchive.o)

(There are similar warnings from basic_text_iprimitive.o and
xml_grammar.o. The compiler / Boost configuration are reported at the bottom
of this post.)

The linker generates an executable anyway and it _seems_ to work. However, I
observe infrequent crashes of the application that I don't observe on a
machine where I built Boost and the application (without any warnings)
with gcc 3.4.2 / ld 2.14.90.0.5. Thus I suspect that the warning is there for
a reason and points to the problem causing the crashes.

Has anyone an idea what to do about this? I am not sure the problem is caused
by the serialization library, but Googling araound I found that it is often
exposed by boost_serialization-gcc-mt.

There is already a gcc bugreport (PR #16625) w.r.t a similar problem but it
seems neither specific to gcc 3.4.3 nor do I see a resolution.

Thanks

Christoph

I built both Boost and my application with gcc 3.4.3:

  cludwig_at_cdcNT56:~/Cxx/gcc3.4/LaRed-0.1-BUILD> LC_ALL=C g++ -v
  Reading specs from /opt/gcc/gcc-3.4.3/lib/gcc/i686-pc-linux-gnu/3.4.3/specs
  Configured with: ../gcc-3.4.3/configure --prefix=/opt/gcc/gcc-3.4.3 --enable-threads=posix --enable-version-specific-runtime-libs --enable-languages=c,c++ --enable-__cxa_atexit --enable-c-mbchar --enable-libstdcxx-debug --enable-c99 --enable-libstdcxx-pch
  Thread model: posix
  gcc version 3.4.3

The linker is:

  cludwig_at_cdcNT56:~/Cxx/gcc3.4/LaRed-0.1-BUILD> ld -v
  GNU ld version 2.15.91.0.2 20040727 (SuSE Linux)

Boost was built using the following script:

  cludwig_at_cdcNT56:~/Cxx/gcc3.4/LaRed-0.1-BUILD> cat ~/Cxx/boost_1_32_0/build-boost_gcc34.sh
  #!/bin/bash

  bjam -d2 --with-pydebug \
      --prefix=$HOME/Cxx/gcc3.4/usr \
      --builddir=$HOME/Cxx/gcc3.4/boost-1.32.0-build \
      -sTOOLS=gcc \
      -sBUILD="debug release <threading>multi" \
      install

  bjam -d2 --without-python \
      --prefix=$HOME/Cxx/gcc3.4/usr \
      --builddir=$HOME/Cxx/gcc3.4/boost-1.32.0-build \
      -sTOOLS=gcc \
      -sBUILD="debug release <define>BOOST_DISABLE_THREADS <threading>single" \
      install

-- 
http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/cludwig.html
LiDIA: http://www.informatik.tu-darmstadt.de/TI/LiDIA/Welcome.html

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk