maidsafe-archive / MaidSafe

This is the super-project in which each MaidSafe library resides. Some information is common to all libraries, and is detailed here. Library-specific information can be found in each library's wiki.
Other
583 stars 102 forks source link

Missing rule for boost_1_55_0_GNU_4_8_1/boost_1_55_0/stage/lib/libboost_locale-mt.a #114

Closed ned14 closed 10 years ago

ned14 commented 10 years ago

make[2]: * No rule to make target boost_1_55_0_GNU_4_8_1/boost_1_55_0/stage/lib/libboost_locale-mt.a', needed byTESTcommon'. Stop. make[1]: * [src/common/CMakeFiles/TESTcommon.dir/all] Error 2

libboost_locale-mt.a it turns out is needed in lots of places. It can be fixed by diving into the downloaded Boost and building it by hand using ./b2 toolset=gcc-4.8 cxxflags="-std=c++0x" --layout=tagged link=static, but obviously some auto build rule has become stale.

Taking a guess, you're not setting the Boost toolset to the same one used by cmake, so fixing that would be useful.

Fraser999 commented 10 years ago

Hi Niall,

I can't reproduce this issue here on an Ubuntu 13.10 machine using gcc 4.8.1. For me, libboost_locale-mt.a is properly created and linked as part of make TESTcommon.

Can you let us know a bit more about your system and build steps please?

ned14 commented 10 years ago

Mine is Ubuntu LTS, so the default GCC compiler is 4.6. To build MaidSafe using 4.8, I therefore did:

export CC=/usr/bin/gcc-4.8 export CXX=/usr/bin/g++-4.8 cmake -Hbuild_maidsafe maidsafe

Which works as expected, right up until cmake downloads Boost and tries to compile it. There I believe you might be doing:

./b2 cxxflags="-std=c++0x" --layout=tagged link=static

This of course will pick up the system default compiler which is 4.6, and you get the errors mentioned above. You need to force toolset to 4.8.

How to do this programmatically? You might consider stripping the path preceding in CC and always specifying toolset= or something.

dirvine commented 10 years ago

A 'standardish' way of using alternatives in ubuntu is

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.7 sudo update-alternatives --config gcc

Fraser is right and suggest using cmake to pass the CC etc. to boost. He is doing that and if it fails we may add the update alternatives to the build instructions.

On Wed, Mar 19, 2014 at 10:21 AM, Niall Douglas notifications@github.comwrote:

Mine is Ubuntu LTS, so the default GCC compiler is 4.6. To build MaidSafe using 4.8, I therefore did:

export CC=/usr/bin/gcc-4.8 export CXX=/usr/bin/g++-4.8 cmake -Hbuild_maidsafe maidsafe

Which works as expected, right up until cmake downloads Boost and tries to compile it. There I believe you might be doing:

./b2 cxxflags="-std=c++0x" --layout=tagged link=static

This of course will pick up the system default compiler which is 4.6, and you get the errors mentioned above. You need to force toolset to 4.8.

How to do this programmatically? You might consider stripping the path preceding in CC and always specifying toolset= or something.

Reply to this email directly or view it on GitHubhttps://github.com/maidsafe/MaidSafe/issues/114#issuecomment-38035376 .

David Irvine maidsafe.net http://www.maidsafe.net/ twitter: @metaquestions blog: http://metaquestions.me

ned14 commented 10 years ago

Fixed in 0bf6e30d985a5c4a2f0d620c86ddacdd2917482e