Boost logo

Boost :

Subject: Re: [boost] how to build boost with bzip2 in non-standard location?
From: Oliver Kullmann (O.Kullmann_at_[hidden])
Date: 2009-05-20 18:32:57


Now I got

/usr/local/bin/ld: /home/csoliver/SAT-Algorithmen/OKplatform/ExternalSources/Installations/Bzip2/4.1.2/1.0.5/lib/libbz2.a(bzlib.o): relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/home/csoliver/SAT-Algorithmen/OKplatform/ExternalSources/Installations/Bzip2/4.1.2/1.0.5/lib/libbz2.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

As far as I understand that (using
http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=3
), I fixed the bzip2 build, which has in its makefile lines
like

bzlib.o: bzlib.c
        $(CC) $(CFLAGS) -c bzlib.c

which should be

bzlib.o: bzlib.c
        $(CC) $(CFLAGS) -fPIC -c bzlib.c

This is due to the AMD 64-bit machine, it seems.
Finally, after patching all these .o-file-compilations contributing to libbz2.a, the
errors went away, and I got a complete compilation. Puuh.

Thanks again.

Oliver

On Wed, May 20, 2009 at 01:26:51PM -0700, Steven Watanabe wrote:
> AMDG
>
> Oliver Kullmann wrote:
> >so I need to set the "Boost.Build variables"
> >
> >BZIP2_BINARY, BZIP2_INCLUDE, BZIP2_LIBPATH, BZIP2_SOURCE.
> >
> >Or what is BZIP2_SOURCE? The installation of bzip2
> >offers only header files and link-libraries (as usual)?
> >Alright, I don't build bzip2 when building boost, and
> >so this likely doesn't apply.
> >
> >However what is a "Boost.Build variable"??
> >I can't find this concept explained anywhere.
> >
> >Starting with
> >http://www.boost.org/doc/libs/1_39_0/more/getting_started/unix-variants.html
> >speaks in 5.2.4 about "invoking bjam" (which should be related here),
> >and according to
> >http://www.boost.org/boost-build2/doc/html/bbv2/advanced/invocation.html
> >there are "options", "properties" and "targets", but no "Boost.Build
> >variables"?
> >
> >Perhaps a property is meant?
> >
> >So my current guess is to use (this I record for others, so that
> >they don't have to search and guess around) when installing boost:
> >
> >bjam --user-config=PATH/bjam_config --prefix=INSTALL_DIR
> >--build-dir=BUILD_DIR install \
> >--without-python --without-wave BZIP2_BINARY=PATH_TO_bzip2
> >BZIP2_INCLUDE=PATH_TO_DIRECTORY_WITH_bzlib.h \
> >BZIP2_LIBPATH=PATH_TO_DIRECTORY_WITH_libbz2.a
> >
> >I'll try that. Thanks!
> >
>
> It's -sBZIP2_INCLUDE=/path/to/directory (e.g.)
>
> In Christ,
> Steven Watanabe
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost


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