FindBoost.cmake (Was: kdesupport-for-4.2 cmake error)

Pau Garcia i Quiles pgquiles at elpauer.org
Sun Jan 18 02:22:30 CET 2009


On Sun, Jan 18, 2009 at 2:09 AM, Allen Winter <winter at kde.org> wrote:
> On Saturday 17 January 2009 7:51:44 pm Pau Garcia i Quiles wrote:
>> Hello,
>>
>> FindBoost.cmake in that version of kdesupport and in CMake 2.6.2 does
>> not support Boost 1.37.0. You need to replace this line:
>>
>> SET( _boost_TEST_VERSIONS ${Boost_ADDITIONAL_VERSIONS} "1.36.1"
>> "1.36.0" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0" "1.34" "1.33.1"
>> "1.33.0" "1.33" )
>>
>> with
>>
>> SET( _boost_TEST_VERSIONS ${Boost_ADDITIONAL_VERSIONS} "1.37.0"
>> "1.36.1" "1.36.0" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0" "1.34"
>> "1.33.1" "1.33.0" "1.33" )
>>
> This is quite silly.

I fully agree but that's the way FindBoost.cmake is implemented in
CMake and several places in the KDE repository.

Parsing boost/version.hpp seems like the right way to do version
detection. From Boost 1.35.0 :

//
//  Caution, this is the only boost header that is guarenteed
//  to change with every boost release, including this header
//  will cause a recompile every time a new boost version is
//  released.
//
//  BOOST_VERSION % 100 is the sub-minor version
//  BOOST_VERSION / 100 % 1000 is the minor version
//  BOOST_VERSION / 100000 is the major version

#define BOOST_VERSION 103500

//
//  BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION
//  but as a *string* in the form "x_y" where x is the major version
//  number and y is the minor version number.  This is used by
//  <config/auto_link.hpp> to select which library version to link to.

#define BOOST_LIB_VERSION "1_35"


> We really should have a FindBoost that is smarter and doesn't need to be
> updated each time a new Boost is released.
>
> This also might explain why finding Boost 1_37 on the Windows side is such a pain.
> I always need to set BOOST_INCLUDEDIR to find Boost on Windows and this
> must be the reason.
>
> Wow, FindBoost.cmake is one intense piece of CMake code.
>
>> Now it should work, provided that you have the development versions of
>> the Boost 1.37.0 packages
>>
>> On Sat, Jan 17, 2009 at 9:02 PM, Michal Svoboda <pht at spatium.org> wrote:
>> > I'm trying to compile the kdesupport package pulled from
>> > tags/kdesupport-for-4.2, but cmake ends with an error (see below). Any
>> > ideas what could be wrong? It is weird that it finds a particular
>> > version of Boost but doesn't even know what version it's supposed to
>> > look for. I have cmake 2.6.2.
>> >
>> > Thanks,
>> > Michal Svoboda
>> >
>> >
>> > $ cmake ../kdesupport/ -DCMAKE_INSTALL_PREFIX=/opt/kde4-support-4.2
>> > -- The C compiler identification is GNU
>> > -- The CXX compiler identification is GNU
>> > -- Check for working C compiler: /usr/bin/gcc
>> > -- Check for working C compiler: /usr/bin/gcc -- works
>> > -- Detecting C compiler ABI info
>> > -- Detecting C compiler ABI info - done
>> > -- Check for working CXX compiler: /usr/bin/c++
>> > -- Check for working CXX compiler: /usr/bin/c++ -- works
>> > -- Detecting CXX compiler ABI info
>> > -- Detecting CXX compiler ABI info - done
>> > -- Looking for Q_WS_X11
>> > -- Looking for Q_WS_X11 - found
>> > -- Looking for Q_WS_WIN
>> > -- Looking for Q_WS_WIN - not found.
>> > -- Looking for Q_WS_QWS
>> > -- Looking for Q_WS_QWS - not found.
>> > -- Looking for Q_WS_MAC
>> > -- Looking for Q_WS_MAC - not found.
>> > -- Found Qt-Version 4.4.3
>> > -- Found OpenSSL: /usr/ssl/lib64/libssl.so
>> > -- Looking for _POSIX_TIMERS
>> > -- Looking for _POSIX_TIMERS - found
>> > -- Found Qt-Version 4.4.3 (using /opt/qt-4.4.3/bin/qmake)
>> > -- Looking for XOpenDisplay in
>> > /usr/X11R7/lib64/libX11.so;/usr/X11R7/lib64/libXext.so
>> > -- Looking for XOpenDisplay in
>> > /usr/X11R7/lib64/libX11.so;/usr/X11R7/lib64/libXext.so - found
>> > -- Looking for gethostbyname
>> > -- Looking for gethostbyname - found
>> > -- Looking for connect
>> > -- Looking for connect - found
>> > -- Looking for remove
>> > -- Looking for remove - found
>> > -- Looking for shmat
>> > -- Looking for shmat - found
>> > -- Looking for IceConnectionNumber in ICE
>> > -- Looking for IceConnectionNumber in ICE - found
>> > -- Found X11: /usr/X11R7/lib64/libX11.so
>> > -- Looking for include files CMAKE_HAVE_PTHREAD_H
>> > -- Looking for include files CMAKE_HAVE_PTHREAD_H - found
>> > -- Looking for pthread_create in pthreads
>> > -- Looking for pthread_create in pthreads - not found
>> > -- Looking for pthread_create in pthread
>> > -- Looking for pthread_create in pthread - found
>> > -- Found Threads: TRUE
>> > -- Found Automoc4: /src/a/kde/kdesupport-for-4.2/o/automoc/automoc4
>> > -- Found shared-mime-info version: 0.40
>> > -- Boost Version required: .. Found: 1.37.0
>> > CMake Error at akonadi/cmake/modules/FindBoost.cmake:557 (MESSAGE):
>> >  Couldn't find the Boost libraries and/or include directory, or the
>> > version
>> >  found is too old.  Please install the Boost libraries AND development
>> >  packages.  You can set BOOST_ROOT, BOOST_INCLUDEDIR and
>> > BOOST_LIBRARYDIR to
>> >  help find Boost.
>> > Call Stack (most recent call first):
>> >  akonadi/CMakeLists.txt:38 (find_package)
>> >
>> >
>> > -- Configuring incomplete, errors occurred!
>> >
>> >
>> >>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
>> >
>>
>>
>>
> _______________________________________________
> Kde-buildsystem mailing list
> Kde-buildsystem at kde.org
> https://mail.kde.org/mailman/listinfo/kde-buildsystem
>



-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)


More information about the Kde-buildsystem mailing list