makefile - 在 yocto 中使用 ssl 支持构建 pjproject 时未定义的引用
问题描述
我试图在 yocto 中使用 ssl 支持交叉编译 pjproject,但尝试构建 pjlib-test 时出错。我尝试在我的 .bb 文件中将 openssl 包添加到 DEPENDS,但没有任何变化。任何帮助,将不胜感激。
tmp/work/armv7at2hf-neon-mx6ul-fslc-linux-gnueabi/pjproject/2.8-r0/pjproject-2.8/third_party/lib -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fuse-ld=bfd -lssl -lcrypto -fuse-ld=bfd -lssl -lcrypto
| output/pjlib-test-arm-fslc-linux-gnueabi/ssl_sock.o: In function `get_cipher_list':
| /usr/src/debug/pjproject/2.8-r0/pjproject-2.8/pjlib/src/pjlib-test/ssl_sock.c:49: undefined reference to `pj_ssl_cipher_get_availables'
| /usr/src/debug/pjproject/2.8-r0/pjproject-2.8/pjlib/src/pjlib-test/ssl_sock.c:58: undefined reference to `pj_ssl_cipher_name'
| output/pjlib-test-arm-fslc-linux-gnueabi/ssl_sock.o: In function `ssl_on_data_sent':
| /usr/src/debug/pjproject/2.8-r0/pjproject-2.8/pjlib/src/pjlib-test/ssl_sock.c:362: undefined reference to `pj_ssl_sock_get_user_data'
| /usr/src/debug/pjproject/2.8-r0/pjproject-2.8/pjlib/src/pjlib-test/ssl_sock.c:377: undefined reference to `pj_ssl_sock_send'
| /usr/src/debug/pjproject/2.8-r0/pjproject-2.8/pjlib/src/pjlib-test/ssl_sock.c:393: undefined reference to `pj_ssl_sock_close'
| output/pjlib-test-arm-fslc-linux-gnueabi/ssl_sock.o: In function `ssl_on_data_read':
| /usr/src/debug/pjproject/2.8-r0/pjproject-2.8/pjlib/src/pjlib-test/ssl_sock.c:266: undefined reference to `pj_ssl_sock_get_user_data'
| /usr/src/debug/pjproject/2.8-r0/pjproject-2.8/pjlib/src/pjlib-test/ssl_sock.c:349: undefined reference to `pj_ssl_sock_close'
| /usr/src/debug/pjproject/2.8-r0/pjproject-2.8/pjlib/src/pjlib-test/ssl_sock.c:323: undefined reference to `pj_ssl_sock_get_info'
| /usr/src/debug/pjproject/2.8-r0/pjproject-2.8/pjlib/src/pjlib-test/ssl_sock.c:296: undefined reference to `pj_ssl_sock_send'
| output/pjlib-test-arm-fslc-linux-gnueabi/ssl_sock.o: In function `dump_ssl_info':
| /usr/src/debug/pjproject/2.8-r0/pjproject-2.8/pjlib/src/pjlib-test/ssl_sock.c:93: undefined reference to `pj_ssl_cipher_name'
| output/pjlib-test-arm-fslc-linux-gnueabi/ssl_sock.o: In function `ssl_on_connect_complete':
编辑:似乎是因为它没有检测到 openssl,我可以通过使用 --with-ssl= 标志来完成它,但我不知道在哪里指向这个标志,因为当我将它设置为 /usr 时 yocto 拒绝构建/lib libssl 所在的位置,或者如果我将其设置为 openssl 所在的 /usr/bin。
解决方案
我会首先检查为什么 pjproject 配置无法找到 openssl(它不应该是 linux 上的火箭科学)。但是您所要求的通常可以通过以下方式完成:
EXTRA_OECONF = "--with-ssl=${STAGING_DIR_HOST}${prefix}"
由于您没有分享您的食谱,因此无法判断这是否真的适用于您的情况。
推荐阅读
- node.js - 有没有一种简单的方法可以运行相同代码的 5 个不同实例?
- swift - Swift 组合链接 .mapError()
- c# - C# Web API 查询字符串中的可选参数
- reactjs - React Bootstrap - 一行中的微调器和按钮
- excel - 在工作簿之间切换时代码运行不流畅(Excel VBA)
- javascript - 硬刷新时找不到页面 - Reactjs
- c++ - 使用 AWS Lambda C++ 运行时通过 AWS Lambda 读取 S3 对象时发生内存泄漏
- javascript - 有没有办法在 PDF 中保留 scrollIntoView 行为?
- python - Python:遍历列表以填充 numpy 数组的优雅方法
- python-3.x - 为什么不打印分配的信件