参考Compiling PECL extensions statically into PHP。
我正在尝试使用--with-gnupg(gnupg-1.4.0)编译PHP 7.0.13:
./configure --prefix=/usr/local/php7013 --enable-fpm --with-fpm-user=lighttpd2 --with-fpm-group=lighttpd2 --enable-bcmath --with-gnupg
关于gnupg的部分输出:
checking for gnupg support... yes
checking for gnupg files in default path... found in /usr/include
checking for gpgme_check_version in -lgpgme... yes
checking for gpg... /usr/bin/gpg
但随后失败了:
/usr/bin/ld: ext/gnupg/gnupg_keylistiterator.o: undefined reference to symbol 'gpg_strerror'
/usr/bin/ld: note: 'gpg_strerror' is defined in DSO /lib64/libgpg-error.so.0 so try adding it to the linker command line
/lib64/libgpg-error.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
出了什么问题?