Boost logo

Boost Interest :

Subject: Re: [Boost-cmake] 1.40.0.cmake5 (?) builds cleanly
From: Denis Arnaud (denis.arnaud_boost_at_[hidden])
Date: 2009-11-03 05:08:50


2009/11/2 troy d. straszheim <troy_at_[hidden]>

> Denis Arnaud wrote:
>
>> We could maybe tag that version to 1.40.0.cmake5, couldn't we?
>>
>
> For reference, the head of that branch is now
>
> http://gitorious.org/boost/cmake/trees/e26008ef3a9f94d3854e073865fe4ce3a9481ef4
>
> I'm willing to tag it up. Anybody else? There will probably be more build
> system back-ports though, I'm making good progress on some installation
> stuff that Brad has recently clarified.
>

I forgot to mention that I still have to apply two patches (provided in
attachment, but also available on my Fedora page:
http://denisarnaud.fedorapeople.org/boost/1.40.0/10/) to alter the
configuration of CMake.
a) One is to uncomment the SOVERSION line (which, from my understanding, is
reported to fail on some platforms such as Mac), so that sonames can be
generated in the right way.
b) The other patch is to avoid building binaries (e.g., bcp, inspect). As I
have included all the possible combinations (BUILD_TESTS=NONE,
BUILD_BCP=OFF, etc), it should work for many versions of Boost-CMake.

Now, may I suggest a few enhancements, from a Fedora packaging perspective?

1. To enable the installation of the Boost libraries into the /usr/lib64
directory on 64bit Linux platforms, I currently use the
"-DBOOST_INSTALL_LIB_SUBDIR_NAME=lib64" directive.

On Fedora, the RPM cmake-macro uses the "-DLIB_SUFFIX=64" directive (
https://fedoraproject.org/wiki/Packaging:Cmake#RPM_Macros), though some
suggest (https://fedoraproject.org/wiki/PackagingDrafts/cmake) to replace it
by the "-DLIB_INSTALL_DIR:PATH=%{_libdir}" directive (where %{_libdir} is
equal to either /usr/lib or /usr/lib64, depending on the platform).

So, I'd suggest that Boost-CMake supports one of those, as apparently KDE4
does (http://lists.boost.org/boost-cmake/2009/10/0670.php).

2. To instruct CMake about the installation directory, I currently use (
http://denisarnaud.fedorapeople.org/boost/1.40.0/10/boost.spec) the
"-DCMAKE_INSTALL_PREFIX=$RPM_BUILD_ROOT%{_prefix}" directive (where
%{_prefix} is equal to /usr). However, it has rpmlint (the RPM packaging
checker utility) to complain/warn about it:
$ rpmlint -i SPECS/boost.spec
SPECS/boost.spec:257: W: rpm-buildroot-usage %build %cmake
-DCMAKE_INSTALL_PREFIX=$RPM_BUILD_ROOT%{_prefix} \
$RPM_BUILD_ROOT should not be touched during %build or %prep stage, as it
may
break short circuit builds."

Also, the "standard Fedora way" (used by KDE4:
https://fedoraproject.org/wiki/Packaging:Cmake#Specfile_Usage ?) is to
instruct make (not cmake), like for VERBOSE=1, where to install everything,
with "make install DESTDIR=$RPM_BUILD_ROOT".

So, if possible, I'd suggest that the installation directory may be
instructed at the installation stage, understood by make (and not only by
cmake).

Denis






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