我有RHEL6服务器,并尝试为php 5.3编译Judy数组库。
ln -s
链接到与RPM一起安装的libJudy.so.1。但是还有libJudy.so.1.0.3 ......我应该为它做点什么...... 并且遇到了很多错误,例如:
expected specifier-qualifier-list before ‘Pvoid_t’
...
conflicting types for ‘zend_judy_globals’
和其他许多人 我制作了制作过程的strace日志,并发现了这个:
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/make.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/make.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/make.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/make.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/make.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/make.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "make: ", 6) = 6
write(2, "*** [php_judy.lo] Error 1", 25) = 25
write(2, "\n", 1) = 1
rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT TERM XCPU XFSZ], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
chdir("/usr/local/src/Judy-1.0.2") = 0
close(1) = 0
munmap(0x7f67e7b3f000, 4096) = 0
exit_group(2) = ?
这是日志的结尾。我坚持这个地方。不幸的是,我不是C编译专家(。
在终端我看到了:
/usr/local/src/Judy-1.0.2/php_judy.h:84: error: redefinition of ‘struct _judy_object’
/usr/local/src/Judy-1.0.2/php_judy.h:87: error: expected specifier-qualifier-list before ‘Pvoid_t’
/usr/local/src/Judy-1.0.2/php_judy.h:91: error: conflicting types for ‘judy_object’
/usr/local/src/Judy-1.0.2/php_judy.h:91: note: previous declaration of ‘judy_object’ was here
/usr/local/src/Judy-1.0.2/php_judy.h:102: error: conflicting types for ‘judy_object_new_ex’
/usr/local/src/Judy-1.0.2/php_judy.h:102: note: previous declaration of ‘judy_object_new_ex’ was here
/usr/local/src/Judy-1.0.2/php_judy.h:114: error: redefinition of ‘struct _zend_judy_globals’
/usr/local/src/Judy-1.0.2/php_judy.h:116: error: conflicting types for ‘zend_judy_globals’
/usr/local/src/Judy-1.0.2/php_judy.h:116: note: previous declaration of ‘zend_judy_globals’ was here
/usr/local/src/Judy-1.0.2/php_judy.h:118: error: conflicting types for ‘judy_globals’
/usr/local/src/Judy-1.0.2/php_judy.h:118: note: previous declaration of ‘judy_globals’ was here
In file included from /usr/local/src/Judy-1.0.2/judy_iterator.h:22,
from /usr/local/src/Judy-1.0.2/php_judy.c:26:
/usr/local/src/Judy-1.0.2/php_judy.h:129:2: error: #endif without #if
/usr/local/src/Judy-1.0.2/php_judy.c:29: error: conflicting types for ‘judy_globals’
/usr/local/src/Judy-1.0.2/php_judy.h:118: note: previous declaration of ‘judy_globals’ was here
/usr/local/src/Judy-1.0.2/php_judy.c:55: error: conflicting types for ‘judy_object_new_ex’
/usr/local/src/Judy-1.0.2/php_judy.h:102: note: previous declaration of ‘judy_object_new_ex’ was here
/usr/local/src/Judy-1.0.2/php_judy.c: In function ‘judy_object_new_ex’:
/usr/local/src/Judy-1.0.2/php_judy.c:69: error: ‘judy_object’ has no member named ‘next_empty_is_valid’
/usr/local/src/Judy-1.0.2/php_judy.c:70: error: ‘judy_object’ has no member named ‘next_empty’
/usr/local/src/Judy-1.0.2/php_judy.c: In function ‘judy_object_read_dimension_helper’:
/usr/local/src/Judy-1.0.2/php_judy.c:145: error: ‘Word_t’ undeclared (first use in this function)
/usr/local/src/Judy-1.0.2/php_judy.c:145: error: (Each undeclared identifier is reported only once
/usr/local/src/Judy-1.0.2/php_judy.c:145: error: for each function it appears in.)
/usr/local/src/Judy-1.0.2/php_judy.c:145: error: expected ‘;’ before ‘j_index’
/usr/local/src/Judy-1.0.2/php_judy.c:146: error: ‘Pvoid_t’ undeclared (first use in this function)
/usr/local/src/Judy-1.0.2/php_judy.c:146: error: ‘PValue’ undeclared (first use in this function)
谁能告诉我们要找什么?我发现这是翻译问题..但为什么呢?什么?怎么样? ..啊(请告诉我,如果你有类似的问题。