php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39185 Failure on compiling libxml support
Submitted: 2006-10-18 13:38 UTC Modified: 2006-10-18 15:29 UTC
From: mwp at internode dot on dot net Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5.1.6 OS: Linux 2.6.18
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mwp at internode dot on dot net
New email:
PHP Version: OS:

 

 [2006-10-18 13:38 UTC] mwp at internode dot on dot net
Description:
------------
Compiling PHP with:

./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-zlib --with-bz2 --enable-exif --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-mysql=/usr/local/mysql --with-mysql-sock=/tmp/mysql.sock --disable-pear

Using GCC 4.1.1, libxml2-2.6.26 (compiled from source) fails in "ext/libxml/libxml.c".

With:

/bin/sh /data/backup/linux/php-5.1.6/libtool --silent --preserve-dup-deps --mode=compile gcc  -Iext/libxml/ -I/data/backup/linux/php-5.1.6/ext/libxml/ -DPHP_ATOM_INC -I/data/backup/linux/php-5.1.6/include -I/data/backup/linux/php-5.1.6/main -I/data/backup/linux/php-5.1.6 -I/usr/include/libxml2 -I/data/backup/linux/php-5.1.6/ext/date/lib -I/usr/local/mysql/include/mysql -I/data/backup/linux/php-5.1.6/TSRM -I/data/backup/linux/php-5.1.6/Zend    -I/usr/include -g -O2  -prefer-non-pic -c /data/backup/linux/php-5.1.6/ext/libxml/libxml.c -o ext/libxml/libxml.lo
/data/backup/linux/php-5.1.6/ext/libxml/libxml.c: In function 'php_libxml_output_buffer_create_filename':
/data/backup/linux/php-5.1.6/ext/libxml/libxml.c:397: warning: assignment makes pointer from integer without a cast
/data/backup/linux/php-5.1.6/ext/libxml/libxml.c:399: error: dereferencing pointer to incomplete type
/data/backup/linux/php-5.1.6/ext/libxml/libxml.c:400: error: dereferencing pointer to incomplete type
/data/backup/linux/php-5.1.6/ext/libxml/libxml.c:401: error: dereferencing pointer to incomplete type
/data/backup/linux/php-5.1.6/ext/libxml/libxml.c: In function 'zm_startup_libxml':
/data/backup/linux/php-5.1.6/ext/libxml/libxml.c:603: error: 'XML_SAVE_NO_DECL' undeclared (first use in this function)
/data/backup/linux/php-5.1.6/ext/libxml/libxml.c:603: error: (Each undeclared identifier is reported only once
/data/backup/linux/php-5.1.6/ext/libxml/libxml.c:603: error: for each function it appears in.)
make: *** [ext/libxml/libxml.lo] Error 1



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-18 13:40 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip


 [2006-10-18 13:55 UTC] mwp at internode dot on dot net
compiling php5.2-200610181230 (your latest link) gave exactly the same errors.
 [2006-10-18 13:58 UTC] mwp at internode dot on dot net
If it makes a difference, this is a VERY new install of linux-from-scratch, so latest versions glibc, gcc, binutils, kernel, etc, etc.
It is however not a system setup problem, every other util/app i have installed has compiled without problems (x, mysql, apache, etc, etc).
 [2006-10-18 14:01 UTC] tony2001@php.net
Are you sure you don't have any other libxml2 (or just headers of libxml2) installed in your system?
What do you get with `xml2-config --version` and `locate "xmlstring.h"` ?
 [2006-10-18 14:02 UTC] rrichards@php.net
Check that you dont have multiple version of libxml2 around and that the wrong one is being used. XML_SAVE_NO_DECL (one of your errors) has existed in libxml2 since 2.6.21.
 [2006-10-18 14:18 UTC] mwp at internode dot on dot net
I am very sure i do not have multiple installations of libxml2 as this is a clean system and i installed it for the first time a few hours ago.

[root@dog php-5.1.6]# xml2-config --version
2.6.26

[root@dog php-5.1.6]# locate "xmlstring.h"
/usr/include/libxml2/libxml/xmlstring.h
/usr/share/doc/libxml2-2.6.26/html/html/libxml-xmlstring.html
/usr/share/gtk-doc/html/libxml2/libxml2-xmlstring.html
 [2006-10-18 14:29 UTC] rrichards@php.net
Did you build non-standard libxml2 so it doesn't support output?

Whats the complete output (including the compiled with part) of:
xmllint --version
 [2006-10-18 15:19 UTC] mwp at internode dot on dot net
Problem solved.

It seems it was caused by custom GCC options (only -Os -mtune=athlon-xp -fomit-frame-pointer) that i used while compiling libxml2.

Thankyou, and sorry for the wasted time.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 07 16:01:35 2024 UTC