Ah.

Actually what you want to do here is use gcc -dumpversion:

% gcc-3.4 --version
gcc-3.4 (GCC) 3.4.6 (Ubuntu 3.4.6-6ubuntu2)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

% gcc-3.4 -dumpversion
3.4.6

% gcc --version
gcc (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

% gcc -dumpversion
4.1.3

And again, that this cmake config file has to determine the type/version of your compiler, and mangle it in the same way bjam does, is utter insanity. The boost version less so. If I were the OP I would have walked away from this by now.

So make those tweaks to the call to gcc and the regex and you should be good.

-t

Sergey Nikulov wrote:
:) I thought it is known issue.
Please check following bug - http://www.vtk.org/Bug/view.php?id=7097


2008/6/28 Chirag Dekate <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>:

    Hi Sergey ,

    Based on the suggestions from the cmake mailing list, I inserted the
    following lines in the FindBoost.cmake file to help print out what
    the filename of the libraries that cmake would be looking for:

    MESSAGE (STATUS "${Boost_LIB_PREFIX}boost_$
    
{COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION}")
    MESSAGE (STATUS
    
"${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION}")
    MESSAGE (STATUS
    
"${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG}")
    MESSAGE (STATUS
    
"${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}")
    MESSAGE (STATUS
    "${Boost_LIB_PREFIX}boost_${COMPONENT}-${_boost_ABI_TAG}")

    I recd. the following output, :

    [EMAIL PROTECTED] hpx]$ cmake .

    -- The CXX compiler identification is GNU
    -- The C compiler identification is GNU
    -- Check for working CXX compiler:
    /export/apps/compilers/gcc-4.2.4/bin/c++
    -- Check for working CXX compiler:
    /export/apps/compilers/gcc-4.2.4/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working C compiler:
    /export/apps/compilers/gcc-4.2.4/bin/gcc
    -- Check for working C compiler:
    /export/apps/compilers/gcc-4.2.4/bin/gcc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- _boost_COMPILER = -gccc++ (GCC) 4.2.4
    Copyright (C) 2007 Free Software Foundation, Inc.
    This is free software see the source for copying conditions.  There
    is NO
    warranty not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
    PURPOSE.
    -- _boost_COMPILER_VERSION = c++ (GCC) 4.2.4
    Copyright (C) 2007 Free Software Foundation, Inc.
    This is free software see the source for copying conditions.  There
    is NO
    warranty not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
    PURPOSE.
    -- boost_-gccc++ (GCC) 4.2.4

    Copyright (C) 2007 Free Software Foundation, Inc.
    This is free software see the source for copying conditions.  There
    is NO
    warranty not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
    PURPOSE.-mt-d-1_35
    -- boost_-gccc++ (GCC) 4.2.4

    Copyright (C) 2007 Free Software Foundation, Inc.
    This is free software see the source for copying conditions.  There
    is NO
    warranty not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
    PURPOSE.-mtd-1_35
    -- boost_-mt-d
    -- boost_-mtd
    -- boost_-d

    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/cdekate/hpx
    [EMAIL PROTECTED] hpx]$

    Following is the link to the libraries installed on the same machine

    http://www.cct.lsu.edu/~cdekate/problem_boost_library_list.txt
    <http://www.cct.lsu.edu/%7Ecdekate/problem_boost_library_list.txt>

    libboost_date_time-gcc42-1_35.a
    libboost_date_time-gcc42-1_35.so
    libboost_date_time-gcc42-1_35.so.1.35.0
    libboost_date_time-gcc42.a
    libboost_date_time-gcc42-d-1_35.a
    libboost_date_time-gcc42-d-1_35.so


    libboost_date_time-gcc42-d-1_35.so.1.35.0
    libboost_date_time-gcc42-d.a
    libboost_date_time-gcc42-d.so
    libboost_date_time-gcc42-mt-1_35.a
    libboost_date_time-gcc42-mt-1_35.so
    libboost_date_time-gcc42-mt-1_35.so.1.35.0


    libboost_date_time-gcc42-mt.a
    libboost_date_time-gcc42-mt-d-1_35.a
    libboost_date_time-gcc42-mt-d-1_35.so
    libboost_date_time-gcc42-mt-d-1_35.so.1.35.0
    libboost_date_time-gcc42-mt-d.a
    libboost_date_time-gcc42-mt-d.so


    libboost_date_time-gcc42-mt-s-1_35.a
    libboost_date_time-gcc42-mt-s.a
    libboost_date_time-gcc42-mt-sd-1_35.a
    libboost_date_time-gcc42-mt-sd.a
    libboost_date_time-gcc42-mt.so
    libboost_date_time-gcc42-s-1_35.a


    libboost_date_time-gcc42-s.a
    libboost_date_time-gcc42-sd-1_35.a
    libboost_date_time-gcc42-sd.a
    libboost_date_time-gcc42.so
    libboost_date_time.so.1
    libboost_date_time.so.1.32.0


    Any Help in understanding the problem and possible FindBoost.cmake
    changes that will help fix the problem are welcome..

    Thanks,

    Chirag Dekate





    On Thu, Jun 26, 2008 at 5:55 PM, Sergey Nikulov
    <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

        I'm stiil believe that issue related to compiler (or it version
        identification), because the only difference I see from your
        logs related to compiler.

        So my suggestion as follows - just edit FindBoost.cmake and
        print out following vars:

        MESSAGE(STATUS "_boost_COMPILER = ${_boost_COMPILER}")
        MESSAGE(STATUS "_boost_COMPILER_VERSION =
        ${_boost_COMPILER_VERSION}")

        right before follwoing line

        SET (_boost_MULTITHREADED "-mt")

        And see what it will show on your problem linux box.

        One more suggestions - always delete CMakeCache.txt between your
        new trys :-)


        2008/6/27 Chirag Dekate <[EMAIL PROTECTED]
        <mailto:[EMAIL PROTECTED]>>:

            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 <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


------------------------------------------------------------------------

_______________________________________________
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

Reply via email to