facebook/fbthrift

Faile to compile fbthrift directly or theogh CacheLib

Chokoabigail opened this issue · 0 comments

Here is the error code:

Previous HEAD position was f300129f Fix/improve/cleanup async test namespacing and build targets
HEAD is now at 39f0dbf0 Updating submodules
Previous HEAD position was 8005e59c Updating submodules
HEAD is now at c723645c Updating submodules
-- The CXX compiler identification is GNU 9.4.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
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0") found components: filesystem 
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1f")  
-- Found gflags from package config /CacheLib/opt/cachelib/lib/cmake/gflags/gflags-config.cmake
-- Found Glog: optimized;/usr/lib/x86_64-linux-gnu/libglog.so;debug;/CacheLib/opt/cachelib/lib/libglogd.so  
-- Found gflags as a dependency of glog::glog, include=/CacheLib/opt/cachelib/include, libs=gflags_shared
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.51.0") found components: context filesystem program_options regex system thread 
-- Found folly: /CacheLib/opt/cachelib
-- Found Sodium: /usr/lib/x86_64-linux-gnu/libsodium.so  
-- Found folly: /CacheLib/opt/cachelib
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") 
-- Found fizz: /CacheLib/opt/cachelib
-- Found wangle: /CacheLib/opt/cachelib
-- Found Zstd: /CacheLib/opt/cachelib/lib/libzstd.so  
-- ZSTD: /CacheLib/opt/cachelib/include
CMake Error at CMakeLists.txt:106 (find_package):
  Could not find a package configuration file provided by "mvfst" with any of
  the following names:

    mvfstConfig.cmake
    mvfst-config.cmake

  Add the installation prefix of "mvfst" to CMAKE_PREFIX_PATH or set
  "mvfst_DIR" to a directory containing one of the above files.  If "mvfst"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!
See also "/CacheLib/build-fbthrift/CMakeFiles/CMakeOutput.log".
See also "/CacheLib/build-fbthrift/CMakeFiles/CMakeError.log".
build-package.sh: error: cmake failed on cachelib/external/fbthrift
build.sh: error: failed to build dependency 'fbthrift'

This is the CMake out:



Determining if the include file pthread.h exists passed with the following output:
Change Dir: /CacheLib/build-fbthrift/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_6f24f/fast && /usr/bin/make -f CMakeFiles/cmTC_6f24f.dir/build.make CMakeFiles/cmTC_6f24f.dir/build
make[1]: Entering directory '/CacheLib/build-fbthrift/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_6f24f.dir/CheckIncludeFile.cxx.o
/usr/bin/c++     -o CMakeFiles/cmTC_6f24f.dir/CheckIncludeFile.cxx.o -c /CacheLib/build-fbthrift/CMakeFiles/CMakeTmp/CheckIncludeFile.cxx
Linking CXX executable cmTC_6f24f
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_6f24f.dir/link.txt --verbose=1
/usr/bin/c++       -rdynamic CMakeFiles/cmTC_6f24f.dir/CheckIncludeFile.cxx.o  -o cmTC_6f24f 
make[1]: Leaving directory '/CacheLib/build-fbthrift/CMakeFiles/CMakeTmp'



Determining if the function pthread_create exists in the pthread passed with the following output:
Change Dir: /CacheLib/build-fbthrift/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_9957c/fast && /usr/bin/make -f CMakeFiles/cmTC_9957c.dir/build.make CMakeFiles/cmTC_9957c.dir/build
make[1]: Entering directory '/CacheLib/build-fbthrift/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_9957c.dir/CheckFunctionExists.cxx.o
/usr/bin/c++    -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_9957c.dir/CheckFunctionExists.cxx.o -c /CacheLib/build-fbthrift/CMakeFiles/CheckLibraryExists/CheckFunctionExists.cxx
Linking CXX executable cmTC_9957c
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_9957c.dir/link.txt --verbose=1
/usr/bin/c++   -DCHECK_FUNCTION_EXISTS=pthread_create    -rdynamic CMakeFiles/cmTC_9957c.dir/CheckFunctionExists.cxx.o  -o cmTC_9957c  -lpthread 
make[1]: Leaving directory '/CacheLib/build-fbthrift/CMakeFiles/CMakeTmp'

This is the CMakeError.log:

Performing C++ SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /CacheLib/build-fbthrift/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_739c4/fast && /usr/bin/make -f CMakeFiles/cmTC_739c4.dir/build.make CMakeFiles/cmTC_739c4.dir/build
make[1]: Entering directory '/CacheLib/build-fbthrift/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_739c4.dir/src.cxx.o
/usr/bin/c++    -DCMAKE_HAVE_LIBC_PTHREAD   -o CMakeFiles/cmTC_739c4.dir/src.cxx.o -c /CacheLib/build-fbthrift/CMakeFiles/CMakeTmp/src.cxx
Linking CXX executable cmTC_739c4
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_739c4.dir/link.txt --verbose=1
/usr/bin/c++   -DCMAKE_HAVE_LIBC_PTHREAD    -rdynamic CMakeFiles/cmTC_739c4.dir/src.cxx.o  -o cmTC_739c4 
/usr/bin/ld: CMakeFiles/cmTC_739c4.dir/src.cxx.o: in function `main':
src.cxx:(.text+0x46): undefined reference to `pthread_create'
/usr/bin/ld: src.cxx:(.text+0x52): undefined reference to `pthread_detach'
/usr/bin/ld: src.cxx:(.text+0x63): undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_739c4.dir/build.make:87: cmTC_739c4] Error 1
make[1]: Leaving directory '/CacheLib/build-fbthrift/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_739c4/fast] Error 2


Source file was:
#include <pthread.h>

void* test_func(void* data)
{
  return data;
}

int main(void)
{
  pthread_t thread;
  pthread_create(&thread, NULL, test_func, NULL);
  pthread_detach(thread);
  pthread_join(thread, NULL);
  pthread_atfork(NULL, NULL, NULL);
  pthread_exit(NULL);

  return 0;
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /CacheLib/build-fbthrift/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_aadc5/fast && /usr/bin/make -f CMakeFiles/cmTC_aadc5.dir/build.make CMakeFiles/cmTC_aadc5.dir/build
make[1]: Entering directory '/CacheLib/build-fbthrift/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_aadc5.dir/CheckFunctionExists.cxx.o
/usr/bin/c++    -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_aadc5.dir/CheckFunctionExists.cxx.o -c /CacheLib/build-fbthrift/CMakeFiles/CheckLibraryExists/CheckFunctionExists.cxx
Linking CXX executable cmTC_aadc5
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_aadc5.dir/link.txt --verbose=1
/usr/bin/c++   -DCHECK_FUNCTION_EXISTS=pthread_create    -rdynamic CMakeFiles/cmTC_aadc5.dir/CheckFunctionExists.cxx.o  -o cmTC_aadc5  -lpthreads 
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_aadc5.dir/build.make:87: cmTC_aadc5] Error 1
make[1]: Leaving directory '/CacheLib/build-fbthrift/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_aadc5/fast] Error 2