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

Folly error building WDT on multiple distros #199

Closed
JustinTimperio opened this issue Oct 25, 2019 · 4 comments
Closed

Folly error building WDT on multiple distros #199

JustinTimperio opened this issue Oct 25, 2019 · 4 comments

Comments

@JustinTimperio
Copy link

I get the following error when building WDT on both Ubuntu > 18.xx and Fedora > 28.

Scanning dependencies of target wdt
[ 86%] Building CXX object CMakeFiles/wdt.dir/util/WdtFlags.cpp.o
[ 88%] Building CXX object CMakeFiles/wdt.dir/Wdt.cpp.o
[ 90%] Linking CXX shared library libwdt.so
[ 90%] Built target wdt
Scanning dependencies of target wdtbin
[ 93%] Building CXX object CMakeFiles/wdtbin.dir/wdtCmdLine.cpp.o
[ 95%] Building CXX object CMakeFiles/wdtbin.dir/util/WdtFlags.cpp.o
[ 97%] Building CXX object CMakeFiles/wdtbin.dir/Wdt.cpp.o
[100%] Linking CXX executable _bin/wdt/wdt
libfolly4wdt.so: undefined reference to `folly::strlcpy(char*, char const*, unsigned long)'
collect2: error: ld returned 1 exit status
CMakeFiles/wdtbin.dir/build.make:154: recipe for target '_bin/wdt/wdt' failed
make[2]: *** [_bin/wdt/wdt] Error 1
CMakeFiles/Makefile2:180: recipe for target 'CMakeFiles/wdtbin.dir/all' failed
make[1]: *** [CMakeFiles/wdtbin.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

Packages installed on Ubuntu: cmake libjemalloc-dev libgoogle-glog-dev libboost-system-dev libdouble-conversion-dev openssl build-essential libboost-all-dev libssl-dev libgtest-dev

Packages installed on Fedora: cmake boost-devel openssl jemalloc glog-devel double-conversion-devel make automake gcc gcc-c++ kernel-devel gtest-devel openssl-devel

Cmake output:

-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- system
-- filesystem
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1")
-- Looking for posix_fallocate
-- Looking for posix_fallocate - found
-- Looking for sync_file_range
-- Looking for sync_file_range - found
-- Looking for posix_memalign
-- Looking for posix_memalign - found
-- Looking for posix_fadvise
-- Looking for posix_fadvise - found
-- Looking for clock_gettime
-- Looking for clock_gettime - found
-- Looking for memrchr
-- Looking for memrchr - found
-- Looking for pthread_atfork
-- Looking for pthread_atfork - found
-- Looking for C++ include linux/sockios.h
-- Looking for C++ include linux/sockios.h - found
-- Performing Test FOLLY_USE_LIBCPP
-- Performing Test FOLLY_USE_LIBCPP - Failed
-- Performing Test FOLLY_HAVE_WEAK_SYMBOLS
-- Performing Test FOLLY_HAVE_WEAK_SYMBOLS - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /var/app/warp-cli/build/wdt/_build

@doubleailes
Copy link

@DunZzzz
Copy link

DunZzzz commented Nov 26, 2019

Got the exact same issue on arch, fixed it by adding the CString.cpp file to wdt CMakeList in the FOLLY_CPP_SRC. The file contains the strlcpy function.

set (FOLLY_CPP_SRC
	"${FOLLY_SOURCE_DIR}/folly/Conv.cpp"
	"${FOLLY_SOURCE_DIR}/folly/Demangle.cpp"
	"${FOLLY_SOURCE_DIR}/folly/hash/Checksum.cpp"
	"${FOLLY_SOURCE_DIR}/folly/hash/detail/ChecksumDetail.cpp"
	"${FOLLY_SOURCE_DIR}/folly/hash/detail/Crc32cDetail.cpp"
	"${FOLLY_SOURCE_DIR}/folly/hash/detail/Crc32CombineDetail.cpp"
	"${FOLLY_SOURCE_DIR}/folly/lang/ColdClass.cpp"
	"${FOLLY_SOURCE_DIR}/folly/ScopeGuard.cpp"

       # FIX HERE
	"${FOLLY_SOURCE_DIR}/folly/lang/CString.cpp"
)

length967 added a commit to length967/wdt that referenced this issue Apr 19, 2020
conadav added a commit to OceanCodes/wdt that referenced this issue Jun 23, 2020
@JustinTimperio
Copy link
Author

For those running into issues, I have locked my install script for warp-cli. You can automatically install WDT with this shell script.
https://github.com/JustinTimperio/warp-cli/blob/master/build/install.sh

All you need to do is run:
curl https://raw.githubusercontent.com/JustinTimperio/warp-cli/master/build/install.sh | sudo bash

@davide125
Copy link
Member

#201 should fix this

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

4 participants