Building EOS

in #eos7 years ago

Screen Shot 2017-05-30 at 1.04.08 AM.png
Yes it's true, the EOS code is available for all to clone/fork.

Here's a couple of quick notes on things I stumbled getting this first round to build. Note, I am assuming you have a basic understanding of how to use git, cmake, etc.

  1. Remember to fetch submodules, this is your 1-2 punch before doing anything else :
    git clone https://github.com/EOSIO/eos.git
    git submodule update --init --recursive

  2. I am using a mac to build, so initially I tried cmake -G Xcode but ran into too many issues so I switched to cmake -G "Unix Makefiles" in a separate workspace.

  3. This could be Xcode related but I couldn't use OpenSSL 1.1.0f, I had to revert to OpenSSL 1.0.2.

  4. there are several directories currently flagged as [incomplete][no build]. These may
    contain non-compiling code. Use "make -k" or whatever "keep compiling after an error" option is available for your build environment.

  5. the latest code is in the "refactor" branch.

  6. Nothing runs yet, so refrain from pelting @dantheman and @modprobe with complaints about non-running code. Be happy @dantheman elected to pull back the curtain so early on to allow the world to watch and contribute as EOS is made.

Finally, a nod to @modprobe for creating the #qwoa "quick word of advice" tag. This may not be as life changing as debugging your space with a flashlight, but it is a qwoa!

Cheers!
-Phil

Sort:  

!! Uhh, the code is public now? Oh, dear. :P OK, I thought I'd have another day or so to write docs... Guess I'll get started on that next. Haha

In the meantime... Thanks so much for writing this up, Phil! :D Some comments on your steps:

  1. Yes, indeed, the submodules are all-important and nothing will work without them. If you attempt to run cmake before fetching submodules, you'll see errors like "XYZ directory does not contain a CMakeLists.txt" or errors mentioning "GetGitRevisionDescription". If you see errors like this, make sure you fetched your submodules. You can fetch all the code, submodules included, in a single command with:
    git clone https://github.com/eosio/eos --recursive

  2. I'm not testing things on Mac, and people who do haven't touched the code since the conference, so YMMV with XCode. :P Fwiw, I usually use -G Ninja but Makefiles should work just fine too (and are supported, so if they don't, let me know)!

  3. Yes, unfortunately our P2P code still uses a bunch of tech that hasn't been updated in too long, and for now we have to use OpenSSL 1.0.2... Replacing the P2P code is a priority for me personally, but it's also quite a bit of work. :P

  4. The branch called "refactor" that was splattered with "[INCOMPLETE] [NO BUILD]" warnings was indeed more recent code, but not actually intended to be used quite yet, so much as looked at to give an idea of where I was going on my recent refactoring adventure. :P

  5. Hopefully as of last night, that branch is building and more or less working again, so I'll merge it back in soon.

Of course I'll write up some proper build docs showing how to get some nodes up and running and making blocks, but this comment made a nice warm-up round. :D

Hi Nathan,

Thanks for the comments. As for the public release, I did not breach confidence, someone else did. Dan made it public so that I and presumably others could access the repository. He also correctly predicted that someone would make an announcement. See: https://steemit.com/eos/@clayop/eos-code-is-now-on-github

I slapped together these notes to hopefully stem the inevitable tide of "how do I build it" questions. Not that it will work though. :-)