我在 Fedora 16 上安装 SAM 1.1.0 时遇到问题,与此处相同https://bugs.php.net/bug.php?id=59632&thanks=6
这个问题与PHP库有关,我不太了解如何解决相关问题。我在网上搜索,找不到解决方案,请指教。谢谢。
[root@li3ro SAM-1.1.0]# phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
[root@li3ro SAM-1.1.0]# ./configure
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.13.5 (ok)
checking for gawk... gawk
checking for sam support... yes, shared
checking for sam xms support... yes, shared
checking for sam xms files in default path... found in /opt
checking for xmsConnFactCreate in -lgxi... no
configure: error: wrong sam XMS lib version or lib not found
这是 config.m4 :
dnl $Id: config.m4,v 1.4 2007/02/02 15:38:53 dsr Exp $
dnl config.m4 for extension sam
PHP_ARG_WITH(sam, for sam support,
[ --with-sam Include sam support])
PHP_ARG_WITH(sam_xms, for sam xms support,
[ --with-sam_xms[=DIR] Include sam_xms support])
if test "$PHP_SAM" != "no"; then
PHP_NEW_EXTENSION(sam, php_sam.c, $ext_shared, , -DLINUX)
if test "$PHP_SAM_XMS" != "no"; then
dnl # --with-sam_xms -> check with-path
SEARCH_PATH="/opt"
SEARCH_FOR="/IBM/XMS/tools/c/include/xms.h"
if test -r $PHP_SAM_XMS/; then # path given as parameter
SAM_DIR=$PHP_SAM_XMS
else # search default path list
AC_MSG_CHECKING([for sam xms files in default path])
for i in $SEARCH_PATH ; do
if test -r $i/$SEARCH_FOR; then
SAM_DIR=$i
AC_MSG_RESULT(found in $i)
fi
done
fi
if test -z "$SAM_DIR"; then
AC_MSG_RESULT([not found])
AC_MSG_ERROR([Please reinstall the XMS distribution])
fi
dnl # --with-sam_xms -> add include path
PHP_ADD_INCLUDE($SAM_DIR/IBM/XMS/tools/c/include)
dnl # --with-sam_xms -> check for lib and symbol presence
LIBNAME=gxi
LIBSYMBOL=xmsConnFactCreate
PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL,
[
PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $SAM_DIR/IBM/XMS/lib, SAM_XMS_SHARED_LIBADD)
AC_DEFINE(HAVE_SAMLIB,1,[ ])
],[
AC_MSG_ERROR([wrong sam XMS lib version or lib not found])
],[
-L$SAM_DIR/IBM/XMS/lib -lm -ldl
])
PHP_SUBST(SAM_XMS_SHARED_LIBADD)
PHP_NEW_EXTENSION(sam_xms, php_sam_xms.c SAM_XMS_Utils.c SAM_XMS_Connection.c, $ext_shared, , -DLINUX)
fi
fi
请注意,我已经安装了 XMS 并且服务器正在运行.. 我尝试了很多东西但没有成功,我该怎么办?