swoole / phpy

Connecting the Python and PHP ecosystems together
Apache License 2.0
542 stars 44 forks source link

模块加载报错 #5

Closed akin520 closed 10 months ago

akin520 commented 11 months ago

/usr/local/php83/bin/php -m PHP Warning: PHP Startup: Unable to load dynamic library 'phpy.so' (tried: /usr/local/php83/lib/php/extensions/no-debug-non-zts-20230831/phpy.so (/usr/local/php83/lib/php/extensions/no-debug-non-zts-20230831/phpy.so: undefined symbol: _ZNSt8ios_base4InitD1Ev), /usr/local/php83/lib/php/extensions/no-debug-non-zts-20230831/phpy.so.so (/usr/local/php83/lib/php/extensions/no-debug-non-zts-20230831/phpy.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 PHP需要怎么编译,是不是不能启用php-fpm?

matyhtf commented 11 months ago

可能是 C++ 编译器的问题,试试修改 config.m4CXXFLAGS 添加 -lstdc++

akin520 commented 11 months ago

` CXXFLAGS="$CXXFLAGS -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -z now" CXXFLAGS="$CXXFLAGS -std=c++14 -lstdc++" 还是报同样的错误

matyhtf commented 10 months ago

已修复,与 #40 重复