Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Build #200

Closed
doubleailes opened this issue Nov 6, 2019 · 4 comments
Closed

Docker Build #200

doubleailes opened this issue Nov 6, 2019 · 4 comments

Comments

@doubleailes
Copy link

doubleailes commented Nov 6, 2019

Hi Guys,

I'm trying to build wdt inside a docker
here is my dockerfile.

RUN apt-get update && \
    apt-get upgrade -y && \
    apt-get install -y git
RUN git clone https://github.com/facebook/folly.git
RUN apt-get install -y libgoogle-glog-dev libboost-all-dev libdouble-conversion-dev libjemalloc-dev cmake gcc libssl-dev
RUN apt-get install -y g++
RUN git clone https://github.com/facebook/wdt.git
WORKDIR /wdt
RUN cmake ./ -DBUILD_TESTING=on
ENV CTEST_OUTPUT_ON_FAILURE=1
RUN make test
RUN make install `
@doubleailes
Copy link
Author

doubleailes commented Nov 6, 2019

Here is my error

In file included from /wdt/util/ThreadTransferHistory.cpp:10:0:
/wdt/../wdt/Sender.h:15:10: fatal error: gtest/gtest_prod.h: No such file or directory
 #include <gtest/gtest_prod.h>
          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
CMakeFiles/wdt_min.dir/build.make:398: recipe for target 'CMakeFiles/wdt_min.dir/util/ThreadTransferHistory.cpp.o' failed
make[2]: *** [CMakeFiles/wdt_min.dir/util/ThreadTransferHistory.cpp.o] Error 1
CMakeFiles/Makefile2:727: recipe for target 'CMakeFiles/wdt_min.dir/all' failed
make[1]: *** [CMakeFiles/wdt_min.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
The command '/bin/sh -c make install' returned a non-zero code: 2

@doubleailes
Copy link
Author

Base on the ticker #199 i can improve my dockerfile but i'm stuck as the level as the ticker #199

RUN apt-get update && \
    apt-get upgrade -y && \
    apt-get install -y git
RUN git clone https://github.com/facebook/folly.git
RUN apt-get install -y cmake libjemalloc-dev libgoogle-glog-dev libboost-system-dev libdouble-conversion-dev openssl build-essential libboost-all-dev libssl-dev libgtest-dev
RUN apt-get install -y g++
RUN git clone https://github.com/majoros/wdt.git
WORKDIR /wdt
RUN cmake ./ -DBUILD_TESTING=on
ENV CTEST_OUTPUT_ON_FAILURE=1
RUN make test
RUN make install

@SashaNullptr
Copy link

I think this will work:

FROM ubuntu:18.04

# Install basic deps for all packages
RUN apt-get update && \
    apt-get install -y \
    cmake \
    git \
    wget \
    g++

# Install Folly

# Install folly package deps
RUN apt-get install -y \
    g++ \
    cmake \
    libboost-all-dev \
    libevent-dev \
    libdouble-conversion-dev \
    libgoogle-glog-dev \
    libgflags-dev \
    libiberty-dev \
    liblz4-dev \
    liblzma-dev \
    libsnappy-dev \
    make \
    zlib1g-dev \
    binutils-dev \
    libjemalloc-dev \
    libssl-dev \
    pkg-config

# Install folly itself
RUN git clone https://github.com/facebook/folly.git

# Install WDT from source
RUN apt-get install -y \
    libgtest-dev \
    libboost-all-dev

RUN git clone --single-branch --branch folly-fixes https://github.com/sashanullptr/wdt.git && \
    cd wdt && \
    mkdir _build && cd _build && \
    cmake .. \
    -DBUILD_TESTING=off && \
    make -j$(nproc) && \
    make install

You'll need to patch CMakeLists.txt using the changes specified in #201 in order for the aforementioned Dockerfile to work. The line git clone --single-branch --branch folly-fixes https://github.com/sashanullptr/wdt.git pulls a branch of a fork of WDT that has already has the changes to CMakeLists.txt applied. If you make the changes yourself you won't need this particular line.

@davide125
Copy link
Member

With #201 merged this should be resolved.

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

No branches or pull requests

3 participants