[CMake] Linking Boost on Linux on 64bit host and 32bit

Michael Jackson mike.jackson at bluequartz.net
Thu Nov 4 15:01:05 EDT 2010


# set( Boost_DEBUG ON )

Uncomment that and send the output. Yes, it will be A LOT of output  
but I am trying to figure out what is going wrong.
___________________________________________________________
Mike Jackson                      www.bluequartz.net
Principal Software Engineer       mike.jackson at bluequartz.net
BlueQuartz Software               Dayton, Ohio



On Nov 4, 2010, at 2:41 PM, Knox, Kent wrote:

> Hi Michael~
>
> [Michael]
> Clean out your build folder first.
>
> [Kent]
> kknox at ux2 ~/code/clAMD/trunk/bin/linux32
> 528 > rm -rf *
> I nuke the whole directory
>
> [Michael] export BOOST_ROOT=/home/kknox/sdk/boost_1_44_0
>
> [Kent] Instead of setting an environment variable, I have a bash  
> script that executes the following and sets BOOST_ROOT and  
> BOOST_LIBRARYDIR with -D, I hope that's the same thing:
> ~/bin/cmake-2.8.2-Linux-i386/bin/cmake -G "Unix Makefiles" -D  
> BOOST_ROOT=~/sdk/boost_1_44_0 -D BOOST_LIBRARYDIR=~/sdk/boost_1_44_0/ 
> stage/lib -D ATISTREAMSDKROOT=/usr/src/ati/ati-stream-sdk-v2.2-lnx64  
> -D BUILD64=OFF -D CMAKE_BUILD_TYPE=Debug  ../../code
>
> [Michael] Also put the following in your CMakeLists.txt file after  
> you try to find  boost:
>
> [Kent] My output:
> -- Boost version: 1.44.0
> -- Found the following Boost libraries:
> --   program_options
> -- Boost_PROGRAM_OPTIONS_LIBRARY: /usr/lib/libboost_program_options- 
> mt.a
>
> It's definitely picking up the wrong boost, since my BOOST_ROOT is  
> =~/sdk/boost_1_44_0 and I'm pointing BOOST_LIBRARYDIR to the exact  
> path to the library I want to use, which is in stage, but I don't  
> see why that matters.  I don't want to install boost on this system;  
> I just wanted to compile my own copy and use it.  The funny thing is  
> that it is reading the correct version from version.hpp in my  
> personal Boost (it is printing 1.44), because the version installed  
> by Ubuntu is 1.40.  So it has the correct header path, it's just  
> messing up my library path.
>
> I actually tested this out with a 64bit compile (with all the new  
> echo messages), and I'm linking in the wrong version there too.  I  
> just didn't notice before because it didn't error.  So my problem is  
> actually agnostic to the bitness of my target.
>
> Thanks for your time,
> Kent
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list