Closed ned14 closed 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?
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=
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
Fixed in 0bf6e30d985a5c4a2f0d620c86ddacdd2917482e
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 by
TESTcommon'. Stop. make[1]: * [src/common/CMakeFiles/TESTcommon.dir/all] Error 2libboost_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.