Cannot compile MaidSafe from GitHub


#1

I’m an on Ubuntu and I followed instructions from https://github.com/maidsafe/MaidSafe/wiki/Build-Instructions-for-Linux. I tried to compile in release mode and then in debug mode and I got an error in both cases:

In release mode error is at 50%:

CMake Error at /home/ubuntu0/Public/TestShare/Release/boost_1_55_0/src/boost_python-stamp/boost_python-build.cmake:16 (message):
  Command failed: 1

   '/home/ubuntu0/Public/TestShare/Release/boost_1_55_0_GNU_4_8_2/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.8' '--with-python'

  See also

    /home/ubuntu0/Public/TestShare/Release/boost_1_55_0/src/boost_python-stamp/boost_python-build-*.log

make[2]: *** [boost_1_55_0/src/boost_python-stamp/boost_python-build] Erreur 1
make[1]: *** [src/third_party_libs/CMakeFiles/boost_python.dir/all] Erreur 2
make: *** [all] Erreur 2

boost_python-build-err.log contains:

link.jam: No such file or directory

boost_python-build-out.log contains many instances of the following error:

./boost/python/detail/wrap_python.hpp:50:23: fatal error: pyconfig.h: Aucun fichier ou dossier de ce type
 # include <pyconfig.h>

In debug mode error is at 52%:

/home/ubuntu0/Public/TestShare/MaidSafe/src/third_party_libs/sqlite/src/sqlite_test.cc:25:37: fatal error: boost/filesystem/path.hpp: Aucun fichier ou dossier de ce type
 #include "boost/filesystem/path.hpp"
                                     ^
compilation terminated.
make[2]: *** [src/third_party_libs/sqlite/CMakeFiles/sqlite_test.dir/src/sqlite_test.cc.o] Erreur 1
make[1]: *** [src/third_party_libs/sqlite/CMakeFiles/sqlite_test.dir/all] Erreur 2
make: *** [all] Erreur 2

Is this library expected to be compilable at this stage or is it too early ?

Is there any other way to build or to get MaidSafe library ?


#2

Looks like you need to install python-dev :wink:


#3

Thanks for the suggestion. I added python-dev in the “sudo apt-get install” command that installs the prerequisites and now I go a bit further in release mode (54%). The new error is:

CMake Error at headers_helper.cmake:15 (file):
  file COPY cannot find
  "/home/ubuntu0/Public/TestShare/Release/GeneratedSources/nfs/include/maidsafe"    .

make[2]: *** [libmaidsafe.a] Erreur 1
make[1]: *** [CMakeFiles/maidsafe.dir/all] Erreur 2

In debug mode that didn’t change anything (same error as in my first post at 52%).

Any other suggestion ?


#4

For the error in debug mode of my first post I found that include path is incompletely defined. I modified flags.mak file in Debug\src\third_party_libs\sqlite\CMakeFiles\sqlite_test.dir by adding this to the CFLAGS variable.

-isystem /home/ubuntu0/Public/TestShare/Debug/boost_1_55_0_GNU_4_8_2 -I/home/ubuntu0/Public/TestShare/MaidSafe/src/common/include -std=c++11

But now I get the following errors:

In file included from /home/ubuntu0/Public/TestShare/MaidSafe/src/common/include/maidsafe/common/error.h:28:0,
                 from /home/ubuntu0/Public/TestShare/MaidSafe/src/third_party_libs/sqlite/src/sqlite_test.cc:27:
/home/ubuntu0/Public/TestShare/MaidSafe/src/common/include/maidsafe/common/config.h:54:2: error: #error APPLICATION_VERSION_MAJOR, APPLICATION_VERSION_MINOR and APPLICATION_VERSION_PATCH must be defined.
 #error APPLICATION_VERSION_MAJOR, APPLICATION_VERSION_MINOR and APPLICATION_VERSION_PATCH \
  ^
In file included from /home/ubuntu0/Public/TestShare/MaidSafe/src/third_party_libs/sqlite/src/sqlite_test.cc:28:0:
/home/ubuntu0/Public/TestShare/MaidSafe/src/common/include/maidsafe/common/test.h:28:25: fatal error: gtest/gtest.h: Aucun fichier ou dossier de ce type
 #include "gtest/gtest.h"
                         ^
compilation terminated.
make[2]: *** [src/third_party_libs/sqlite/CMakeFiles/sqlite_test.dir/src/sqlite_test.cc.o] Erreur 1
make[1]: *** [src/third_party_libs/sqlite/CMakeFiles/sqlite_test.dir/all] Erreur 2
make: *** [all] Erreur 2

Now I am stopping here because this is more than my knowledge of C language can manage and also this file is generated and shouldn’t be modified.

Is the library on GitHub not ready yet or did I miss something important in the procedure? Am I alone in not being able to compile the library ?


#5

Yes you are right not to change those flags, I am not sure what is happening here though. The build from github is pretty technical if you are not used to cmake/c++ compilation. It is meant for core devs really, we will be releasing installers with the build environment already compiled which should help I think. It may be you are compiling from the master branch, a few have done that recently, we really need to push next to it. Its an easy fix though, form your project root directory type

git checkout next
git pull
git submodule foreach "git checkout next; git pull"

#6

Thanks for the commands. I have cleaned up the debug directory, issued these git commands, regenerated the debug directory and now the make command in the debug directory generates the following error:

In file included from /home/ubuntu0/Public/TestShare/MaidSafe/src/passport/include/maidsafe/passport/detail/fob.h:31:0,
                 from /home/ubuntu0/Public/TestShare/MaidSafe/src/passport/include/maidsafe/passport/types.h:26,
                 from /home/ubuntu0/Public/TestShare/MaidSafe/src/common/include/maidsafe/common/data_types/data_name_variant.h:36,
                 from /home/ubuntu0/Public/TestShare/MaidSafe/src/common/include/maidsafe/common/utils.h:38,
                 from /home/ubuntu0/Public/TestShare/MaidSafe/src/third_party_libs/sqlite/src/sqlite_test.cc:29:
/home/ubuntu0/Public/TestShare/MaidSafe/src/common/include/maidsafe/common/serialisation.h:33:38: fatal error: cereal/archives/binary.hpp: Aucun fichier ou dossier de ce type
 #include "cereal/archives/binary.hpp"
                                      ^
compilation terminated.
make[2]: *** [src/third_party_libs/sqlite/CMakeFiles/sqlite_test.dir/src/sqlite_test.cc.o] Erreur 1
make[1]: *** [src/third_party_libs/sqlite/CMakeFiles/sqlite_test.dir/all] Erreur 2
make: *** [all] Erreur 2

Another error (but still on sqlite_test.cc)


#7

I am not sure why this is happening for you, the CI machines all run ubuntu osx and windows, I will try and do a checkout from scratch tomorrow and see if its OK for me.


#8

The GitHub repository seems to have been corrected. I checked out again yesterday and now all the programs compile correctly in both debug and release modes. Many Thanks.


#9

Nearly all code switched to new serialisation mechanism, was a huge job in conjunction with new account info, but well well worth it. We will all benefit greatly from those changes. A remote dev called Spandan did amazing work on that, so hats of to him. Qa guys working socks off as well, should be automated further this week (another remote dev called Krishna this time). @Viv is driving his team very hard and now switching to apps as they should have had we not stalled them with these changes.