openresty调用自己编译C动态库,无法找到其自己动态库依赖的库
使用FFI编写一个动态库,库里面调用openssl及相关的库,但是加载到openresty时,无法找到其依赖的openssl库和第三方的库,并且已放到usr/lib目录性,并在 lua_package_cpath '/lib64/?.so;/usr/lib/?.so;;';也无效
ldd -v ../openresty/lualib/libsvs.so
linux-vdso.so.1 => (0x00007ffd20feb000)
libc.so.6 => /lib64/libc.so.6 (0x00007f1d8c2e7000)
/lib64/ld-linux-x86-64.so.2 (0x000000319d600000)
Version information:
../openresty/lualib/libsvs.so:
libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6
/lib64/libc.so.6:
ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
[root@localhost svs]# ldd -r ../openresty/lualib/libsvs.so
linux-vdso.so.1 => (0x00007ffff878e000)
libc.so.6 => /lib64/libc.so.6 (0x00007f0a9b454000)
/lib64/ld-linux-x86-64.so.2 (0x000000319d600000)
undefined symbol: BIO_free (../openresty/lualib/libsvs.so)
undefined symbol: BIO_s_mem (../openresty/lualib/libsvs.so)
undefined symbol: PEM_write_bio_RSA_PUBKEY (../openresty/lualib/libsvs.so)
undefined symbol: BIO_ctrl (../openresty/lualib/libsvs.so)
undefined symbol: SDF_OpenSession (../openresty/lualib/libsvs.so)
undefined symbol: SDF_ExportSignPublicKey_RSA (../openresty/lualib/libsvs.so)
undefined symbol: BIO_new (../openresty/lualib/libsvs.so)
undefined symbol: BN_bin2bn (../openresty/lualib/libsvs.so)
undefined symbol: RSA_padding_check_PKCS1_type_2 (../openresty/lualib/libsvs.so)
undefined symbol: SDF_GetPrivateKeyAccessRight (../openresty/lualib/libsvs.so)
undefined symbol: RSA_new (../openresty/lualib/libsvs.so)
undefined symbol: RSA_free (../openresty/lualib/libsvs.so)
undefined symbol: SDF_OpenDevice (../openresty/lualib/libsvs.so)
undefined symbol: SDF_InternalPrivateKeyOperation_RSA (../openresty/lualib/libsvs.so)
undefined symbol: SDF_CloseDevice (../openresty/lualib/libsvs.so)
undefined symbol: SDF_ExportEncPublicKey_RSA (../openresty/lualib/libsvs.so)
undefined symbol: SDF_CloseSession (../openresty/lualib/libsvs.so)
undefined symbol: SDF_ReleasePrivateKeyAccessRight (../openresty/lualib/libs
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题找到了,是生成的动态库有问题