Boost logo

Boost Users :

Subject: Re: [Boost-users] building Boost with -fPIC on x86_64 linux box
From: Mika Heiskanen (mika.heiskanen_at_[hidden])
Date: 2009-04-07 12:28:34


Francois Mauger wrote:
> I use the standard: ./configure --with-xxxx; make; make install;
> sequence to build/install the libs. Unfortunately I cannot figure out
> if the -fPIC is activated while compiling the code... and I don't
> know how to check the PIC status from the resulting .so files
> (it is possible and does it make sense? I'm not an expert with this
> concept). I only know that if I missed the -fPIC flag on this system,
> I have linker errors.

This is what we did in our boost 1.36 RPM spec file. Probably not
the best way to do this, but it worked:

%build
./configure --prefix=%{_prefix} --libdir=%{_libdir}
cat Makefile | sed -e 's/BJAM_CONFIG=/BJAM_CONFIG=--layout=system
--build-type=complete cxxflags=-fPIC/' > Makefile.new
mv Makefile.new Makefile
make all

--> Mika Heiskanen


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