Boost logo

Boost Users :

From: Mat Marcus (mat-lists_at_[hidden])
Date: 2008-03-09 12:43:25


> Hi Mat,
>
> I just found out that the problem exists only when linking with the
> release lib. You were linking with the debug lib of boost_filesystem,
> which works fine on my system, too.
>
> Can you reproduce the error with the release lib on your system?
>

There are no errors for me when building the either the debug or the
release version. If your problems are with the release build only,
then the best way to debug build issues is to compare the settings
produced when building with bjam -d+2 release to your settings. In my
environment, e.g.:

   g++ -o lothar lothar.o
"/Users/mmarcus/pcshare/asl/staff/mmarcus/sandbox/built_artifacts/darwin/release/architecture-combined/asl-dev/link-static/macos\

x-version-10.4/threading-multi/libasl_dev.a"

"../sandbox/boost_libraries/bin.v2/libs/thread/build/darwin/release/architecture-combined/link-static/macosx-ve\
rsion-10.4/threading-multi/libboost_thread-mt-1_34_1.a"
"../sandbox/boost_libraries/bin.v2/libs/signals/build/darwin/release/architecture-combined/link-stat\
ic/macosx-version-10.4/threading-multi/libboost_signals-mt-1_34_1.a"
"../sandbox/boost_libraries/bin.v2/libs/filesystem/build/darwin/release/architecture-co\
mbined/link-static/macosx-version-10.4/threading-multi/libboost_filesystem-mt-1_34_1.a"

    -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=\

10.4 -Wl,-dead_strip -no_dead_strip_inits_and_terms -arch i386 -arch
ppc -Xlinker -Y -Xlinker 5 -lSystemStubs

Looks like you need to add -no_dead_strip_inits_and_terms to your
release build settings. Does it work if you do? One might wish that
the compiler/linker would avoid such error-prone "optimizations" as
dead-stripping static constructors, or at least make
-no_dead_strip_inits_and_terms the default. This thread would make a
good bug report, IMO.

 - Mat


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net