Boost logo

Boost Users :

From: Mat Marcus (mat-lists_at_[hidden])
Date: 2008-03-02 23:37:04


On Sun, Mar 2, 2008 at 12:01 PM, Lothar May <boost_at_[hidden]> wrote:
> Mat Marcus wrote:
>
> > It sounds like you may be experiencing issues with gcc visibility. Try
> > making symbols visible, or at minimum add -fvisibility-ms-compat to
> > your build settings. See, for example,
> > http://gcc.gnu.org/wiki/Visibility under "Problems with C++ exceptions
> > (please read!)".
> >
> > - Mat
>
> Hi Mat,
>
> I've already tried this, the point is that I'm using the static
> boost libs. See
>
> http://lists.boost.org/boost-users/2007/12/32590.php
>
> I'll try again. Thanks for the hint. Anyway, I tend to find any kind of
> "feature" a compiler might have which breaks something as basic as
> exceptions without spitting out some error is altogether evil... But
> this is just my humble opinion.
>
> Regards,
>
>
> Lothar

Your sample code builds and works for me on Mac OS X 10.5.1. I built
it against boost 1.34.1 using my ASL patches to bjam. You might try
building using bjam -d+2 so that you can view the compiler commmands
used. I will be on the road this week, so I don't know whether I'll
have time to answer your posts for a while, but here are two things to
note:

1) I wouldn't try to silence the linker warnings in 10.5. Some of
those warnings are known Apple bugs. The medicine might be worse than
the disease in this case.

2) Here are a couple of snippets of bjam -d+2 output from my
successful build and run of your test file. Perhaps by comparing them
with your corresponding output, you will be able to get to the bottom
of things. Note that in my environment by default I pick up a couple
of additional boost and ASL libraries. While this will cause some
differences in build settings, odds are that it is not relevant to
your particular issue. I also build with lots of warnings turned on,
more defines, and I use static libs by default.

$bjam -d+2

---
darwin.compile.c++
../sandbox/boost_libraries/bin.v2/libs/filesystem/build/darwin/debug/link-static/macosx-version-10.4/threading-multi/exception.o
    "g++"  -ftemplate-depth-128 -O0 -fno-inline -Wall -g -isysroot
/Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4
-Wno-long-double -no-cpp-precomp -gdwarf-2  -DBOOST_ALL_NO_LIB=1
-I"../sandbox/boost_libraries" -c -o
"../sandbox/boost_libraries/bin.v2/libs/filesystem/build/darwin/debug/link-static/macosx-version-10.4/threading-multi/exception.o"
"../sandbox/boost_libraries/libs/filesystem/src/exception.cpp"
---
darwin.compile.c++
/Users/mmarcus/pcshare/asl/staff/mmarcus/sandbox/built_artifacts/darwin/debug/asl-dev/link-static/macosx-version-10.4/threading-multi/lothar.o
    "g++"  -ftemplate-depth-128 -O0 -fno-inline -Wall -g -isysroot
/Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4
-Wno-long-double -no-cpp-precomp -gdwarf-2 -Werror -Wall
-Wno-trigraphs -Wreturn-type -Wnon-virtual-dtor -Woverloaded-virtual
-Wformat -Wmissing-braces -Wparentheses -Wswitch -Wunused-function
-Wunused-label -Wunused-parameter -Wunused-variable -Wunused-value
-Wunknown-pragmas -Wsign-compare -DADOBE_SERIALIZATION
-DADOBE_STD_SERIALIZATION -DBOOST_ALL_NO_LIB
-DBOOST_SIGNALS_STATIC_LINK -DBOOST_THREAD_BUILD_LIB=1
-DBOOST_THREAD_USE_LIB -DNOMINMAX
-I"../sandbox/adobe_source_libraries" -I"../sandbox/boost_libraries"
-I"/adobe" -I"/boost" -c -o
"/Users/mmarcus/pcshare/asl/staff/mmarcus/sandbox/built_artifacts/darwin/debug/asl-dev/link-static/macosx-version-10.4/threading-multi/lothar.o"
"lothar.cpp"
---
darwin.link /Users/mmarcus/pcshare/asl/staff/mmarcus/sandbox/built_artifacts/darwin/debug/asl-dev/link-static/macosx-version-10.4/threading-multi/lothar
    g++  -o "/Users/mmarcus/pcshare/asl/staff/mmarcus/sandbox/built_artifacts/darwin/debug/asl-dev/link-static/macosx-version-10.4/threading-multi/lothar"
"/Users/mmarcus/pcshare/asl/staff/mmarcus/sandbox/built_artifacts/darwin/debug/asl-dev/link-static/macosx-version-10.4/threading-multi/lothar.o"
"/Users/mmarcus/pcshare/asl/staff/mmarcus/sandbox/built_artifacts/darwin/debug/asl-dev/link-static/macosx-version-10.4/threading-multi/libasl_dev.a"
"../sandbox/boost_libraries/bin.v2/libs/thread/build/darwin/debug/link-static/macosx-version-10.4/threading-multi/libboost_thread-mt-d-1_34_1.a"
"../sandbox/boost_libraries/bin.v2/libs/signals/build/darwin/debug/link-static/macosx-version-10.4/threading-multi/libboost_signals-mt-d-1_34_1.a"
"../sandbox/boost_libraries/bin.v2/libs/filesystem/build/darwin/debug/link-static/macosx-version-10.4/threading-multi/libboost_filesystem-mt-d-1_34_1.a"
     -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk
-mmacosx-version-min=10.4 -Xlinker -Y -Xlinker 5 -lSystemStubs
testing.unit-test
/Users/mmarcus/pcshare/asl/staff/mmarcus/sandbox/built_artifacts/darwin/debug/asl-dev/link-static/macosx-version-10.4/threading-multi/lothar.passed
     /Users/mmarcus/pcshare/asl/staff/mmarcus/sandbox/built_artifacts/darwin/debug/asl-dev/link-static/macosx-version-10.4/threading-multi/lothar
&& touch  /Users/mmarcus/pcshare/asl/staff/mmarcus/sandbox/built_artifacts/darwin/debug/asl-dev/link-static/macosx-version-10.4/threading-multi/lothar.passed
This is never printed on MacOS 10.5.
HTH,
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