Docker container

For anyone wishing to quickly build and test the code I have created a docker instance of a full build environment. You can install docker on many systems http://docs.docker.com You can find the maidsafe dev container here Docker Hub

This is a test to allow devs to quickly get a build environment going. We can also release docker instances of farmers for those who wish greater process separation from their own system. I do not think there is much need for this, but I figured this option was one some people may wish to pursue.

Be aware the dev image is pretty large ~1.9Gb, the release image would likely be ~300Mb.

Let us know what you think anyway.

6 Likes

For those on debian/ubuntu here is a quick script/set of commands to get a build environment locally to. It’s pretty much all in the wiki, but this will get you a clang++ enabled build env quickly. This may help for the impatient (like me). If you issue these commands in this order then you are set.

git clone GitHub - 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.
cd MaidSafe
git submodule update --init
git checkout next
git submodule foreach 'git checkout next ’
sudo apt-add-repository ppa:andykimpe/cmake
sudo apt-add-repository ppa:ubuntu-toolchain-r/ppa
sudo sh -c “echo deb Index of /precise/ llvm-toolchain-precise-3.4 main > /etc/apt/sources.list.d/clang.list”
wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -
sudo apt-get update
sudo apt-get install build-essential python-psutil libfuse-dev git-all libicu-dev valgrind binutils-gold cmake clang-3.4
git submodule update --init
mkdir build
cd build
CXX=clang+±3.4 CC=clang-3.4 cmake 
/
make

3 Likes

Great way to go!

What I haven’t quite figured yet, is how to take advantage of CDN’s 
maybe it’s not possible
 ie you don’t get direct access to the disk I think.

You can set docker containers to access the disk if you wish (recommended for farmers). We just need to make sure that access is restricted, which is pretty simple.

So the vault would just stream chunks directly to/from the CDN (say Akamai on Rackspace) without needing to utilize an API?

Yes that would be possible. I am not sure how valuable it would be though, but I have not thought to much of it really. All the network cares about is getting the data from the vault, regardless of where it is, so should be cool.

1 Like

I get this on the 2nd run of git submodule update --init using Ubuntu 14.04:

git submodule update --init
Cloning into 'src/api'...
Warning: Permanently added the RSA host key for IP address '192.30.252.129' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Clone of 'git@github.com:maidsafe/MaidSafe-API' into submodule path 'src/api' failed

Looks like you do not have a github account with your uploaded ssh key there. I wish they did not require this. I think I will write a wee script that changes this over on the fly if required, makes it read only though so no commits :frowning: In fact @Ross has a sed line somewhere that will do it. Its windy here so he is likely out wind surfing like a mad person :smiley:

1 Like

Oh is this in the docker image (my bad)

sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules git submodule update --init --recursive
instead of the
git submodule update --init
should work I will give this a try later on or @janitor you can let me know if this works :slight_smile:

When I run these after that, it’s fine:

> mkdir build
> cd build
> CXX=clang++-3.4 CC=clang-3.4 cmake ../

But then make fails:

 -- Detecting CXX compiler ABI info - done
 -- No build type given.  Setting and caching CMAKE_BUILD_TYPE to Debug.
   CMake Error at CMakeLists.txt:94 (message):
   The git submodule for common is not intialised.  Please cd to
   /home/dev/MaidSafe and run:
  git submodule update --init --recursive

Can someone try this on fresh U14.04 and post the entire working script sometime this or next week?

Just to re-enforce there seem to be issues with this script - I tried it on a fresh LMDE install but have not looked into the failure yet. Not the git one, but the last one @janitor reports looks familiar. I’ve swapped drives back to running Windows in this machine now (trying to track a recent system freeze) so can’t look into it atm.

Yeah it doesn’t work. I tried to re-run and now I also get the same public key error in the modified line after sed command:

git submodule update --init --recursive

I get the error on the first run on this command too. Do the both instances of the failed command have to be replaced with the sed line and git submodule update command that follows?

I tried to delete checked out source code tree but I’m not sure if that is enough of a reset or not.
It really should be verified using a fresh install without any preexisting SSH keys or things of that nature.

