Boost logo

Boost :

From: Rene Rivera (grafik.list_at_[hidden])
Date: 2005-01-08 11:45:04


8Simon Barner wrote:
> Starting with Boost v. 1.31.0, I intend to bump the shared library
> version number with every boost release in order to prevent from
> problems that are caused by ABI incompatiblities.

I think a better approach, given the linker requirements in FreeBSD, is
to not remove the 1_32 tag, and set the so postfix to the patch
revision. For example:

        libboost_*-1_32.so.0

Which by the way is what the BBv1 OpenBSD build does.

> Another requirement of the Ports Collection: Libraries are installed
> into the same location regardless of built time options.

OK, but that seems to contradict your patch below. How are you
differentiating the possible builds from each other if you are removing
the tags that encode those build options?

> --- tools/build/v1/boost-base.jam.orig Wed Jan 28 23:52:25 2004
> +++ tools/build/v1/boost-base.jam Wed Feb 18 14:06:58 2004
> @@ -2621,11 +2621,6 @@
> local version-tag = [ MATCH "^([^.]+).([^.]+)" : $(version-number[1]) ] ;
> version-tag = $(version-tag:J="_") ;
>
> - tags += $(toolset-tag:J=) ;
> - tags += $(thread-tag:J=) ;
> - tags += $(runtime-tag:J=) ;
> - tags += $(version-tag) ;
> -
> if $(tags)
> {
> return $(properties) <*><*><tag><prefix>-$(tags:J=-) ;
>
> http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/ports/devel/boost/files/patch-tools%3a%3abuild%3a%3av1%3a%3agcc-stlport-tools.jam?rev=1.1&content-type=text/plain
>
> Depending on the FreeBSD version, different compiler and linker options
> are needed. These option are provided by two environment variables
> PTHREAD_CFLAGS and PTHREAD_LIBS, but I found no other way of getting the
> right values into Boost's config files than patching that will
> placeholder values and using sed(1) to replace those dummies with the
> actual ones.

As mentioned by others you can use $(PTHREAD_LIBS) to get at the env
variables, as all are mirrored by the build system.

> --- tools/build/v1/gcc-stlport-tools.jam.orig Mon Dec 13 19:13:56 2004
> +++ tools/build/v1/gcc-stlport-tools.jam Mon Dec 13 19:14:18 2004
> @@ -40,7 +40,7 @@
> }
> case *BSD :
> {
> - flags gcc LINKFLAGS <stlport-iostream>on : -pthread ;
> + flags gcc LINKFLAGS <stlport-iostream>on : %%PTHREAD_LIBS%% ;
> }
> case IRIX :
> {

But for these sorts of changes to work generically it would be better to
condition specifically on FreeBSD, after all there are other BSDs out
there. For example instead of the above:

     case FreeBSD :
         {
         flags gcc LINKFLAGS <stlport-iostream>on : $(PTHREAD_LIBS) ;
         }
     case *BSD :
         {
         flags gcc LINKFLAGS <stlport-iostream>on : -pthread ;
         }

You get the idea.

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com - 102708583/icq

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk