0

在我的 Raspberry Pi 4B 上编译 Google 的 BoringSSL for NGINX QUIC 时遇到错误,其中运行 Raspberry Pi OS,又名 Raspbian buster。

我用来编译的命令

正如谷歌的文档所说,我使用了这些命令:

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。您可以在附件中找到完整的错误输出。

4

1 回答 1

0

OpenWrt有一个boringssl 包,它支持BCM2711 板(Raspberry Pi 4B 正在使用的板)。甚至还有一个PR 草案来打包带有 QUIC 支持的 nginx。所以,原则上,BoringSSL 和 nginx-quic 在这个架构上工作。OpenWrt 中使用的 BoringSSL 版本是从2021 年 6 月开始的。

我还在 Raspberry Pi OS 上编译了 BoringSSL,没有任何问题。这些是我记录的在 Debian 上编译的步骤,根据我的记忆,在 Raspberry Pi OS 上也是如此:

sudo apt install cmake libpcre3-dev golang mercurial
git clone https://boringssl.googlesource.com/boringssl && cd boringssl
mkdir build && cd build
cmake ..
make -j16
cd ../..
hg clone -b quic https://hg.nginx.org/nginx-quic && cd nginx-quic
./auto/configure --with-debug --with-http_v3_module --with-cc-opt="-I../boringssl/include" --with-ld-opt="-L../boringssl/build/ssl -L../boringssl/build/crypto"
make -j16
sudo cp objs/nginx /usr/bin/nginx-quic

如果我有时间,我可以尝试使用更新的版本再次验证这一点。

于 2021-11-28T16:13:58.107 回答