Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Discrepancies between docker build process and build script #4734

Closed
pbrkr opened this issue Jul 18, 2018 · 4 comments
Closed

Discrepancies between docker build process and build script #4734

pbrkr opened this issue Jul 18, 2018 · 4 comments

Comments

@pbrkr
Copy link

pbrkr commented Jul 18, 2018

I'm looking into the build process to determine whether we should be using Docker or not.

I can see several discrepancies between the Docker build process (defined in Docker/builder/Dockerfile and Docker/Dockerfile) and the build script (defined by scripts/eosio_build_ubuntu.sh and eosio_build.sh). I'm looking at Ubuntu as the host OS here as that matches what's used in the Dockerfiles.

  1. Different packages are installed: e.g. libgmp-dev in Docker, libgmp3-dev in the non-Docker build script. mpi-default-dev, lld-4.0, llvm-4.0-dev and ninja-build are all installed in Docker but not in the non-Docker build script. There are probably more as well, I've noticed these after only a quick look.

  2. Docker build process sets CC=clang and CXX=clang++ at the start of the build which will affect each dependency that is built. This step isn't performed in the non-Docker build script.

  3. Docker build process explicitly installs cmake 3.9.6 from cmake.org instead of using the cmake package from the Ubuntu archives.

  4. Docker build process passes the options -d0 -j$(nproc) --with-thread --with-date_time --with-system --with-filesystem --with-program_options --with-signals --with-serialization --with-chrono --with-test --with-context --with-locale --with-coroutine --with-iostreams toolset=clang link=static when building boost. These options are not set when building boost in the non-Docker build script.

  5. Docker build process downloads and builds binaryen 1.37.21. I can't see this step in the non-Docker build script.

  6. Docker build process downloads and builds berkeley-softfloat-3. I can't see this step in the non-Docker build script.

This is just what I've spotted quickly. This makes it incredibly difficult to debug the build process and to understand which dependencies are actually required and which are not.

Please replace these two conflicting build processes with a single build script. The Dockerfile can then just run the common build script on a clean Ubuntu 18.04 base image.

@jgiszczak
Copy link
Contributor

Efforts to use the build script for a Docker build are ongoing. There are reasons why it's not currently being done. See #4586 for details.

@pbrkr
Copy link
Author

pbrkr commented Jul 18, 2018

That doesn't answer why there are so many differences between the build script and the Docker build process. Even if separate scripts are maintained they should be aligned as closely as possible.

@WarrickFitz
Copy link
Contributor

I would also love to understand why these diffs exist. It does seem like duplicated work and the Docker build process seems to be rather fragile and untested at time of new releases.

@pbrkr
Copy link
Author

pbrkr commented Jul 18, 2018

We've been held up in our upgrades due to debugging this and it's a major frustration.

Running eosio_build.sh on an in-use node is not something I want to do as it loads the CPU, RAM and network when we're trying to service API requests on our full nodes and may even be lucky enough to need to produce blocks on our BP node.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants