[pkg-boost-devel] Bug#424038: Bug#424038: reason for compiler name in library names
Domenico Andreoli
cavok at debian.org
Mon Jun 11 12:47:02 UTC 2007
On Mon, Jun 11, 2007 at 09:43:51PM +1000, Peter Moulder wrote:
> I haven't read the libboost documentation, but I speculate that the
> reason that the upstream library names all include `gcc41' is because
> different C++ compilers give a different ABI for a given piece of code
> (different name mangling, calling conventions etc.). This is comparable
exactly
> Including an indicator of the compiler (or ABI) in the library name is
> presumably intended to allow having multiple ABI versions installed at
> once.
or to prevent runtime mislinking of applications built with different
version of the libraries/compiler.
> As for how calling programs should determine what ABI version
> to link against, I suppose we either
>
> - hard-code the answer (e.g. have a symlink that doesn't include a
> compiler/ABI version, or a pkg-config name that doesn't mention
> compiler/ABI version) and handle C++ ABI transitions much the same
> as other libraries; and/or
which is what we are already doing
> - provide an autoconf macro that does something like
>
> lb_ABI=`${CXX} -E -dM - </dev/null 2>&1 |grep ABI`
> case "$lb_ABI" in
> '#define __GXX_ABI_VERSION 1002') lb_abi_str=-gcc41 ;;
> '#define __GXX_ABI_VERSION 102') lb_abi_str=-gcc33 ;;
> ...
> esac
>
> The libboost source might give a clue as to what tests to use and/or
> what library names libboost uses for different compilers (-gcc33 was
> just my guess).
yes, but unfortunately is not exported out of the source tree build. so
if debian exported it, it would not be a portable solution.
-----[ Domenico Andreoli, aka cavok
--[ http://www.dandreoli.com/gpgkey.asc
---[ 3A0F 2F80 F79C 678A 8936 4FEE 0677 9033 A20E BC50
More information about the pkg-boost-devel
mailing list