Boost logo

Boost Interest :

Subject: Re: [Boost-cmake] RFC sonames initial implementation
From: troy d. straszheim (troy_at_[hidden])
Date: 2009-10-29 18:15:26


Brad King wrote:
>
> If there is no interface version, there is no need for the soname to be
> different from the real binary name. IOW, we could just set VERSION=1.2
> and no SOVERSION, and CMake will produce
>
> libfoo.so -> libfoo.so.1.2 # link to help static linker -lfoo flags
> libfoo.so.1.2 # real binary, soname = libfoo.so.1.2
>
> Whenever a binary links to foo, it will copy the soname "libfoo.so.1.2".
> The dynamic loader will search for that name at runtime and find the
> real file.
>
>> should we hash out the above SOVERSION-only suggestion further?
>
> That is for Boosters to decide, so I won't
>

Thanks for the explanation, we'll go w/o interface version only as you
suggest.

>> The implementation does *not* set soversion on libraries of type MODULE,
>> as the mac linker complains about -compatibility_version when making a
>> bundle. Am I missing anything?
>
> CMake's implementation to pass those flags does this:
>
> // Add OSX version flags, if any.
> if(this->Target->GetType() == cmTarget::SHARED_LIBRARY ||
> this->Target->GetType() == cmTarget::MODULE_LIBRARY)
>
> so it should work for SHARED and MODULE libraries equally.
> Perhaps the boost CMake code is not setting SOVERSION.

Hmm. It isn't setting it on purpose... If I set either VERSION or
SOVERSION on a module on the mac, I get:

Linking CXX shared module ../../../lib/mpi.so
cd /Users/troy/cmake/build/libs/mpi/src && /Users/troy/bin/cmake -E
cmake_link_script CMakeFiles/mpi-mt-shared.dir/link.txt --verbose=1
/usr/bin/c++ -bundle -headerpad_max_install_names -Wl,-u,_munmap
-Wl,-multiply_defined,suppress
-compatibility_version 1.41.0 -o ../../../lib/mpi.1.41.0.so
CMakeFiles/mpi-mt-shared.dir/python/collectives.cpp.o
CMakeFiles/mpi-mt-shared.dir/python/py_communicator.cpp.o
CMakeFiles/mpi-mt-shared.dir/python/datatypes.cpp.o
CMakeFiles/mpi-mt-shared.dir/python/documentation.cpp.o
CMakeFiles/mpi-mt-shared.dir/python/py_environment.cpp.o
CMakeFiles/mpi-mt-shared.dir/python/py_nonblocking.cpp.o
CMakeFiles/mpi-mt-shared.dir/python/py_exception.cpp.o
CMakeFiles/mpi-mt-shared.dir/python/module.cpp.o
CMakeFiles/mpi-mt-shared.dir/python/py_request.cpp.o
CMakeFiles/mpi-mt-shared.dir/python/skeleton_and_content.cpp.o
CMakeFiles/mpi-mt-shared.dir/python/status.cpp.o
CMakeFiles/mpi-mt-shared.dir/python/py_timer.cpp.o -framework Python
../../../lib/libboost_python-mt.1.41.0.dylib -framework Python
i686-apple-darwin9-g++-4.0.1: -compatibility_version only allowed with
-dynamiclib

-t


Boost-cmake list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk