当前位置:Gxlcms > PHP教程 > php-java-bridge安装问题

php-java-bridge安装问题

时间:2021-07-01 10:21:17 帮助过:8人阅读

php版本5.4.27
jdk版本1.6.0_25
php-java-bridge版本5.5.4.1

make后提示:make: *** [java.lo] Error 1

jdk从1.8降到1.6, php-java-bridge从5.4.4.1换到5.4.4.2换到5.5.4.1,都一样报这个错误。

不知道怎么排查这个问题,网上查了好久,也没有查到解决方法……

test@iZ23mo1jjurZ:/alidata/server/javabridge/php-java-bridge-5.5.4.1# make/bin/bash /alidata/server/javabridge/php-java-bridge-5.5.4.1/libtool --mode=compile cc -DEXTENSION_DIR="\"/alidata/server/php/lib/php/extensions/no-debug-non-zts-20100525\"" -I. -I/alidata/server/javabridge/php-java-bridge-5.5.4.1 -DPHP_ATOM_INC -I/alidata/server/javabridge/php-java-bridge-5.5.4.1/include -I/alidata/server/javabridge/php-java-bridge-5.5.4.1/main -I/alidata/server/javabridge/php-java-bridge-5.5.4.1 -I/alidata/server/php/include/php -I/alidata/server/php/include/php/main -I/alidata/server/php/include/php/TSRM -I/alidata/server/php/include/php/Zend -I/alidata/server/php/include/php/ext -I/alidata/server/php/include/php/ext/date/lib -I/alidata/server/jdk/java/include -I/alidata/server/jdk/java/include/linux  -D_REENTRANT -DHAVE_CONFIG_H  -g -O2 -pthread   -c /alidata/server/javabridge/php-java-bridge-5.5.4.1/java.c -o java.lo mkdir .libs cc -DEXTENSION_DIR=\"/alidata/server/php/lib/php/extensions/no-debug-non-zts-20100525\" -I. -I/alidata/server/javabridge/php-java-bridge-5.5.4.1 -DPHP_ATOM_INC -I/alidata/server/javabridge/php-java-bridge-5.5.4.1/include -I/alidata/server/javabridge/php-java-bridge-5.5.4.1/main -I/alidata/server/javabridge/php-java-bridge-5.5.4.1 -I/alidata/server/php/include/php -I/alidata/server/php/include/php/main -I/alidata/server/php/include/php/TSRM -I/alidata/server/php/include/php/Zend -I/alidata/server/php/include/php/ext -I/alidata/server/php/include/php/ext/date/lib -I/alidata/server/jdk/java/include -I/alidata/server/jdk/java/include/linux -D_REENTRANT -DHAVE_CONFIG_H -g -O2 -pthread -c /alidata/server/javabridge/php-java-bridge-5.5.4.1/java.c  -fPIC -DPIC -o .libs/java.o/alidata/server/javabridge/php-java-bridge-5.5.4.1/java.c:120:1: error: unknown type name ‘function_entry’/alidata/server/javabridge/php-java-bridge-5.5.4.1/java.c:121:3: warning: braces around scalar initializer [enabled by default]/alidata/server/javabridge/php-java-bridge-5.5.4.1/java.c:121:3: warning: (near initialization for ‘java_functions[0]’) [enabled by default]/alidata/server/javabridge/php-java-bridge-5.5.4.1/java.c:121:3: warning: initialization makes integer from pointer without a cast [enabled by default]/alidata/server/javabridge/php-java-bridge-5.5.4.1/java.c:121:3: warning: (near initialization for ‘java_functions[0]’) [enabled by default]/alidata/server/javabridge/php-java-bridge-5.5.4.1/java.c:121:3: error: initializer element is not computable at load time/alidata/server/javabridge/php-java-bridge-5.5.4.1/java.c:121:3: error: (near initialization for ‘java_functions[0]’)/alidata/server/javabridge/php-java-bridge-5.5.4.1/java.c:121:3: warning: excess elements in scalar initializer [enabled by default]/alidata/server/javabridge/php-java-bridge-5.5.4.1/java.c:121:3: warning: (near initialization for ‘java_functions[0]’) [enabled by default]/alidata/server/javabridge/php-java-bridge-5.5.4.1/java.c:121:3: warning: excess elements in scalar initializer [enabled by default]/alidata/server/javabridge/php-java-bridge-5.5.4.1/java.c:121:3: warning: (near initialization for ‘java_functions[0]’) [enabled by default]/alidata/server/javabridge/php-java-bridge-5.5.4.1/java.c:121:3: warning: excess elements in scalar initializer [enabled by default]/alidata/server/javabridge/php-java-bridge-5.5.4.1/java.c:121:3: warning: (near initialization for ‘java_functions[0]’) [enabled by default]/alidata/server/javabridge/php-java-bridge-5.5.4.1/java.c:121:3: warning: excess elements in scalar initializer [enabled by default]/alidata/server/javabridge/php-java-bridge-5.5.4.1/java.c:121:3: warning: (near initialization for ‘java_functions[0]’) [enabled by default]/alidata/server/javabridge/php-java-bridge-5.5.4.1/java.c:122:3: warning: braces around scalar initializer [enabled by default]/alidata/server/javabridge/php-java-bridge-5.5.4.1/java.c:122:3: warning: (near initialization for ‘java_functions[1]’) [enabled by default]/alidata/server/javabridge/php-java-bridge-5.5.4.1/java.c:122:3: warning: initialization makes integer from pointer without a cast [enabled by default]/alidata/server/javabridge/php-java-bridge-5.5.4.1/java.c:122:3: warning: (near initialization for ‘java_functions[1]’) [enabled by default]/alidata/server/javabridge/php-java-bridge-5.5.4.1/java.c:122:3: warning: excess elements in scalar initializer [enabled by default]/alidata/server/javabridge/php-java-bridge-5.5.4.1/java.c:122:3: warning: (near initialization for ‘java_functions[1]’) [enabled by default]/alidata/server/javabridge/php-java-bridge-5.5.4.1/java.c:122:3: warning: excess elements in scalar initializer [enabled by default]/alidata/server/javabridge/php-java-bridge-5.5.4.1/java.c:122:3: warning: (near initialization for ‘java_functions[1]’) [enabled by default]/alidata/server/javabridge/php-java-bridge-5.5.4.1/java.c:128:3: warning: initialization from incompatible pointer type [enabled by default]/alidata/server/javabridge/php-java-bridge-5.5.4.1/java.c:128:3: warning: (near initialization for ‘java_module_entry.functions’) [enabled by default]make: *** [java.lo] Error 1


回复讨论(解决方案)

已经解决了
编辑java.c这个文件
将function_entry改为zend_function_entry
make通过

人气教程排行