Back to booting LMDE until the next system freeze
 so:

Is this line correct?

The error in bootstrap.log is “clang not found”.

I tried:

CXX=clang++-3.4; CC=clang-3.4; cmake ../

but this doesn’t change the error. Echo $CC gives clang-3.4 so 
?

EDIT: @dirvine I see from my earlier captured output that the above line is correct, cos “cmake” happily reports clang-3.4 etc. So for some reason the make in boost is not seeing this I think. Are you using a special shell, or is there some way these values are not getting passed on (maybe you have them defined elsewhere on your system and the above is not adequate?).

EDIT: Also, since I ran this my package manage has been complaining about 


Failed to fetch http://ppa.launchpad.net/andykimpe/cmake/ubuntu/dists/testing/main/source/Sources  404  Not Found
Failed to fetch http://ppa.launchpad.net/andykimpe/cmake/ubuntu/dists/testing/main/binary-amd64/Packages  404  Not Found
Failed to fetch http://ppa.launchpad.net/andykimpe/cmake/ubuntu/dists/testing/main/binary-i386/Packages  404  Not Found
Failed to fetch http://ppa.launchpad.net/ubuntu-toolchain-r/ppa/ubuntu/dists/testing/main/source/Sources  404  Not Found
Failed to fetch http://ppa.launchpad.net/ubuntu-toolchain-r/ppa/ubuntu/dists/testing/main/binary-amd64/Packages  404  Not Found
Failed to fetch http://ppa.launchpad.net/ubuntu-toolchain-r/ppa/ubuntu/dists/testing/main/binary-i386/Packages  404  Not Found
Some index files failed to download. They have been ignored, or old ones used instead.

That’s what we’re doing! Ideally we save the core team time, but you and I are not quite skilled enough methinks :slight_smile:

I use Github to check out stuff every week, but the instructions must be correct for this to work.
If you aren’t familiar with the source code, which part does what and where’s what, it’s difficult to figure it out on your own.
The devs supposedly use this every day so it shouldn’t be a big time consumer for them.

The github issue is just a matter of setting up the private key on your github account - follow github online help and it works fine - let me know if you can’t get it working. Obv the script can be improved to avoid the need for this.

The issue I was referring to is make falling over.

I haven’t attempted that because I don’t think that’s how it’s supposed to work.
Is every beta tester (hopefully hundreds of people) supposed to create a beta account and upload his keys to Github?
I have a Github account and use several projects and have never needed to do this.

No, it isn’t necessary but it will enable you to proceed. So its a way forward if you want to go forward. :slight_smile: If you search the forum, you might find a previous time where David showed someone how to do this, or you can just configure your github ssh key and go. Just trying to help man.

Here’s a fix for ya:

cd /usr/bin/
sudo ln -s clang-3.4 clang

Missing path to clang++ can be fixed the same way (if you get that error).

For what it’s worth, on U14.04 x64 I ran this to get around another missing package. Maybe not all steps were needed, but this worked for me.

sudo apt-get install python-software-properties; sudo apt-get install apt-file; sudo apt-file update; sudo apt-file search; sudo add-apt-repository; sudo apt-get install software-properties-common

Here’s the point I got stuck at (the last step):

$ make
[ 0%] Built target check_sanitizer_blacklist
[ 0%] Performing build step for ‘boost_system’
CMake Error at /home/dev/MaidSafe/build/boost_1_55_0/src/boost_system-stamp/boost_system-build.cmake:16 (message):
Command failed: 1

‘/home/dev/MaidSafe/build/boost_1_55_0_Clang_3_4_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=clang-3.4’ ‘–with-system’

See also

/home/dev/MaidSafe/build/boost_1_55_0/src/boost_system-stamp/boost_system-build-*.log

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

But I got farther :wink:

I know and appreciate that. I just wanted to say it should be made easier if we want to get as many testers as possible. These errors are developer level errors and can hardly be fixed by mere testers.
Hopefully we’ll get updated instructions later this week.

1 Like