Open
Description
Problem
When building the LSQUIC project, users encountered linking errors related to C++ symbols from BoringSSL. The main issues were:
- The project was configured to use only C, but BoringSSL requires C++ support.
- The linker couldn't find certain C++ symbols, indicating a mismatch between the BoringSSL library and the LSQUIC project settings.
Solution
The solution involved several steps to properly integrate BoringSSL with LSQUIC:
-
Modified the CMakeLists.txt to include C++ support:
- Changed
PROJECT(lsquic C)
toPROJECT(lsquic C CXX)
- Changed
-
Added the C++ standard library to the linker flags:
- Modified the LIBS variable in CMakeLists.txt to include
-lstdc++
- Modified the LIBS variable in CMakeLists.txt to include
-
Ensured correct paths to BoringSSL were provided to CMake:
cmake -DBORINGSSL_DIR=/path/to/boringssl \ -DBORINGSSL_INCLUDE=/path/to/boringssl/include \ -DBORINGSSL_LIB_ssl=/path/to/boringssl/build/ssl/libssl.a \ -DBORINGSSL_LIB_crypto=/path/toboringssl/build/crypto/libcrypto.a \ ..
-
If necessary, rebuilt BoringSSL with compatible compiler settings:
cd /path/to/boringssl rm -rf build mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release .. make
Steps to Build LSQUIC
- Ensure BoringSSL is properly built and its path is known.
- Clean the LSQUIC build directory:
cd /path/to/lsquic/build rm -rf *
- Run CMake with the correct BoringSSL paths:
cmake -DBORINGSSL_DIR=/path/to/boringssl \ -DBORINGSSL_INCLUDE=/path/to/boringssl/include \ -DBORINGSSL_LIB_ssl=/path/to/boringssl/build/ssl/libssl.a \ -DBORINGSSL_LIB_crypto=/path/to/boringssl/build/crypto/libcrypto.a \ ..
- Build the project:
make
Metadata
Metadata
Assignees
Labels
No labels