Comments (3)
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.
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.
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)
- ByteToMessageDecoder decode
- Too many dangling CLOSE_WAIT connections HOT 5
- error: no member named 'tcpi_retransmits' in 'tcp_info'; did you mean '__tcpi_retransmits'? HOT 3
- Installs empty directories
- if iouring will be supported soon?
- Build fails on Debian Buster: Acceptor.cpp.o SocketPeeker.h:25:67: error: expected class-name before ‘,’ token
- failed to install wangle on windows with vcpkg install wangle command HOT 1
- very poor performance with echo example HOT 1
- Function with noexcept specifier throws exception causes program terminated HOT 3
- enable tcp and udp in single ServerBootstrap HOT 1
- run client on browser
- Wangle - Vcpkg - Windows (wvw)
- Problem linking libsodium HOT 3
- Incompatibility with openssl3 HOT 5
- test failure HOT 1
- Access Pipelines from Server
- MacOS encounter this issue. plz help me with this.
- Q: Does wangle support websockets?
- Acceptor
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wangle.