Closed naarkhoo closed 1 year ago
If I update my compiler to gcc-9 and g++9 - I get further but still it fails
[ 10%] Building CXX object CMakeFiles/folly_base.dir/folly/dynamic.cpp.o
[ 11%] Building CXX object CMakeFiles/folly_base.dir/folly/json.cpp.o
[ 11%] Building CXX object CMakeFiles/folly_base.dir/folly/json_patch.cpp.o
[ 11%] Building CXX object CMakeFiles/folly_base.dir/folly/json_pointer.cpp.o
[ 12%] Building CXX object CMakeFiles/folly_base.dir/folly/compression/Compression.cpp.o
In file included from /root/folly/folly/compression/Compression.cpp:43:
/root/folly/folly/compression/Zstd.h:52:12: error: 'ZSTD_cParameter' has not been declared
52 | void set(ZSTD_cParameter param, unsigned value);
| ^~~~~~~~~~~~~~~
/root/folly/folly/compression/Zstd.h:65:3: error: 'ZSTD_CCtx_params' does not name a type; did you mean 'ZSTD_CCtx_s'?
65 | ZSTD_CCtx_params const* params() const { return params_.get(); }
| ^~~~~~~~~~~~~~~~
| ZSTD_CCtx_s
/root/folly/folly/compression/Zstd.h:74:30: error: 'ZSTD_CCtx_params' has not been declared
74 | static void freeCCtxParams(ZSTD_CCtx_params* params);
| ^~~~~~~~~~~~~~~~
/root/folly/folly/compression/Zstd.h:76:7: error: 'ZSTD_CCtx_params' was not declared in this scope; did you mean 'ZSTD_CCtx_s'?
76 | ZSTD_CCtx_params,
| ^~~~~~~~~~~~~~~~
| ZSTD_CCtx_s
/root/folly/folly/compression/Zstd.h:77:38: error: 'ZSTD_CCtx_params' was not declared in this scope; did you mean 'ZSTD_CCtx_s'?
77 | folly::static_function_deleter<ZSTD_CCtx_params, &freeCCtxParams>>
| ^~~~~~~~~~~~~~~~
| ZSTD_CCtx_s
/root/folly/folly/compression/Zstd.h:77:57: error: template argument 1 is invalid
77 | folly::static_function_deleter<ZSTD_CCtx_params, &freeCCtxParams>>
| ^~~~~~~~~~~~~~
/root/folly/folly/compression/Zstd.h:77:57: note: invalid template non-type parameter
/root/folly/folly/compression/Zstd.h:77:71: error: template argument 1 is invalid
77 | folly::static_function_deleter<ZSTD_CCtx_params, &freeCCtxParams>>
| ^~
/root/folly/folly/compression/Zstd.h:77:71: error: template argument 2 is invalid
/root/folly/folly/compression/Compression.cpp: In function 'int folly::io::{anonymous}::zstdConvertLevel(int)':
/root/folly/folly/compression/Compression.cpp:1411:28: error: 'ZSTD_maxCLevel' was not declared in this scope
1411 | if (level < 1 || level > ZSTD_maxCLevel()) {
| ^~~~~~~~~~~~~~
CMakeFiles/folly_base.dir/build.make:497: recipe for target 'CMakeFiles/folly_base.dir/folly/compression/Compression.cpp.o' failed
make[2]: *** [CMakeFiles/folly_base.dir/folly/compression/Compression.cpp.o] Error 1
CMakeFiles/Makefile2:165: recipe for target 'CMakeFiles/folly_base.dir/all' failed
make[1]: *** [CMakeFiles/folly_base.dir/all] Error 2
Makefile:148: recipe for target 'all' failed
any update?
Do you have a recent-enough zstd?
@yfeldblum hi, I met the same problem. After install zstd master branch, the same errors
cmake log
-- The CXX compiler identification is GNU 5.5.0
-- The C compiler identification is GNU 5.5.0
-- 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
-- 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
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Found Boost: /usr/include (found suitable version "1.58.0", minimum required is "1.51.0") found components: context filesystem program_options regex system thread chrono date_time atomic
-- Found DoubleConversion: /usr/lib/x86_64-linux-gnu/libdouble-conversion.so
-- Found gflags from package config /usr/local/lib/cmake/gflags/gflags-config.cmake
-- Found glog: /usr/local/lib/libglog.so
-- Found libevent: /usr/lib/x86_64-linux-gnu/libevent.so
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.0.2g")
-- Looking for ASN1_TIME_diff
-- Looking for ASN1_TIME_diff - found
-- Found BZip2: /usr/lib/x86_64-linux-gnu/libbz2.so (found version "1.0.6")
-- Looking for BZ2_bzCompressInit
-- Looking for BZ2_bzCompressInit - found
-- Looking for lzma_auto_decoder in /usr/lib/x86_64-linux-gnu/liblzma.so
-- Looking for lzma_auto_decoder in /usr/lib/x86_64-linux-gnu/liblzma.so - found
-- Looking for lzma_easy_encoder in /usr/lib/x86_64-linux-gnu/liblzma.so
-- Looking for lzma_easy_encoder in /usr/lib/x86_64-linux-gnu/liblzma.so - found
-- Looking for lzma_lzma_preset in /usr/lib/x86_64-linux-gnu/liblzma.so
-- Looking for lzma_lzma_preset in /usr/lib/x86_64-linux-gnu/liblzma.so - found
-- Found LibLZMA: /usr/lib/x86_64-linux-gnu/liblzma.so (found version "5.1.0")
-- Found LZ4: /usr/lib/x86_64-linux-gnu/liblz4.so
-- Found LZ4: /usr/lib/x86_64-linux-gnu/liblz4.so
-- Found ZSTD: /usr/local/lib/libzstd.so
-- Found Zstd: /usr/local/lib/libzstd.so
-- Found SNAPPY: /usr/lib/x86_64-linux-gnu/libsnappy.so
-- Found LIBDWARF: /usr/lib/libdwarf.a
-- Found LIBIBERTY: /usr/lib/x86_64-linux-gnu/libiberty.a
-- Could NOT find LIBAIO (missing: LIBAIO_LIBRARY LIBAIO_INCLUDE_DIR)
-- Could NOT find LIBURING (missing: LIBURING_LIBRARY LIBURING_INCLUDE_DIR)
-- Could NOT find LIBSODIUM (missing: LIBSODIUM_LIBRARY LIBSODIUM_INCLUDE_DIR)
-- Found LIBUNWIND: /usr/local/lib/libunwind.so
-- Looking for swapcontext
-- Looking for swapcontext - found
-- Looking for C++ include elf.h
-- Looking for C++ include elf.h - found
-- Looking for backtrace
-- Looking for backtrace - found
-- backtrace facility detected in default set of libraries
-- Found Backtrace: /usr/include
-- Setting FOLLY_USE_SYMBOLIZER: ON
-- Setting FOLLY_HAVE_ELF: 1
-- Setting FOLLY_HAVE_DWARF: TRUE
-- Performing Test FOLLY_CPP_ATOMIC_BUILTIN
-- Performing Test FOLLY_CPP_ATOMIC_BUILTIN - Success
-- Looking for C++ include jemalloc/jemalloc.h
-- Looking for C++ include jemalloc/jemalloc.h - found
-- Performing Test COMPILER_HAS_UNKNOWN_WARNING_OPTION
-- Performing Test COMPILER_HAS_UNKNOWN_WARNING_OPTION - Failed
-- Performing Test COMPILER_HAS_W_SHADOW_LOCAL
-- Performing Test COMPILER_HAS_W_SHADOW_LOCAL - Failed
-- Performing Test COMPILER_HAS_W_SHADOW_COMPATIBLE_LOCAL
-- Performing Test COMPILER_HAS_W_SHADOW_COMPATIBLE_LOCAL - Failed
-- Performing Test COMPILER_HAS_W_NOEXCEPT_TYPE
-- Performing Test COMPILER_HAS_W_NOEXCEPT_TYPE - Failed
-- Performing Test COMPILER_HAS_W_NULLABILITY_COMPLETENESS
-- Performing Test COMPILER_HAS_W_NULLABILITY_COMPLETENESS - Failed
-- Performing Test COMPILER_HAS_W_INCONSISTENT_MISSING_OVERRIDE
-- Performing Test COMPILER_HAS_W_INCONSISTENT_MISSING_OVERRIDE - Failed
-- Performing Test COMPILER_HAS_F_ALIGNED_NEW
-- Performing Test COMPILER_HAS_F_ALIGNED_NEW - Failed
-- Performing Test COMPILER_HAS_F_OPENMP
-- Performing Test COMPILER_HAS_F_OPENMP - Success
-- Looking for pthread_atfork
-- Looking for pthread_atfork - found
-- Looking for accept4
-- Looking for accept4 - found
-- Looking for getrandom
-- Looking for getrandom - not found
-- Looking for preadv
-- Looking for preadv - found
-- Looking for pwritev
-- Looking for pwritev - found
-- Looking for clock_gettime
-- Looking for clock_gettime - found
-- Looking for pipe2
-- Looking for pipe2 - found
-- Looking for sendmmsg
-- Looking for sendmmsg - found
-- Looking for recvmmsg
-- Looking for recvmmsg - found
-- Looking for malloc_usable_size
-- Looking for malloc_usable_size - found
-- Performing Test FOLLY_HAVE_IFUNC
-- Performing Test FOLLY_HAVE_IFUNC - Success
-- Performing Test FOLLY_HAVE_STD__IS_TRIVIALLY_COPYABLE
-- Performing Test FOLLY_HAVE_STD__IS_TRIVIALLY_COPYABLE - Success
-- Performing Test FOLLY_HAVE_UNALIGNED_ACCESS
-- Performing Test FOLLY_HAVE_UNALIGNED_ACCESS - Success
-- Performing Test FOLLY_HAVE_VLA
-- Performing Test FOLLY_HAVE_VLA - Success
-- Performing Test FOLLY_HAVE_WEAK_SYMBOLS
-- Performing Test FOLLY_HAVE_WEAK_SYMBOLS - Success
-- Performing Test FOLLY_HAVE_LINUX_VDSO
-- Performing Test FOLLY_HAVE_LINUX_VDSO - Success
-- Looking for C++ include sys/types.h
-- Looking for C++ include sys/types.h - found
-- Looking for C++ include stdint.h
-- Looking for C++ include stdint.h - found
-- Looking for C++ include stddef.h
-- Looking for C++ include stddef.h - found
-- Check size of __int128
-- Check size of __int128 - done
-- Performing Test HAVE_INT128_TRAITS
-- Performing Test HAVE_INT128_TRAITS - Failed
-- Performing Test FOLLY_HAVE_WCHAR_SUPPORT
-- Performing Test FOLLY_HAVE_WCHAR_SUPPORT - Success
-- Performing Test FOLLY_HAVE_EXTRANDOM_SFMT19937
-- Performing Test FOLLY_HAVE_EXTRANDOM_SFMT19937 - Success
-- Performing Test FOLLY_USE_LIBCPP
-- Performing Test FOLLY_USE_LIBCPP - Failed
-- Performing Test FOLLY_USE_LIBSTDCPP
-- Performing Test FOLLY_USE_LIBSTDCPP - Success
-- Performing Test HAVE_VSNPRINTF_ERRORS
-- Performing Test HAVE_VSNPRINTF_ERRORS - Success
-- Performing Test GFLAGS_NAMESPACE_IS_GFLAGS
-- Performing Test GFLAGS_NAMESPACE_IS_GFLAGS - Success
-- Performing Test COMPILER_HAS_M_PCLMUL
-- Performing Test COMPILER_HAS_M_PCLMUL - Success
-- compiler has flag pclmul, setting compile flag for /ssd01/zhangyiyang/folly/folly/hash/detail/ChecksumDetail.cpp;/ssd01/zhangyiyang/folly/folly/hash/detail/Crc32CombineDetail.cpp;/ssd01/zhangyiyang/folly/folly/hash/detail/Crc32cDetail.cpp
-- Configuring done
-- Generating done
-- Build files have been written to: /ssd01/zhangyiyang/folly/_build
make log
[ 6%] Building CXX object CMakeFiles/folly_base.dir/folly/Random.cpp.o
In file included from /ssd01/zhangyiyang/folly/folly/ThreadLocal.h:51:0,
from /ssd01/zhangyiyang/folly/folly/SingletonThreadLocal.h:25,
from /ssd01/zhangyiyang/folly/folly/Random.cpp:27:
/ssd01/zhangyiyang/folly/folly/SharedMutex.h: In instantiation of ‘class folly::SharedMutexImpl<true>::WriteHolder’:
/ssd01/zhangyiyang/folly/folly/SharedMutex.h:1599:23: required from here
/ssd01/zhangyiyang/folly/folly/SharedMutex.h:1504:25: warning: ‘__warn_unused_result__’ attribute only applies to function types [-Wattributes]
class FOLLY_NODISCARD WriteHolder {
^
/ssd01/zhangyiyang/folly/folly/SharedMutex.h: In instantiation of ‘class folly::SharedMutexImpl<true>::UpgradeHolder’:
/ssd01/zhangyiyang/folly/folly/SharedMutex.h:1599:23: required from here
/ssd01/zhangyiyang/folly/folly/SharedMutex.h:1456:25: warning: ‘__warn_unused_result__’ attribute only applies to function types [-Wattributes]
class FOLLY_NODISCARD UpgradeHolder {
^
/ssd01/zhangyiyang/folly/folly/SharedMutex.h: In instantiation of ‘class folly::SharedMutexImpl<true>::ReadHolder’:
/ssd01/zhangyiyang/folly/folly/SharedMutex.h:1599:23: required from here
/ssd01/zhangyiyang/folly/folly/SharedMutex.h:1396:25: warning: ‘__warn_unused_result__’ attribute only applies to function types [-Wattributes]
class FOLLY_NODISCARD ReadHolder {
^
/ssd01/zhangyiyang/folly/folly/SharedMutex.h: In instantiation of ‘class folly::SharedMutexImpl<false>::WriteHolder’:
/ssd01/zhangyiyang/folly/folly/SharedMutex.h:1600:23: required from here
/ssd01/zhangyiyang/folly/folly/SharedMutex.h:1504:25: warning: ‘__warn_unused_result__’ attribute only applies to function types [-Wattributes]
class FOLLY_NODISCARD WriteHolder {
^
/ssd01/zhangyiyang/folly/folly/SharedMutex.h: In instantiation of ‘class folly::SharedMutexImpl<false>::UpgradeHolder’:
/ssd01/zhangyiyang/folly/folly/SharedMutex.h:1600:23: required from here
/ssd01/zhangyiyang/folly/folly/SharedMutex.h:1456:25: warning: ‘__warn_unused_result__’ attribute only applies to function types [-Wattributes]
class FOLLY_NODISCARD UpgradeHolder {
^
/ssd01/zhangyiyang/folly/folly/SharedMutex.h: In instantiation of ‘class folly::SharedMutexImpl<false>::ReadHolder’:
/ssd01/zhangyiyang/folly/folly/SharedMutex.h:1600:23: required from here
/ssd01/zhangyiyang/folly/folly/SharedMutex.h:1396:25: warning: ‘__warn_unused_result__’ attribute only applies to function types [-Wattributes]
class FOLLY_NODISCARD ReadHolder {
^
/tmp/ccC6tpbI.s: Assembler messages:
/tmp/ccC6tpbI.s:45005: Error: symbol `_ZN5folly6detailL26is_similar_instantiation_vE' is already defined
CMakeFiles/folly_base.dir/build.make:283: recipe for target 'CMakeFiles/folly_base.dir/folly/Random.cpp.o' failed
make[2]: *** [CMakeFiles/folly_base.dir/folly/Random.cpp.o] Error 1
CMakeFiles/Makefile2:146: recipe for target 'CMakeFiles/folly_base.dir/all' failed
make[1]: *** [CMakeFiles/folly_base.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
Problem solved. Step 1: use g++-9 instead of g++-5 Step 2: compile and install zstd
I am trying to install folly on ubuntu 16:04.
I start with cmake
CMakeList.txt
I am using gcc and g++ 5.4 and my cmake is 3.19 - I appreciate any hint