GithubHelp home page GithubHelp logo

Comments (3)

apotier avatar apotier commented on April 29, 2024

I happen to have the same problem, with the following difference: I use this command to compile

g++ -std=c++14 -o my_server EchoServer.cpp -lfmt -lfolly -lfizz -lwangle -lpthread -lgflags -lglog -lcrypto -lc -ldouble-conversion -levent -liberty -ljemalloc -llz4 -llzma -lsnappy -lsodium -lssl -lunwind -lboost_system -lboost_fiber -lboost_context -lboost_regex -ldl

(basically I don't include dwarf, elf, asio and bz2)
It seems to me that the problem is more related to fizz than folly though.

from wangle.

apotier avatar apotier commented on April 29, 2024

Alright, the problem is not with folly, but rather with the order of the compiled libraries.
This ticket helped me solve my problem: #169

Basically to compile you should use the flags in this order:
-lwangle -lfizz -lfolly -lgflags -lglog -lpthread -ldl -lboost_context -lboost_program_options -lboost_thread -lboost_filesystem -lboost_system -lboost_regex -lboost_chrono -lssl -lcrypto -llzma -lz -lsnappy -llz4 -liberty -levent -ldouble-conversion -lsodium

from wangle.

tinkerbeast avatar tinkerbeast commented on April 29, 2024

Changing the library order does fix this problem (I can't think of a good reason why other that the dependencies not being properly handled). Anyway here is a full set of commands:

This will get a docker ubuntu 18 image ready:

apt update \
&& apt-get install -y binutils-dev bzip2 clang cmake g++ gcc git libaio-dev libboost-all-dev libbz2-dev libc-dev libdouble-conversion-dev libdwarf-dev libelf-dev libevent-dev libgflags-dev libgoogle-glog-dev libiberty-dev libjemalloc-dev liblz4-dev liblzma-dev libpthread-stubs0-dev libsnappy-dev libsodium-dev libssl-dev libunwind8-dev libunwind-dev libzstd-dev make openssl pkg-config wget zlib1g-dev \
&& cd / && git clone --depth 1 https://github.com/fmtlib/fmt.git && cd fmt \
&& mkdir _build && cd _build && cmake .. && make -j12 && make install && rm -rf /fmt \
&& cd / && wget https://github.com/facebook/folly/archive/v2019.12.23.00.tar.gz  && tar -xvf v2019.12.23.00.tar.gz && cd /folly-2019.12.23.00 \
&& mkdir _build && cd _build && cmake .. && make -j12 && make install  && rm /v2019.12.23.00.tar.gz \
&& cd / && wget https://github.com/facebookincubator/fizz/archive/v2019.12.23.00.tar.gz && tar -xvf v2019.12.23.00.tar.gz && cd /fizz-2019.12.23.00/fizz \
&& mkdir _build && cd _build && cmake .. && make -j12 && make install  && rm /v2019.12.23.00.tar.gz \
&& cd / && wget https://github.com/facebook/wangle/archive/v2019.12.23.00.tar.gz && tar -xvf v2019.12.23.00.tar.gz && cd /wangle-2019.12.23.00/wangle \
&& mkdir _build && cd _build && cmake .. && make -j12 && make install  && rm /v2019.12.23.00.tar.gz \

And this will compile the echo server:

wget https://raw.githubusercontent.com/facebook/wangle/master/wangle/example/echo/EchoServer.cpp
g++ EchoServer.cpp -lwangle -lfizz -lfolly    -lgflags -lglog    -lpthread -ldl -laio    -lboost_context -lboost_program_options -lboost_thread -lboost_filesystem -lboost_system -lboost_regex -lboost_chrono    -lbz2 -lc -ldwarf -lelf   -lssl -lcrypto -llzma -lz -lsnappy -llz4 -liberty -levent -ldouble-conversion -lsodium -ljemalloc -lunwind

from wangle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.