Boost logo

Boost Interest :

From: Chirag Dekate (cdekate_at_[hidden])
Date: 2008-06-25 16:57:21


Hi All,

I am working with a project (called hpx) that relies on Boost libraries {
serialization, etc }. We use CMake for building this project.

On my Linux Ubuntu box the build process goes through smoothly

However on another Linux machine with similar cmake2.6 & Boost 1.35.0 setup
(in /usr/local/ ) the Cmake fails to find the specific boost libraries....

following is a detailed description of the problem:

After that the example (test) programs use the "libhpx" to link and generate
executables

my directory structure is as follows

HPX_ROOT/
      CMakeLists.txt
    |
    |
    HPX_ROOT/src
       CMakeLists.txt
    HPX_ROOT/examples
       CMakeLists.txt
    HPX_ROOT/hpx
       contains all the headers..

Working CMake Cache on my linux box:
Standard cmake 2.6 installation from source in /usr/local/
Standard boost 1.35.0 installed from source in /usr/local/
CMake makefile generation messages :
cdekate_at_px06:~/parallex/trunk/hpx$ cmake .
-- 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
-- Found The Following Boost Libraries:
-- date_time
-- filesystem
-- graph
-- regex
-- serialization
-- thread
-- system
-- signals
-- Boost Version: 1.35.0
-- Configuring done
-- Generating done
-- Build files have been written to: /home/cdekate/parallex/trunk/hpx
cdekate_at_px06:~/parallex/trunk/hpx$

Corresponding CMakeCache file :
http://www.cct.lsu.edu/~cdekate/Working_CMakeCache.txt>

**************************************************************

Celeritas (PROBLEM MACHINE LISTING)
Standard cmake 2.6 installation from source in /usr/local/
Standard boost 1.35.0 installed from source in /usr/local/
cdekate_at_celeritas hpx]$ cmake .
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /home/packages/gcc-4.2.1/bin/gcc
-- Check for working C compiler: /home/packages/gcc-4.2.1/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /home/packages/gcc-4.2.1/bin/c++
-- Check for working CXX compiler: /home/packages/gcc-4.2.1/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/cdekate/hpx
[cdekate_at_celeritas hpx]$

Corresponding CMakeCache file:
http://www.cct.lsu.edu/~cdekate/Problem_CMakeCache.txt>

ON the Problem machine even though the boost libraries and such have been
installed in globally addressable space /usr/local/{lib,include} and
/usr/{lib,include}
The CMakeLists.txt line :

find_package(Boost 1.35.0 COMPONENTS date_time filesystem graph regex
serialization thread system signals)

doesn't find the corresponding libraries on celeritas that it does on my
linux box..

Library File Name Listing on Problem Machine :

http://www.cct.lsu.edu/~cdekate/problem_boost_library_list.txt>

Library File Name Listing on Wroking Machine :

http://www.cct.lsu.edu/~cdekate/working_boost_library_list.txt>

& the complete CMakeLists.txt files are available listed below :

**********************************************************
the main CMakeLists.txt under the root looks like this :
**********************************************************

# We require at least CMake V2.6
cmake_minimum_required(VERSION 2.6)

project (hpx)

find_package(Boost 1.35.0 COMPONENTS date_time filesystem graph regex
serialization thread system signals)

include_directories (${hpx_SOURCE_DIR})
include_directories (${hpx_SOURCE_DIR}/external/coroutine)
include_directories (${hpx_SOURCE_DIR}/external/exception)
include_directories (${hpx_SOURCE_DIR}/external/endian)
include_directories (${hpx_SOURCE_DIR}/external/logging)
include_directories (${hpx_SOURCE_DIR}/external/singleton)

if(WIN32)
    add_definitions(-D_WIN32_WINNT=0x0501)
    add_definitions(-D_SCL_SECURE_NO_WARNINGS)
    add_definitions(-D_CRT_SECURE_NO_WARNINGS)
    add_definitions(-D_SCL_SECURE_NO_DEPRECATE)
    add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
endif(WIN32)

add_subdirectory (src)
add_subdirectory (examples)
add_subdirectory (runtime)
add_subdirectory (tests)

*******************************************************
the CMakeLists.txt under the HPX_ROOT/src is as follows
*******************************************************

set (hpxlib_HEADERS
...
...
)

set (hpxlib_SOURCES
...
...
}

add_library (hpx STATIC ${hpxlib_SOURCES} ${hpxlib_HEADERS}
${Boost_LIBRARIES})

*************************************************************
the CMakeLists.txt under examples looks as follows :
*************************************************************

set (resolver_client_SOURCES naming/resolver_client.cpp)
add_executable (resolver_client ${resolver_client_SOURCES})
target_link_libraries(resolver_client hpx ${Boost_LIBRARIES})

set (resolver_server_SOURCES naming/resolver_server.cpp)
add_executable (resolver_server ${resolver_server_SOURCES})
target_link_libraries(resolver_server hpx ${Boost_LIBRARIES})

set (parcelset_client_SOURCES parcelset/parcelset_client.cpp)
add_executable (parcelset_client ${parcelset_client_SOURCES})
target_link_libraries(parcelset_client hpx ${Boost_LIBRARIES})

set (parcelset_server_SOURCES parcelset/parcelset_server.cpp)
add_executable (parcelset_server ${parcelset_server_SOURCES})
target_link_libraries(parcelset_server hpx ${Boost_LIBRARIES})

****************************

Any Help on your part would be greatly appreciated.

Thank You,

Chirag Dekate

-- 
*********************************************
* View my LinkedIn Profile at : *
* http://www.linkedin.com/in/cdekate *
*********************************************


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