sumoprojects/sumokoin

Build Error on Debian

Closed this issue · 2 comments

I'm getting the following build error:

make[3]: Leaving directory '/root/sumo/build/release'
make[3]: Entering directory '/root/sumo/build/release'
[ 88%] Building CXX object src/wallet/CMakeFiles/wallet_rpc_server.dir/wallet_rpc_server.cpp.o
[ 89%] Linking CXX executable ../../bin/sumo-wallet-rpc
/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/libboost_program_options.a(variables_map.o): In function `boost::program_options::abstract_variables_map::abstract_variables_map()':
(.text+0x383): undefined reference to `vtable for boost::program_options::abstract_variables_map'
/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/libboost_program_options.a(variables_map.o): In function `boost::program_options::abstract_variables_map::abstract_variables_map(boost::program_options::abstract_variables_map const*)':
(.text+0x3a3): undefined reference to `vtable for boost::program_options::abstract_variables_map'
/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/libunwind.a(elf64.o): In function `xz_uncompressed_size':
/tmp/buildd/libunwind-1.1/src/elfxx.c:194: undefined reference to `lzma_stream_footer_decode'
/tmp/buildd/libunwind-1.1/src/elfxx.c:201: undefined reference to `lzma_index_buffer_decode'
/tmp/buildd/libunwind-1.1/src/elfxx.c:205: undefined reference to `lzma_index_size'
/tmp/buildd/libunwind-1.1/src/elfxx.c:210: undefined reference to `lzma_index_end'
/tmp/buildd/libunwind-1.1/src/elfxx.c:207: undefined reference to `lzma_index_uncompressed_size'
/tmp/buildd/libunwind-1.1/src/elfxx.c:210: undefined reference to `lzma_index_end'
/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/libunwind.a(elf64.o): In function `_Uelf64_extract_minidebuginfo':
/tmp/buildd/libunwind-1.1/src/elfxx.c:278: undefined reference to `lzma_stream_buffer_decode'
collect2: error: ld returned 1 exit status
src/wallet/CMakeFiles/wallet_rpc_server.dir/build.make:131: recipe for target 'bin/sumo-wallet-rpc' failed
make[3]: Leaving directory '/root/sumo/build/release'
make[3]: *** [bin/sumo-wallet-rpc] Error 1
make[2]: *** [src/wallet/CMakeFiles/wallet_rpc_server.dir/all] Error 2
CMakeFiles/Makefile2:1286: recipe for target 'src/wallet/CMakeFiles/wallet_rpc_server.dir/all' failed
make[2]: Leaving directory '/root/sumo/build/release'
Makefile:138: recipe for target 'all' failed
make[1]: Leaving directory '/root/sumo/build/release

With this as my Docker script:

FROM debian:stretch-slim as builder

RUN apt-get update \
    && apt-get upgrade -y \
    && apt-get install -y --no-install-recommends \
        build-essential \
        ca-certificates \
        cmake \
        doxygen \
        git \
        graphviz \
        g++ \
        libboost-all-dev \
        libdb-dev \
        libevent-dev \
        libexpat1-dev \
        libgtest-dev \
        libminiupnpc-dev \
        libreadline-dev \
        libsodium-dev \
        libssl1.0-dev \
        libunbound-dev \
        libunwind8-dev \
        libzmq3-dev \
        make \
        pkg-config \
    && git clone https://github.com/sumoprojects/sumokoin.git /root/sumo \
    && cd /root/sumo \
    && rm -rf build \
    && make release-static

FROM debian:stretch-slim

WORKDIR /opt/sumo

RUN apt-get update \
    && apt-get upgrade -y \
    && apt-get install -y --no-install-recommends \
        curl \
        software-properties-common \
        gnupg \
    && curl -sL https://deb.nodesource.com/setup_9.x | bash \
    && apt-get install -y nodejs \
    && npm install -g pm2 \
    && apt-get autoclean \
    && apt-get autoremove -y \
    && rm -rf /var/lib/apt/lists/*
    
COPY --from=builder /root/sumo/build/release/bin/* /opt/sumo/

EXPOSE 19734 19735

CMD ["pm2-docker", "process.json"]

Any idea how I can fix it?

can you uninstall libunwind-dev and retry?
sudo apt-get remove libunwind-dev
Its a linking conflict issue i guess

-- Resolved