Personally I find the embedding of toolset and version in library names
to be problematic... in this case it makes the FindBoost.cmake really
complicated and binds the (what should be simple) business of using the
libraries to details that are utterly irrelevant here.
I'd prefer to build boost with cmake (with BUILD_VERSIONED == OFF)
(or with --layout=system, i think, if you're bjamming it).
If I needed multiple installs of boost I'd simply put the version
information in the path (e.g. /usr/local/boost-1.35.0). Then the
'detection' of boost should be as easy as finding some libs and a header
file. We could take that stock FindBoost.cmake and hack out the
compiler-specific stuff.
-t
Chirag Dekate wrote:
Hi Sergey,
I did as you recommended and still no avail same problems persist.
Infact I also set the same environment variables from within CMake using
set (BOOST_ROOT /usr/local ) & in the shell. /usr/local is also in the
ld_config path
And still the libraries which are there in /usr/local/lib were not
picked up :(
Appreciate your time and efforts..
If you do have any suggestions I would be willing on trying to work with
them...
Cheers,
Chirag Dekate
On Wed, Jun 25, 2008 at 11:08 PM, Sergey Nikulov
<[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:
I think you should (for example) call cmake in following way
BOOST_ROOT=/usr/local cmake .
2008/6/26 Sergey Nikulov <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>>:
Did you set BOOST_ROOT environment var to point on your boost
installation?
2008/6/26 Chirag Dekate <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>>:
Hi Sergey,
Thanks for the feedback. Unfortunately in my case it didnt
seem to work
I made the changes so that our CMakeLists.txt reads like :
project (hpx CXX C)
and still it did not discover the boost libraries.
I also ran the cmake in debug output and following is the
output :
[EMAIL PROTECTED] hpx]$ cmake --debug-output .
Running with debug output on.
-- The CXX compiler identification is GNU
Called from: [2]
/usr/local/share/cmake-2.6/Modules/CMakeDetermineCXXCompiler.cmake
[1] /home/cdekate/hpx/CMakeLists.txt
-- The C compiler identification is GNU
Called from: [2]
/usr/local/share/cmake-2.6/Modules/CMakeDetermineCCompiler.cmake
[1] /home/cdekate/hpx/CMakeLists.txt
-- Check for working CXX compiler:
/export/apps/compilers/gcc-4.2.4/bin/c++
Called from: [2]
/usr/local/share/cmake-2.6/Modules/CMakeTestCXXCompiler.cmake
[1] /home/cdekate/hpx/CMakeLists.txt
-- Check for working CXX compiler:
/export/apps/compilers/gcc-4.2.4/bin/c++ -- works
Called from: [2]
/usr/local/share/cmake-2.6/Modules/CMakeTestCXXCompiler.cmake
[1] /home/cdekate/hpx/CMakeLists.txt
-- Detecting CXX compiler ABI info
Called from: [2]
/usr/local/share/cmake-2.6/Modules/CMakeTestCXXCompiler.cmake
[1] /home/cdekate/hpx/CMakeLists.txt
-- Detecting CXX compiler ABI info - done
Called from: [2]
/usr/local/share/cmake-2.6/Modules/CMakeTestCXXCompiler.cmake
[1] /home/cdekate/hpx/CMakeLists.txt
-- Check for working C compiler:
/export/apps/compilers/gcc-4.2.4/bin/gcc
Called from: [2]
/usr/local/share/cmake-2.6/Modules/CMakeTestCCompiler.cmake
[1] /home/cdekate/hpx/CMakeLists.txt
-- Check for working C compiler:
/export/apps/compilers/gcc-4.2.4/bin/gcc -- works
Called from: [2]
/usr/local/share/cmake-2.6/Modules/CMakeTestCCompiler.cmake
[1] /home/cdekate/hpx/CMakeLists.txt
-- Detecting C compiler ABI info
Called from: [2]
/usr/local/share/cmake-2.6/Modules/CMakeTestCCompiler.cmake
[1] /home/cdekate/hpx/CMakeLists.txt
-- Detecting C compiler ABI info - done
Called from: [2]
/usr/local/share/cmake-2.6/Modules/CMakeTestCCompiler.cmake
[1] /home/cdekate/hpx/CMakeLists.txt
Entering /home/cdekate/hpx/src
Called from: [1] /home/cdekate/hpx/CMakeLists.txt
Returning to /home/cdekate/hpx
Called from: [1] /home/cdekate/hpx/CMakeLists.txt
Entering /home/cdekate/hpx/examples
Called from: [1] /home/cdekate/hpx/CMakeLists.txt
Returning to /home/cdekate/hpx
Called from: [1] /home/cdekate/hpx/CMakeLists.txt
Entering /home/cdekate/hpx/runtime
Called from: [1] /home/cdekate/hpx/CMakeLists.txt
Returning to /home/cdekate/hpx
Called from: [1] /home/cdekate/hpx/CMakeLists.txt
-- Configuring done
-- Generating /home/cdekate/hpx
-- Generating /home/cdekate/hpx/src
-- Generating /home/cdekate/hpx/examples
-- Generating /home/cdekate/hpx/runtime
-- Generating done
-- Build files have been written to: /home/cdekate/hpx
[EMAIL PROTECTED] hpx]$
Sincerely appreciate your time and efforts.
Thanks
Chirag Dekate
On Wed, Jun 25, 2008 at 6:10 PM, Sergey Nikulov
<[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
wrote:
Hi,
I've also been hit with the same issue.
Looks like bug in FindBoost.cmake.
When it looking for compiler it assumes that you are
using Intel compiler and thus failed to find correct
libraries.
---- cut FindBoost --------
IF (UNIX)
IF (APPLE)
SET (_boost_COMPILER "")
ELSE (APPLE)
IF (NOT CMAKE_COMPILER_IS_GNUCC)
# This is for the intel compiler
SET (_boost_COMPILER "-il")
ELSE (NOT CMAKE_COMPILER_IS_GNUCC)
#find out the version of gcc being used.
EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
ARGS --version
OUTPUT_VARIABLE _boost_COMPILER_VERSION
)
---- cut FindBoost ------
The issue us in following assumptions
IF (NOT CMAKE_COMPILER_IS_GNUCC)
It should be like this
IF (NOT CMAKE_COMPILER_IS_GNUCXX)
Or just fix your project (workaround) as follows
project (hpx CXX C)
2008/6/26 Chirag Dekate <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>>:
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 :
[EMAIL PROTECTED]:~/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
[EMAIL PROTECTED]:~/parallex/trunk/hpx$
Corresponding CMakeCache file :
http://www.cct.lsu.edu/~cdekate/Working_CMakeCache.txt
<http://www.cct.lsu.edu/%7Ecdekate/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/
[EMAIL PROTECTED] 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
[EMAIL PROTECTED] hpx]$
Corresponding CMakeCache file:
http://www.cct.lsu.edu/~cdekate/Problem_CMakeCache.txt
<http://www.cct.lsu.edu/%7Ecdekate/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
<http://www.cct.lsu.edu/%7Ecdekate/problem_boost_library_list.txt>
Library File Name Listing on Wroking Machine :
http://www.cct.lsu.edu/~cdekate/working_boost_library_list.txt
<http://www.cct.lsu.edu/%7Ecdekate/working_boost_library_list.txt>
&the complete CMakeLists.txt files are available at :
**********************************************************
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)
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 mailing list
Boost-cmake@lists.boost.org
<mailto:Boost-cmake@lists.boost.org>
http://lists.boost.org/mailman/listinfo.cgi/boost-cmake
--
Best Regards,
Sergey Nikulov
_______________________________________________
Boost-cmake mailing list
Boost-cmake@lists.boost.org
<mailto:Boost-cmake@lists.boost.org>
http://lists.boost.org/mailman/listinfo.cgi/boost-cmake
--
*********************************************
* View my LinkedIn Profile at : *
* http://www.linkedin.com/in/cdekate *
*********************************************
_______________________________________________
Boost-cmake mailing list
Boost-cmake@lists.boost.org <mailto:Boost-cmake@lists.boost.org>
http://lists.boost.org/mailman/listinfo.cgi/boost-cmake
--
Best Regards,
Sergey Nikulov
--
Best Regards,
Sergey Nikulov
_______________________________________________
Boost-cmake mailing list
Boost-cmake@lists.boost.org <mailto:Boost-cmake@lists.boost.org>
http://lists.boost.org/mailman/listinfo.cgi/boost-cmake
--
*********************************************
* View my LinkedIn Profile at : *
* http://www.linkedin.com/in/cdekate *
*********************************************
------------------------------------------------------------------------
_______________________________________________
Boost-cmake mailing list
Boost-cmake@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-cmake
_______________________________________________
Boost-cmake mailing list
Boost-cmake@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-cmake