Boost logo

Boost Users :

Subject: Re: [Boost-users] [serialization] unable to link on OS X when MACOSX_DEPLOYMENT_TARGET=10.7
From: Pavol Juhas (pavol.juhas_at_[hidden])
Date: 2017-07-06 20:14:01


On 6/26/17 12:36 PM, Pavol Juhas via Boost-users wrote:
...
> # --------------------------------------------------------------
> $ export MACOSX_DEPLOYMENT_TARGET=10.7
> $ ./bootstrap.sh
> $ ./b2 -j4 variant=release link=shared --with-serialization stage
>
> $ c++ tarchive.cpp -I. -Lstage/lib -lboost_serialization
> Undefined symbols for architecture x86_64:
> ...
> # --------------------------------------------------------------
...
> The only thing the test program (attached) does is to instantiate the
> boost::archive::binary_oarchive class. The procedure above works
> fine when MACOSX_DEPLOYMENT_TARGET is set to 10.9 or higher.
...

FYI, I was able to link with boost_serialization that was built
for MACOSX_DEPLOYMENT_TARGET=10.7 after commenting symbol-visibility
options in the library jamfile (patch attached). I guess
when Mac OS X clang++ builds for older systems the symbol
hiding works a bit too well and subsequently the linker cannot
find anything at all. This is only a problem when building for
older OS X versions. For OS X target versions 10.9 or higher
the library works fine as is.

Pavol




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