#45717 [Asn->Csd]: Fileinfo/libmagic build fails, missing err.h and getopt.h
| From: | derick@php.net | Date: | Wed, 06 Aug 2008 14:30:15 +0000 |
| Subject: | #45717 [Asn->Csd]: Fileinfo/libmagic build fails, missing err.h and getopt.h | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-127665@lists.php.net to get a copy of this message | ||
ID: 45717
Updated by: derick@php.net
Reported By: Bjorn dot Wiberg at its dot uu dot se
-Status: Assigned
+Status: Closed
Bug Type: Compile Failure
Operating System: IBM AIX 5.3 5300-08-01-0819
PHP Version: 5.3.0alpha1
Assigned To: derick
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2008-08-05 09:01:42] Bjorn dot Wiberg at its dot uu dot se
Description:
------------
The bundled Fileinfo extension comes with libmagic sources, which look
for err.h and getopt.h, which appear not to exist on IBM AIX systems.
Is there perhaps a possibility of pointing to an existing libmagic
installation? I have libmagic installed in /usr/local but cannot find a
way to make the bundled Fileinfo extension use that one.
Currently (5.2.6) we're using the Fileinfo 1.0.4 extension with the
existing libmagic (file 4.21) installation, and that works fine... but
would like to be able to use the Fileinfo bundled with PHP 5.3 instead.
Reproduce code:
---------------
#! /bin/sh
#
# Created by configure
CC='gcc' \
'./configure' \
'--enable-bcmath' \
'--enable-calendar' \
'--enable-cli' \
'--enable-dba' \
'--enable-dbase' \
'--enable-debug' \
'--enable-exif' \
'--enable-flatfile' \
'--enable-ftp' \
'--enable-gd-jis-conv' \
'--enable-gd-native-ttf' \
'--enable-inifile' \
'--enable-mbstring' \
'--enable-pcntl' \
'--enable-shmop' \
'--enable-soap' \
'--enable-sockets' \
'--enable-sqlite-utf8' \
'--enable-sysvmsg' \
'--enable-sysvsem' \
'--enable-sysvshm' \
'--enable-wddx' \
'--enable-zip' \
'--enable-zend-multibyte' \
'--prefix=/apache/php' \
'--with-apxs2=/apache/bin/apxs' \
'--with-bz2' \
'--with-cdb' \
'--with-curl' \
'--with-freetype-dir' \
'--with-gd' \
'--with-gdbm' \
'--with-gettext' \
'--with-jpeg-dir' \
'--with-ldap' \
'--with-libxml-dir=/usr/local' \
'--with-mime-magic' \
'--with-mysql=mysqlnd' \
'--with-mysqli=mysqlnd' \
'--with-openssl=/opt/freeware' \
'--with-pdo-mysql=mysqlnd' \
'--with-png-dir' \
'--with-ttf' \
'--with-xmlrpc' \
'--with-xpm-dir' \
'--with-xsl' \
'--with-zlib' \
'--with-zlib-dir' \
"$@"
Expected result:
----------------
Successful compilation.
Actual result:
--------------
---8<--- begin excerpt ---8<---
gcc -I/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic
-Iext/fileinfo/ -I/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/
-DPHP_ATOM_INC -I/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/include
-I/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/main
-I/home/bwiberg/rpm/BUILD/php-5.3.0alpha1
-I/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/ereg/regex
-I/usr/local/include/libxml2 -I/opt/freeware/include
-I/usr/local/include
-I/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/date/lib
-I/usr/X11R6/include -I/usr/include/freetype2
-I/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/mbstring/oniguruma
-I/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/mbstring/libmbfl
-I/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/mbstring/libmbfl/mbfl
-I/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/sqlite3/libsqlite
-I/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/TSRM
-I/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/Zend -I/usr/include -g
-fvisibility=hidden -O0 -Wall -c
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c
-DPIC -o ext/fileinfo/libmagic/.libs/getopt_long.o
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:33:17:
error: err.h: No such file or directory
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:35:20:
error: getopt.h: No such file or directory
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:47:
warning: visibility attribute not supported in this configuration;
ignored
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:48:
warning: visibility attribute not supported in this configuration;
ignored
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:49:
warning: visibility attribute not supported in this configuration;
ignored
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:76:
error: parse error before '__P'
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:77:
error: parse error before '__P'
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:78:
error: parse error before '__P'
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:
In function 'getopt_internal':
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:250:
warning: implicit declaration of function 'warnx'
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:
In function 'getopt_long':
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:392:
error: invalid use of undefined type 'struct option'
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:392:
error: dereferencing pointer to incomplete type
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:394:
error: invalid use of undefined type 'struct option'
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:394:
error: dereferencing pointer to incomplete type
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:398:
error: invalid use of undefined type 'struct option'
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:398:
error: dereferencing pointer to incomplete type
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:407:
error: invalid use of undefined type 'struct option'
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:407:
error: dereferencing pointer to incomplete type
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:407:
error: invalid use of undefined type 'struct option'
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:407:
error: dereferencing pointer to incomplete type
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:407:
error: invalid use of undefined type 'struct option'
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:407:
error: dereferencing pointer to incomplete type
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:407:
error: invalid use of undefined type 'struct option'
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:407:
error: dereferencing pointer to incomplete type
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:407:
error: invalid use of undefined type 'struct option'
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:407:
error: dereferencing pointer to incomplete type
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:407:
error: invalid use of undefined type 'struct option'
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:407:
error: dereferencing pointer to incomplete type
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:419:
error: invalid use of undefined type 'struct option'
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:419:
error: dereferencing pointer to incomplete type
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:420:
error: 'no_argument' undeclared (first use in this function)
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:420:
error: (Each undeclared identifier is reported only once
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:420:
error: for each function it appears in.)
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:428:
error: invalid use of undefined type 'struct option'
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:428:
error: dereferencing pointer to incomplete type
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:429:
error: invalid use of undefined type 'struct option'
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:429:
error: dereferencing pointer to incomplete type
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:434:
error: invalid use of undefined type 'struct option'
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:434:
error: dereferencing pointer to incomplete type
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:434:
error: 'required_argument' undeclared (first use in this function)
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:435:
error: invalid use of undefined type 'struct option'
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:435:
error: dereferencing pointer to incomplete type
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:435:
error: 'optional_argument' undeclared (first use in this function)
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:438:
error: invalid use of undefined type 'struct option'
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:438:
error: dereferencing pointer to incomplete type
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:447:
error: invalid use of undefined type 'struct option'
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:447:
error: dereferencing pointer to incomplete type
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:459:
error: invalid use of undefined type 'struct option'
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:459:
error: dereferencing pointer to incomplete type
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:460:
error: invalid use of undefined type 'struct option'
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:460:
error: dereferencing pointer to incomplete type
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:472:
error: invalid use of undefined type 'struct option'
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:472:
error: dereferencing pointer to incomplete type
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:473:
error: invalid use of undefined type 'struct option'
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:473:
error: dereferencing pointer to incomplete type
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:473:
error: invalid use of undefined type 'struct option'
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:473:
error: dereferencing pointer to incomplete type
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:476:
error: invalid use of undefined type 'struct option'
/home/bwiberg/rpm/BUILD/php-5.3.0alpha1/ext/fileinfo/libmagic/getopt_long.c:476:
error: dereferencing pointer to incomplete type
make: *** [ext/fileinfo/libmagic/getopt_long.lo] Error 1
Bad exit status from /var/opt/freeware/tmp/rpm-tmp.6384 (%build)
--->8--- end excerpt --->8---
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45717&edit=1