php-5.x.x 원본 컴파일 포인터 오류

6779 단어 활용단어참조

php-5.x.x 원본 컴파일 포인터 오류


고장 현상

node.c:1953:error dereferencing pointer to incomplete type

php5.2.17 make :

/usr/local/src/php-5.2.17/ext/dom/node.c: In function ‘dom_canonicalization’:

/usr/local/src/php-5.2.17/ext/dom/node.c:1953:21: error: dereferencing pointer to incomplete type

    ret = buf->buffer->use;

                     ^

In file included from /usr/local/src/php-5.2.17/main/php.h:38:0,

                 from /usr/local/src/php-5.2.17/ext/dom/node.c:26:

/usr/local/src/php-5.2.17/ext/dom/node.c:1955:40: error: dereferencing pointer to incomplete type

     RETVAL_STRINGL((char *) buf->buffer->content, ret, 1);

                                        ^

/usr/local/src/php-5.2.17/Zend/zend_API.h:472:14: note: in definition of macro ‘ZVAL_STRINGL’

   char *__s=(s); int __l=l;  \

              ^

/usr/local/src/php-5.2.17/ext/dom/node.c:1955:5: note: in expansion of macro ‘RETVAL_STRINGL’

     RETVAL_STRINGL((char *) buf->buffer->content, ret, 1);

     ^

make: *** [ext/dom/node.lo] Error 1

해결 방법:


외국의 한 사이트에서 이걸 찾았는데 다른 버전의 php도 똑같이 적용됩니다.
# curl -o php-5.x.x.patch https://mail.gnome.org/archives/xml/2012-August/txtbgxGXAvz4N.txt
# cd php-5.x.x
# patch -p0 -b < ./php-5.x.x.patch 

   patching file ext/dom/node.c

   patching file 

   ext/dom/documenttype.c

   patching file ext/simplexml/simplexml.c

다시 번역하면 된다.
다음에 또 다른 오류가 발생했습니다. 다음 오류는 다음과 같습니다.
/usr/bin/ld: ext/ldap/.libs/ldap.o: undefined reference to symbol 'ber_scanf'

/usr/bin/ld: note: 'ber_scanf' is defined in DSO /lib64/liblber-2.4.so.2 so try adding it to the linker command line 
/lib64/liblber-2.4.so.2: could not read symbols: Invalid operation 
collect2: ld returned 1 exit status 
make: *** [sapi/cli/php] Error 1 


libtool: unrecognized option `-export-dynamic' 
Try `libtool --help' for more information. 
make: *** [sapi/cli/php] Error 1 


/usr/bin/ld: ext/ldap/.libs/ldap.o: undefined reference to symbol 'ber_scanf' 
/usr/bin/ld: note: 'ber_scanf' is defined in DSO /lib64/liblber-2.4.so.2 so try adding it to the linker command line 
/lib64/liblber-2.4.so.2: could not read symbols: Invalid operation 
collect2: ld returned 1 exit status 

make: *** [sapi/cli/php] Error 1

해결 방법
./구성 후
MakeFile 편집
시작은 "EXTRA_"입니다.LIBS'라는 줄에'-llber'를 붙여서 make & & make install을 실행합니다.
원문 주소:http://blog.51cto.com/hhslinux/1951738 http://www.itkeyword.com/doc/0434952374652647031/error%20dereferencing%20pointer%20to%20incomplete%20type

좋은 웹페이지 즐겨찾기