【发布时间】:2021-10-04 09:35:40
【问题描述】:
在我的 Raspberry Pi 4B 上为 NGINX QUIC 编译 Google 的 BoringSSL 时遇到错误,其中运行的是 Raspberry Pi OS,又名 Raspbian buster。
我用来编译的命令
正如Google's document 所说,我使用了这些命令:
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
我也尝试过运行 cmake 而不通过 -DCMAKE_BUILD_TYPE=Release。
错误输出
这是错误消息的一部分。我没有显示整个输出,因为它太长了(有 352 行)。告诉我是否需要整个输出来解决这个问题。
[ 75%] Linking CXX executable crypto_test
/usr/bin/ld: CMakeFiles/crypto_test.dir/abi_self_test.cc.o: in function `ABITest_SanityCheck_Test::TestBody()':
/usr/include/c++/8/bits/unique_ptr.h:81: undefined reference to `abi_test_trampoline'
/usr/bin/ld: CMakeFiles/crypto_test.dir/abi_self_test.cc.o: in function `ABITest_ARM_Test::TestBody()':
/usr/include/c++/8/bits/stl_construct.h:107: undefined reference to `abi_test_clobber_r4'
/usr/bin/ld: /usr/include/c++/8/bits/stl_construct.h:107: undefined reference to `abi_test_trampoline'
/usr/bin/ld: /usr/include/c++/8/bits/stl_construct.h:107: undefined reference to `abi_test_clobber_r0'
/usr/bin/ld: /usr/include/c++/8/bits/stl_construct.h:107: undefined reference to `abi_test_clobber_r1'
/usr/bin/ld: /usr/include/c++/8/bits/stl_construct.h:107: undefined reference to `abi_test_clobber_r2'
......
附加信息
cmake version 3.16.3
GNU Make 4.2.1
$ uname -a
Linux Kaibins-RPi 5.10.52-v8+ #1439 SMP PREEMPT Thu Jul 22 15:43:49 BST 2021 aarch64 GNU/Linux
搜索了谷歌,但我找不到任何类似的案例。我需要帮助。非常感谢。
这个问题也可以在 Chromium bug tracker 中找到:https://crbug.com/boringssl/422。您可以在附件中找到完整的错误输出。
【问题讨论】:
-
他们的错误跟踪器是here。
-
我相信错误来自 STL 标头的事实是一个红鲱鱼。真正的问题是没有定义与 std::unique_ptr 一起使用的
abi_test_trampoline类/结构。这是您尝试编译的代码或其配置中的问题,或类似问题。
标签: linux cmake g++ gnu-make boringssl