1

I have been build nodeos v1.7.0 on docker. but failed.

build logs:

[447/596] Building CXX object libraries/chain/CMakeFiles/eosio_chain.dir/controller.cpp.o
FAILED: libraries/chain/CMakeFiles/eosio_chain.dir/controller.cpp.o 
/usr/bin/clang++-4.0   -I/eos/libraries/chain/include -Ilibraries/chain/include -I/eos/libraries/chain/../wasm-jit/Include -I/eos/libraries/wabt -Ilibraries/wabt -I/eos/libraries/fc/include -I/usr/local/include -I/usr/include/openssl/include -I/eos/libraries/fc/vendor/websocketpp -I/eos/libraries/fc/secp256k1/upstream -I/eos/libraries/fc/secp256k1/upstream/include -I/eos/libraries/chainbase/include -I/eos/libraries/wasm-jit/Source/Runtime/../../../chain/include -I/eos/libraries/softfloat/source/include -I/eos/libraries/softfloat/source/8086-SSE -I/eos/libraries/softfloat/build/Linux-x86_64-GCC -I/eos/libraries/builtins -I/eos/libraries/builtins../softfloat/source/include -Wall -Wno-invalid-partial-specialization -fcolor-diagnostics -O3 -DNDEBUG   -fcolor-diagnostics -std=gnu++14 -MD -MT libraries/chain/CMakeFiles/eosio_chain.dir/controller.cpp.o -MF libraries/chain/CMakeFiles/eosio_chain.dir/controller.cpp.o.d -o libraries/chain/CMakeFiles/eosio_chain.dir/controller.cpp.o -c /eos/libraries/chain/controller.cpp
clang: error: unable to execute command: Killed
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 4.0.1-10 (tags/RELEASE_401/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/controller-05c185.cpp
clang: note: diagnostic msg: /tmp/controller-05c185.sh
clang: note: diagnostic msg: 

********************
[448/596] Building CXX object libraries/chain/CMakeFiles/eosio_chain.dir/wasm_eosio_validation.cpp.o
[449/596] Building CXX object libraries/chain/CMakeFiles/eosio_chain.dir/apply_context.cpp.o
[450/596] Building CXX object libraries/chain/CMakeFiles/eosio_chain.dir/wasm_eosio_injection.cpp.o
[451/596] Building CXX object libraries/chain/CMakeFiles/eosio_chain.dir/abi_serializer.cpp.o
[452/596] Building CXX object libraries/chain/CMakeFiles/eosio_chain.dir/wasm_interface.cpp.o
ninja: build stopped: subcommand failed.
ERROR: Service 'gateway' failed to build: The command '/bin/sh -c apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y libcurl4-openssl-dev  libusb-1.0-0-dev      && git clone -b $branch https://github.com/EOSIO/eos.git --recursive     && cd eos && echo "$branch:$(git rev-parse HEAD)" > /etc/eosio-version     && cmake -H. -B"/tmp/build" -GNinja -DCMAKE_BUILD_TYPE=Release -DWASM_ROOT=/opt/wasm -DCMAKE_CXX_COMPILER=clang++-4.0        -DCMAKE_C_COMPILER=clang-4.0 -DCMAKE_INSTALL_PREFIX=/tmp/build -DBUILD_MONGO_DB_PLUGIN=true -DCORE_SYMBOL_NAME=$symbol     && cmake --build /tmp/build --target install' returned a non-zero code: 1

My eos Dockerfile:

FROM eosio/builder:v1.7.0 as builder

ARG branch=master
ARG symbol=EOS
ARG phase=beta2

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y libcurl4-openssl-dev  libusb-1.0-0-dev  \
    && git clone -b $branch https://github.com/EOSIO/eos.git --recursive \
    && cd eos && echo "$branch:$(git rev-parse HEAD)" > /etc/eosio-version \
    && cmake -H. -B"/tmp/build" -GNinja -DCMAKE_BUILD_TYPE=Release -DWASM_ROOT=/opt/wasm -DCMAKE_CXX_COMPILER=clang++-4.0 \
       -DCMAKE_C_COMPILER=clang-4.0 -DCMAKE_INSTALL_PREFIX=/tmp/build -DBUILD_MONGO_DB_PLUGIN=true -DCORE_SYMBOL_NAME=$symbol \
    && cmake --build /tmp/build --target install

FROM ubuntu:18.04

ARG phase=beta2
ARG network=mainnet

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install openssl ca-certificates && rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/local/lib/* /usr/local/lib/
COPY --from=builder /tmp/build/bin /opt/eosio/bin
COPY --from=builder /tmp/build/contracts /contracts
COPY --from=builder /etc/eosio-version /etc
COPY config-${phase}.ini /config.ini
COPY genesis-${network}.json /genesis.json
COPY nodeosd.sh /opt/eosio/bin/nodeosd.sh
COPY nodeosd-recover.sh /opt/eosio/bin/nodeosd-recover.sh
ENV EOSIO_ROOT=/opt/eosio
RUN chmod +x /opt/eosio/bin/nodeosd.sh
RUN chmod +x /opt/eosio/bin/nodeosd-recover.sh
ENV LD_LIBRARY_PATH /usr/local/lib
ENV PATH /opt/eosio/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

EXPOSE 8888 9876

My builder/Dockerfile

FROM ubuntu:18.04

LABEL author="xiaobo <[email protected]>" maintainer="Xiaobo <[email protected]> Huang-Ming Huang <[email protected]>" version="0.1.1" \
  description="This is a base image for building eosio/eos"

RUN echo 'APT::Install-Recommends 0;' >> /etc/apt/apt.conf.d/01norecommends \
  && echo 'APT::Install-Suggests 0;' >> /etc/apt/apt.conf.d/01norecommends \
  && apt-get update \
  && DEBIAN_FRONTEND=noninteractive apt-get install -y sudo wget curl net-tools ca-certificates unzip gnupg

RUN echo "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic main" >> /etc/apt/sources.list.d/llvm.list \
  && wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - \
  && apt-get update \
  && DEBIAN_FRONTEND=noninteractive apt-get install -y git-core automake autoconf libtool build-essential pkg-config libtool \
     mpi-default-dev libicu-dev python-dev python3-dev libbz2-dev zlib1g-dev libssl-dev libgmp-dev \
     clang-4.0 lldb-4.0 lld-4.0 llvm-4.0-dev libclang-4.0-dev ninja-build \
  && rm -rf /var/lib/apt/lists/*

RUN update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-4.0/bin/clang 400 \
  && update-alternatives --install /usr/bin/clang++ clang++ /usr/lib/llvm-4.0/bin/clang++ 400

RUN wget https://cmake.org/files/v3.9/cmake-3.9.6-Linux-x86_64.sh \
    && bash cmake-3.9.6-Linux-x86_64.sh --prefix=/usr/local --exclude-subdir --skip-license \
    && rm cmake-3.9.6-Linux-x86_64.sh

ENV CC clang
ENV CXX clang++

RUN wget https://dl.bintray.com/boostorg/release/1.67.0/source/boost_1_67_0.tar.bz2 -O - | tar -xj \
    && cd boost_1_67_0 \
    && ./bootstrap.sh --prefix=/usr/local \
    && echo 'using clang : 4.0 : clang++-4.0 ;' >> project-config.jam \
    && ./b2 -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 install \
    && cd .. && rm -rf boost_1_67_0

RUN wget https://github.com/mongodb/mongo-c-driver/releases/download/1.10.2/mongo-c-driver-1.10.2.tar.gz -O - | tar -xz \
    && cd mongo-c-driver-1.10.2 \
    && mkdir cmake-build && cd cmake-build \
    && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_BSON=ON \
        -DENABLE_SSL=OPENSSL -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON .. \
    && make -j$(nproc) \
    && make install \
    && cd ../../ && rm -rf mongo-c-driver-1.10.2

RUN git clone --depth 1 --single-branch --branch release_40 https://github.com/llvm-mirror/llvm.git \
    && git clone --depth 1 --single-branch --branch release_40 https://github.com/llvm-mirror/clang.git llvm/tools/clang \
    && cd llvm \
    && cmake -H. -Bbuild -GNinja -DCMAKE_INSTALL_PREFIX=/opt/wasm -DLLVM_TARGETS_TO_BUILD= -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly -DCMAKE_BUILD_TYPE=Release  \
    && cmake --build build --target install \
    && cd .. && rm -rf llvm

RUN git clone --depth 1 -b releases/v3.3 https://github.com/mongodb/mongo-cxx-driver \
    && cd mongo-cxx-driver/build \
    && cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local .. \
    && make -j$(nproc) \
    && make install \
    && cd ../../ && rm -rf mongo-cxx-driver

RUN git clone https://github.com/cryptonomex/secp256k1-zkp.git \
    && cd secp256k1-zkp \
    && ./autogen.sh \
    && ./configure \
    && make -j$( nproc ) \
    && sudo make install \
    && cd .. && rm -rf secp256k1-zkp

RUN mkdir  ~/wasm-compiler \
    && cd ~/wasm-compiler \
    && git clone --depth 1 --single-branch --branch release_40 https://github.com/llvm-mirror/llvm.git \
    && cd llvm/tools \
    && git clone --depth 1 --single-branch --branch release_40 https://github.com/llvm-mirror/clang.git \
    && cd .. \
    && mkdir build \
    && cd build \
    && cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=.. -DLLVM_TARGETS_TO_BUILD= -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly -DCMAKE_BUILD_TYPE=Release ../ \
    && make -j$( nproc ) install \

``
2
  • I'd recommend posting an issue on the related repo: github.com/eosio
    – Nat
    Apr 1, 2019 at 2:05
  • @Nat Thank you. I some retried before posting an issue.
    – gafani
    Apr 1, 2019 at 5:07

1 Answer 1

1

Oh.. I'm so idiot.

https://developers.eos.io/eosio-nodeos/docs/docker

should be enough 7 GB memory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.