facebook / proxygen

A collection of C++ HTTP libraries including an easy to use HTTP server.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build failed with quic

FanL1u opened this issue · comments

commented

Is there anyone who knows how to fix this problem? Thanks a lot. I built it using "./build.sh --with-quic". It can be successfully built and installed without the quic option.

~/proxygen-2023.01.02.00/proxygen/_build
Building Mvfst
-- Found Boost: /lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.62") found components: iostreams system thread filesystem regex context date_time program_options
-- Found Boost: /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: /home/fan/proxygen-2023.01.02.00/proxygen/_build/deps
-- Found folly: /home/fan/proxygen-2023.01.02.00/proxygen/_build/deps
-- Found fizz: /home/fan/proxygen-2023.01.02.00/proxygen/_build/deps
-- Found gflags from package config
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
/home/fan/proxygen-2023.01.02.00/proxygen/_build/deps/mvfst/quic/Boost_INCLUDE_DIR
used as include directory in directory /home/fan/proxygen-2023.01.02.00/proxygen/_build/deps/mvfst/quic

-- Configuring incomplete, errors occurred!
See also "/home/fan/proxygen-2023.01.02.00/proxygen/_build/deps/mvfst/build/CMakeFiles/CMakeOutput.log".
See also "/home/fan/proxygen-2023.01.02.00/proxygen/_build/deps/mvfst/build/CMakeFiles/CMakeError.log".

I am unable to reproduce this error.
It looks like an issue with Boost-1.71.
Cmake is able to find the library during the Config phase, but then for some reason it's not storing the path correctly?

One thing I would recommend trying is just rm -f _build and then run again ./build.sh --with-quic.
If you still hit the issue can you please paste here more information on which OS and version you are using, and maybe upload the full CMakeError.log file?
Thanks

commented

Thanks for your help. I deleted _build, ran ./build.sh --with-quic again, and got the same error. This is my OS info:
Distributor ID: Ubuntu
Description: Ubuntu 20.04.5 LTS
Release: 20.04
Codename: focal

The full CMakeError.log:
Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /home/fan/proxygen-2023.01.02.00/proxygen/_build/deps/mvfst/build/CMakeFiles/CMakeTmp

Run Build Command(s):/bin/make cmTC_d064d/fast && /bin/make -f CMakeFiles/cmTC_d064d.dir/build.make CMakeFiles/cmTC_d064d.dir/build
make[1]: Entering directory '/home/fan/proxygen-2023.01.02.00/proxygen/_build/deps/mvfst/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_d064d.dir/src.c.o
/bin/cc -DCMAKE_HAVE_LIBC_PTHREAD -o CMakeFiles/cmTC_d064d.dir/src.c.o -c /home/fan/proxygen-2023.01.02.00/proxygen/_build/deps/mvfst/build/CMakeFiles/CMakeTmp/src.c
Linking C executable cmTC_d064d
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d064d.dir/link.txt --verbose=1
/bin/cc -DCMAKE_HAVE_LIBC_PTHREAD CMakeFiles/cmTC_d064d.dir/src.c.o -o cmTC_d064d
/bin/ld: CMakeFiles/cmTC_d064d.dir/src.c.o: in function main': src.c:(.text+0x46): undefined reference to pthread_create'
/bin/ld: src.c:(.text+0x52): undefined reference to pthread_detach' /bin/ld: src.c:(.text+0x63): undefined reference to pthread_join'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_d064d.dir/build.make:87: cmTC_d064d] Error 1
make[1]: Leaving directory '/home/fan/proxygen-2023.01.02.00/proxygen/_build/deps/mvfst/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_d064d/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: /home/fan/proxygen-2023.01.02.00/proxygen/_build/deps/mvfst/build/CMakeFiles/CMakeTmp

Run Build Command(s):/bin/make cmTC_8ba93/fast && /bin/make -f CMakeFiles/cmTC_8ba93.dir/build.make CMakeFiles/cmTC_8ba93.dir/build
make[1]: Entering directory '/home/fan/proxygen-2023.01.02.00/proxygen/_build/deps/mvfst/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_8ba93.dir/CheckFunctionExists.c.o
/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_8ba93.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.16/Modules/CheckFunctionExists.c
Linking C executable cmTC_8ba93
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_8ba93.dir/link.txt --verbose=1
/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_8ba93.dir/CheckFunctionExists.c.o -o cmTC_8ba93 -lpthreads
/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_8ba93.dir/build.make:87: cmTC_8ba93] Error 1
make[1]: Leaving directory '/home/fan/proxygen-2023.01.02.00/proxygen/_build/deps/mvfst/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_8ba93/fast] Error 2

commented

This error seems like it can't even find pthreads, doesn't seem related to boost at all? Were you able to work around it or are you still stuck?

commented

Thank you. I changed to another machine and installed it.