[CMake] CMake Error at build/modules/add_boost.cmake:156 (message):‏

Raymond Wan rwan.work at gmail.com
Sat Aug 15 03:35:15 EDT 2015


Hi Sonya,


On Sat, Aug 15, 2015 at 10:12 AM, Sonya Blade
<sonyablade2010 at hotmail.com> wrote:
> Thank you in advance, your guess is correct Cmake module downloaded the
> boost and tried to compile it.
> Much more interestingly, it has extracted the current compiler suit on my
> machine (GCC 4.7.1) and downloaded
> the appropriate boost version "boost_1_55_0_GNU_4_7_1" then it get stuck
> with previously stated message in CMake-GUI.


I suppose there are a few things you could try.  One is try using
CMake on the command-line.  Clone the repository and from another
directory, run "cmake <path to the top-level CMakeLists.txt>".

I just tried and this is what I got:

...
-- Downloading boost 1.55.0 to /tmp/test/build
-- Extracting boost 1.55.0 to /tmp/test/build/boost_unzip
-- Building b2 (bjam)
-- Boost linking: libs static , C++ runtime shared
-- Building date_time:
./b2;link=static;threading=multi;runtime-link=shared;--build-dir=Build;stage;-d+2;--hash;variant=release;cxxflags=-fPIC;cxxflags=-std=c++11;-sNO_BZIP2=1;--layout=tagged;toolset=gcc-4.9
-- Building test:
./b2;link=static;threading=multi;runtime-link=shared;--build-dir=Build;stage;-d+2;--hash;variant=release;cxxflags=-fPIC;cxxflags=-std=c++11;-sNO_BZIP2=1;--layout=tagged;toolset=gcc-4.9
-- Building program_options:
./b2;link=static;threading=multi;runtime-link=shared;--build-dir=Build;stage;-d+2;--hash;variant=release;cxxflags=-fPIC;cxxflags=-std=c++11;-sNO_BZIP2=1;--layout=tagged;toolset=gcc-4.9
-- Building system:
./b2;link=static;threading=multi;runtime-link=shared;--build-dir=Build;stage;-d+2;--hash;variant=release;cxxflags=-fPIC;cxxflags=-std=c++11;-sNO_BZIP2=1;--layout=tagged;toolset=gcc-4.9
-- Building filesystem:
./b2;link=static;threading=multi;runtime-link=shared;--build-dir=Build;stage;-d+2;--hash;variant=release;cxxflags=-fPIC;cxxflags=-std=c++11;-sNO_BZIP2=1;--layout=tagged;toolset=gcc-4.9
-- Boost version: 1.55.0
-- Found the following Boost libraries:
--   date_time
--   unit_test_framework
--   program_options
--   system
--   filesystem
...

So, at least you can see how far it got (I've never used CMake-GUI
before, but I presume such verbose information is being hidden?).


> At the end of it since there is not error reporting on open-license-manager
> Cmake module side of does that mean
>  that this discrepancy is on boost side ? I hardly believe that it is on
> boost side because boost is more stable toolkit
> and is tested with numerous volunteers over the years.


No, that isn't what my previous message implied.  Boost is probably
fine; I've installed 1.55 before with no problems.  Though that
doesn't mean it must work on every possible configuration, I guess it
is less likely that is the problem.

One possible problem is that your version of GCC is too old.  It is
4.7.1?  That seems to be a June 2012 release
[https://gcc.gnu.org/gcc-4.7/].  Boost 1.55 is from November 2013
[http://www.boost.org/users/history/version_1_55_0.html].

Close enough?  Possibly, but I've had problems with Boost before with
a slightly older compiler.

As you can tell from the output above, I got past where you were by
using GCC 4.9 .


> the Intel, gcc, sun etc.. and uses it for some
> code execution, but still doesn't explain your catch about semi column at
> the middle, so I'm surprised as well.


Seems I was barking up the wrong tree.  I got past where you are
without changing the CMakeLists.txt (NB:  Where you're stuck isn't the
file you sent but build/modules/add_boost.cmake, line 156).


> CMakeLists.txt and bootsrap.sh, I'm sure that trained eye
> will cath the malfunctioning immediately, can you simply point out at which
> direction I'm supposed to head forward?
>
> P.S. Is there a method to debug those type of scripts during execution?


Again, I don't think the problem is with bootstrap.sh .  That's part
of Boost and everyone who installs Boost must run it.  I'd be a bit
surprise if you caught something that no one else had.

I think the problem is with add_boost.cmake in the software you're
trying to install.  And the problem might not be with that file per
se, but with the compiling step and that *maybe* it is failing with an
older compiler.

You can add MESSAGE () lines [see the CMake documentation] within
add_boost.cmake to make sure various values are set correctly.  But, a
more fruitful direction might be to go into the directory where Boost
was downloaded and unzipped and then try to compile it using Boost's
installation instructions (see its web site).  Whether you succeed or
fail, you'll probably have a better idea of what (i.e., the program
you're trying to install, its CMakeLists.txt, or Boost) you should be
looking at.

Hope this helps and good luck!

Ray


More information about the CMake mailing list