openresty调用自己编译C动态库,无法找到其自己动态库依赖的库

vanlee90 发布于 2016/09/26 16:14
阅读 684
收藏 0

使用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

加载中
0
v
vanlee90
问题找到了,是生成的动态库有问题
返回顶部
顶部