Closed spershin closed 7 years ago
Ok sorted it out. To install it I ran the following commands:
cd /home/$USER/downloads
git clone https://github.com/facebook/wangle
cd wangle/wangle
env PATH=/home/$USER/build/gcc-4.9.4/bin/:$PATH cmake -DBUILD_SHARED_LIBS=ON -DFOLLY_LIBRARY=/home/$USER/build/folly/lib/libfolly.so -DFOLLY_LIBRARIES=/home/$USER/build/folly/lib -DFOLLY_INCLUDE_DIR=/home/$USER/build/folly/include -DBOOST_ROOT=/home/$USER/build/boost-1.59.0 -DBoost_LIBRARIES=/home/$USER/build/boost-1.59.0/lib -DGFLAGS_LIBRARY_PATH=/home/$USER/build/gflags/lib/libgflags.so -DGLOG_LIBRARY_PATH=/home/$USER/build/glog/lib/libglog.so -DOPENSSL_LIBRARIES=/home/$USER/build/openssl-1.0.1u/lib -DOPENSSL_INCLUDE_DIR=/home/$USER/build/openssl-1.0.1u/include -DCMAKE_INSTALL_PREFIX=/home/$USER/build/wangle -DINCLUDE_DIR="/home/$USER/build/double-conversion/include;/home/$USER/build/gflags/include;/home/$USER/build/glog/include;/home/$USER/build/libevent/include;/home/$USER/build/boost-1.59.0/include" -DOPENSSL_SSL_LIBRARY=/home/$USER/build/openssl-1.0.1u/lib/libssl.so -DOPENSSL_CRYPTO_LIBRARY=/home/$USER/build/openssl-1.0.1u/lib/libcrypto.so -DCMAKE_CXX_COMPILER=/home/$USER/build/gcc-4.9.4/bin/g++ -DCMAKE_C_COMPILER=/home/$USER/build/gcc-4.9.4/bin/gcc .
env PATH=/home/$USER/build/gcc-4.9.4/bin/:$PATH make -j 10
env PATH=/home/$USER/build/gcc-4.9.4/bin/:$PATH make install
Also I had the following env vars setup:
LD_LIBRARY_PATH: /home/spershin/build/folly/lib:/home/spershin/build/boost-1.59.0/lib:/home/spershin/build/double-conversion/lib64:/home/spershin/build/gflags/lib:/home/spershin/build/glog/lib:/home/spershin/build/snappy/lib:/home/spershin/build/openssl-1.0.1u/lib:/home/spershin/build/libevent/lib:/home/spershin/build/gcc-4.9.4/lib64:/home/spershin/build/gmp-4.3.2/lib:/home/spershin/build/mpfr-2.4.2/lib:/home/spershin/build/mpc-1.0.3/lib
CC: /home/spershin/build/gcc-4.9.4/bin/gcc
CXX: /home/spershin/build/gcc-4.9.4/bin/g++
boost-1.59.0 double-conversion folly gcc-4.9.4 gflags glog gmp-4.3.2 libevent mpc-1.0.3 mpfr-2.4.2 mstch openssl-1.0.1u snappy
cd /home/$USER/downloads
git clone https://github.com/facebook/wangle
cd wangle/wangle
env PATH=/home/$USER/build/gcc-4.9.4/bin/:$PATH cmake -DBUILD_SHARED_LIBS=ON -DFOLLY_LIBRARY=/home/$USER/build/folly/lib/libfolly.so -DFOLLY_LIBRARIES=/home/$USER/build/folly/lib -DFOLLY_INCLUDE_DIR=/home/$USER/build/folly/include -DBOOST_ROOT=/home/$USER/build/boost-1.59.0 -DBoost_LIBRARIES=/home/$USER/build/boost-1.59.0/lib -DGFLAGS_LIBRARY_PATH=/home/$USER/build/gflags/lib/libgflags.so -DGLOG_LIBRARY_PATH=/home/$USER/build/glog/lib/libglog.so -DOPENSSL_LIBRARIES=/home/$USER/build/openssl-1.0.1u/lib -DOPENSSL_INCLUDE_DIR=/home/$USER/build/openssl-1.0.1u/include -DCMAKE_INSTALL_PREFIX=/home/$USER/build/wangle -DINCLUDE_DIR="/home/$USER/build/double-conversion/include;/home/$USER/build/gflags/include;/home/$USER/build/glog/include;/home/$USER/build/libevent/include;/home/$USER/build/boost-1.59.0/include" .
env PATH=/home/$USER/build/gcc-4.9.4/bin/:$PATH make -j 10
My LD_LIBRARY_PATH is:
/home/spershin/build/folly/lib:/home/spershin/build/boost-1.59.0/lib:/home/spershin/build/double-conversion/lib64:/home/spershin/build/gflags/lib:/home/spershin/build/glog/lib:/home/spershin/build/snappy/lib:/home/spershin/build/openssl-1.0.1u/lib:/home/spershin/build/libevent/lib:/home/spershin/build/gmp-4.3.2/lib:/home/spershin/build/mpfr-2.4.2/lib:/home/spershin/build/mpc-1.0.3/lib
I get the following problems and suspicious output:
During cmake it says it has found system ssl libraries despite the specified variable (OPENSSL_LIBRARIES) in the command line:
-- Found OpenSSL: /usr/lib64/libssl.so;/usr/lib64/libcrypto.so (found version "1.0.1u")
During make:
make[2]: Warning: File CMakeFiles/LoadShedConfigurationTest.dir/depend.make has modification time 0.0025 s in the future
make[2]: Warning: File CMakeFiles/ConnectionManagerTest.dir/depend.make has modification time 0.0033 s in the future
make[2]: Warning: File CMakeFiles/ThreadPoolExecutorTest.dir/depend.make has modification time 0.00063 s in the future
make[2]: Warning: File CMakeFiles/PeekingAcceptorHandshakeHelperTest.dir/depend.make has modification time 0.0014 s in the future
make[2]: Warning: File CMakeFiles/AcceptorTest.dir/depend.make has modification time 0.00039 s in the future
...
[ 64%] Linking CXX executable bin/LoadShedConfigurationTest
/bin/ld: warning: libssl.so.1.0.0, needed by /home/spershin/build/folly/lib/libfolly.so, may conflict with libssl.so.10
/bin/ld: warning: libcrypto.so.1.0.0, needed by /home/spershin/build/folly/lib/libfolly.so, may conflict with libcrypto.so.10
/home/spershin/build/folly/lib/libfolly.so: undefined reference to std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20
/home/spershin/build/folly/lib/libfolly.so: undefined reference to __cxa_throw_bad_array_new_length@CXXABI_1.3.8
collect2: error: ld returned 1 exit status
make[2]: *** [bin/LoadShedConfigurationTest] Error 1
make[1]: *** [CMakeFiles/LoadShedConfigurationTest.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
The linking error is the same for all test binaries, I think.
So I see two problems: the build is picking up the wrong ssl libraries and possibly some incorrect system libraries. I checked the "/home/spershin/build/folly/lib/libfolly.so" and ldd does not report any "not found" dependencies. I've also been able to compile a simple application & link it with the folly library.
I'm at lost at the moment and would appreciate any help. Thanks!