alibaba / xquic

XQUIC Library released by Alibaba is a cross-platform implementation of QUIC and HTTP/3 protocol.
Apache License 2.0
1.7k stars 327 forks source link

[Bug]: xqc_build.sh build iOS failed #33

Closed ruiqizhou closed 2 years ago

ruiqizhou commented 2 years ago

What happened?

As discussions #21 , build iOS failed using xqc_build.sh

Steps To Reproduce

As discussions #21

macOS 11.4 Xcode 12.5 cmake version 3.21.2

1.export IOS_CMAKE_TOOLCHAIN="xx/xquic/cmake/ios.toolchain.cmake"

  1. sh xqc_build.sh ios ios_build ios_release xxx/xquic/third_party/boringssl

output: [ 1%] Generating crypto_test_data.cc make[2]: No rule to make target xxx/xquic/bssl_symbols.txt', needed by third_party/boringssl/symbol_prefix_include/boringssl_prefix_symbols.h'. Stop. make[1]: [third_party/boringssl/CMakeFiles/boringssl_prefix_symbols.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... [ 1%] Building CXX object third_party/boringssl/CMakeFiles/boringssl_gtest.dir/third_party/googletest/src/gtest-all.cc.o [ 1%] Building CXX object third_party/boringssl/CMakeFiles/crypto_test_data.dir/crypto_test_data.cc.o [ 1%] Built target crypto_test_data [ 1%] Linking CXX static library ../../outputs/libboringssl_gtest.a [ 1%] Built target boringssl_gtest make: [all] Error 2

Relevant log output

No response

dourgulf commented 2 years ago

Same problem

lurker-Chen commented 2 years ago

Same problem

https://github.com/alibaba/xquic/discussions/21

ruiqizhou commented 2 years ago

Same problem

Hi, there is a temporary solution: https://github.com/alibaba/xquic/discussions/21#discussioncomment-1947115

dourgulf commented 2 years ago

Find a solution keep borningssl prefix

  1. Change borningssl CMakeLists.txt, remove the contents of the red box image

  2. Change xquic cmake/CMakeLists.txt, image comment line # include_directories(${SSL_PATH}/symbol_prefix_include) change to include_directories(${CMAKE_CURRENT_BINARY_DIR}/${SSL_PATH}/symbol_prefix_include)

  3. Change bssl_symbols.txt comment two line image

Note: I am not sure such two symbol really exported.

lurker-Chen commented 2 years ago

Thanks you for your solution ! It only needs to modify borningssl CMakeLists.txt. Change as what you do in step 1 or delete the command "DEPENDS util/make_prefix_headers.go ${CMAKE_BINARY_DIR}/${BORINGSSL_PREFIX_SYMBOLS} ". It is similar to https://stackoverflow.com/questions/4010212/cmake-struggling-with-add-custom-command-dependencies

lurker-Chen commented 2 years ago

It is not usually necessary to use prefix_symbols. If you really need the feature, you should update bssl_symbols.txt using util/read_symbols.go in boringssl when boringssl is updated. image https://github.com/google/boringssl/blob/master/BUILDING.md