PHP8编译swoole出错,【php】swoole4.4.8编译报错

./configure –enable-openssl –enable-http2 –enable-sockets –enable-async-redis –enable-mysqlnd –with-openssl-dir=/usr/local/openssl –with-php-config=/usr/local/phpstudy/soft/php/php-7.2.21/bin/php-config

下面是报错信息

/usr/bin/ld: /usr/local/openssl/lib/libcrypto.a(bn_exp2.o): relocation R_X86_64_32 against `.rodata.str1.1′ can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/local/openssl/lib/libcrypto.a(bn_gf2m.o): relocation R_X86_64_32 against `.rodata.str1.1′ can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/local/openssl/lib/libcrypto.a(ec_print.o): relocation R_X86_64_32 against `.rodata.str1.1′ can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/local/openssl/lib/libcrypto.a(rsa_saos.o): relocation R_X86_64_32 against `.rodata.str1.1′ can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/local/openssl/lib/libcrypto.a(rsa_pss.o): relocation R_X86_64_32 against `.rodata.str1.1′ can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/local/openssl/lib/libcrypto.a(dsa_gen.o): relocation R_X86_64_32 against `.rodata.str1.1′ can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/local/openssl/lib/libcrypto.a(dh_gen.o): relocation R_X86_64_32 against `.rodata.str1.1′ can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/local/openssl/lib/libcrypto.a(dso_dlfcn.o): relocation R_X86_64_32 against `.rodata.str1.1′ can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/local/openssl/lib/libcrypto.a(eng_fat.o): relocation R_X86_64_32 against `.rodata.str1.1′ can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/local/openssl/lib/libcrypto.a(eng_cnf.o): relocation R_X86_64_32 against `.rodata.str1.1′ can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/local/openssl/lib/libcrypto.a(evp_cnf.o): relocation R_X86_64_32 against `.rodata.str1.1′ can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/local/openssl/lib/libcrypto.a(a_set.o): relocation R_X86_64_32 against `.rodata.str1.1′ can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/local/openssl/lib/libcrypto.a(a_mbstr.o): relocation R_X86_64_32 against `.rodata.str1.1′ can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/local/openssl/lib/libcrypto.a(a_bool.o): relocation R_X86_64_32 against `.rodata.str1.1′ can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/local/openssl/lib/libcrypto.a(bio_ndef.o): relocation R_X86_64_32 against `.rodata.str1.1′ can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/local/openssl/lib/libcrypto.a(asn_mime.o): relocation R_X86_64_32 against `.text’ can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/local/openssl/lib/libcrypto.a(asn_moid.o): relocation R_X86_64_32 against `.rodata.str1.1′ can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/local/openssl/lib/libcrypto.a(e_gost_err.o): relocation R_X86_64_32 against `.data’ can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/local/openssl/lib/libcrypto.a(gost2001_keyx.o): relocation R_X86_64_32 against symbol `GostR3411_94_CryptoProParamSet’ can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/local/openssl/lib/libcrypto.a(gost2001.o): relocation R_X86_64_32 against `.rodata.str1.1′ can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/local/openssl/lib/libcrypto.a(gost89.o): relocation R_X86_64_32 against symbol `GostR3411_94_TestParamSet’ can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/local/openssl/lib/libcrypto.a(gost94_keyx.o): relocation R_X86_64_32 against symbol `GostR3411_94_CryptoProParamSet’ can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/local/openssl/lib/libcrypto.a(gost_ameth.o): relocation R_X86_64_32 against `.rodata.str1.1′ can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/local/openssl/lib/libcrypto.a(gost_asn1.o): relocation R_X86_64_32 against symbol `GOST_KEY_TRANSPORT_it’ can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/local/openssl/lib/libcrypto.a(gost_crypt.o): relocation R_X86_64_32 against `.rodata.str1.1′ can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/local/openssl/lib/libcrypto.a(gost_ctl.o): relocation R_X86_64_32 against `.rodata.str1.1′ can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/local/openssl/lib/libcrypto.a(bio_b64.o): relocation R_X86_64_32 against `.rodata.str1.1′ can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/local/openssl/lib/libcrypto.a(bio_asn1.o): relocation R_X86_64_32 against `.rodata.str1.1′ can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: final link failed: Nonrepresentable section on output

collect2: error: ld returned 1 exit status

make: * [swoole.la] 错误 1

回答

你需要将openssl编译为动态链接库。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值