#20229 [Fbk]: PHP4 Compile errors with mysql module
| From: | msopacua@php.net | Date: | Tue, 05 Nov 2002 16:18:47 +0000 |
| Subject: | #20229 [Fbk]: PHP4 Compile errors with mysql module | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-24127@lists.php.net to get a copy of this message | ||
ID: 20229
Updated by: msopacua@php.net
Reported By: idave@idave.it
Status: Feedback
Bug Type: Compile Failure
Operating System: RedHat Linux 8.0
PHP Version: 4CVS-2002-11-03
New Comment:
Ok, there are obviously characters missing
(-I/root/build/php4/inclmain).
The trick is, to get the line that fails, than strip -prefer-pic and
add -E after gcc and change the output file to php_mysql.out by adding
that to -o.
That calls the pre-processor on the file named after -c and resolves
all pre-processor macro's and includes.
If you have an issue with your terminal, please use the 'script(1)'
command, to capture all output from the make process to a file.
Since RedHat, comes with a stock gcc3 and you're trying to use gcc2,
there's some conflict with headers going on, that creates buggy
preprocessor macro's and/or defines.
That's why we're asking you to do this - it can be a local issue, or it
can be a product of 'using gcc2 on RedHat 8'.
Previous Comments:
------------------------------------------------------------------------
[2002-11-05 09:01:40] idave@idave.it
[root@idave php4]# /usr/local/gcc2/bin/gcc -E
-I/root/build/php4/ext/mysql/ -I/root/build/php4/ext/mysql/
-DPHP_ATOM_INC -I/root/build/php4/inclmain -I/root/build/php4
-I/root/build/php4/Zend -I/usr/local/ssl/include
-I/usr/local/include/libxml2 -I/usr/local/include/freetype2
-I/usr/local/gd/include -I/usr/local/pgsql/include
-I/root/build/php4/ext/xml/expat -DLINUX=22 -DMOD_SSL=EAPI
-I/root/build/php4/TSRM -g -O2 -prefer-pic -c
/root/build/php4/ext/mysql/php_mysql.c -o php_mysql.out
gcc: unrecognized option `-prefer-pic'
/root/build/php4/ext/mysql/php_mysql.c:32: php.h: No such file or
directory
/root/build/php4/ext/mysql/php_mysql.c:33: php_globals.h: No such file
or directory
[root@idave php4]#
[root@idave php4]# grep -10 'For AIX string library' ./php_mysql.out
grep: ./php_mysql.out: No such file or directory
[root@idave php4]#
------------------------------------------------------------------------
[2002-11-03 17:40:45] msopacua@php.net
I guess we're missing some characters, because:
-c /root/build/php4/ext/mysql/l/php_mysql.lo
Doesn't add up.
IIC:
try this line:
/usr/local/gcc2/bin/gcc -E
-I/root/build/phIext/mysql/ -I/root/build/php4/ext/mysql/
-DPHP_ATOM_INC -I/root/build/php4/inclmain -I/root/build/php4
-I/root/build/php4/Zend -I/usr/local/ssl/include
-I/usr/cal/include/libxml2
-I/usr/local/include/freetype2 -I/usr/local/gd/include
-I/us/usr/local/pgsql/include -I/root/build/php4/ext/xml/expat
-DLINUX=22
-DMOD_SSL=EAPI -I/root/build/php4/TSRM -g -O2 -prefer-pic -c
/root/build/php4/ext/mysql/libmysql/php_mysql.c -o php_mysql.out
Please adjust the missing characters.
then try:
grep -10 'For AIX string library' ./php_mysql.out
If that has any output, please paste it here.
------------------------------------------------------------------------
[2002-11-03 11:07:54] idave@idave.it
Got php from CVS, following the instructions found @
http://php.net/anoncvs, with the right versions of autoconf,
automake
and libtool.
Configured with these arguments:
CC=/usr/local/gcc2/bin/gcc CXX=/usr/local/gcc2/bin/g++ sh configure
--disable-debug
--with-bz2=/usr/local --with-curl=/usr/local --with-dom=/usr/local
--with-png-dir=/usr/local --with-gd=/usr/local/gd
--enable-gd-native-ttf --with-gdbm=/usr/local --with-gmp=/usr/local
--with-jpeg-dir=/usr/local --with-xml --with-zlib=/usr/local
--enable-exif --enable-ftp --enable-magic-quotes --enable-sockets
--enable-sysvsem --enable-sysvshm --enable-discard-path
--enable-trans-sid --enable-wddx --with-kerberos --with-mysql
--enable-bcmath --enable-shmop --enable-versioning --enable-calendar
--enable-dbx --enable-dio --enable-mbstring --enable-mbstr-enc-trans
--with-apxs=/usr/local/apache/bin/apxs --with-freetype-dir=/usr/local
--with-mhash=/usr/local --with-mcal=/usr/local/mcal
--with-pgsql=/usr/local/pgsql --with-openssl=shared,/usr/local/ssl
--with-mysql
(CC=/usr/local/gcc2/bin/gcc is GCC 2.95.3)
Once configured, I type "make" and all goes ok, but once it arrives to
the mysql module...
/bin/sh libtool --silent --mode=compile /usr/local/gcc2/bin/gcc
-I/root/build/phIext/mysql/ -I/root/build/php4/ext/mysql/
-DPHP_ATOM_INC -I/root/build/php4/inclmain -I/root/build/php4
-I/root/build/php4/Zend -I/usr/local/ssl/include
-I/usr/cal/include/libxml2 -I/usr/local/include/freetype2
-I/usr/local/gd/include -I/us/usr/local/pgsql/include
-I/root/build/php4/ext/xml/expat -DLINUX=22 -DMOD_SSL=EAPI
-I/root/build/php4/TSRM -g -O2 -prefer-pic -c
/root/build/php4/ext/mysql/l/php_mysql.lo
/bin/sh libtool --silent --mode=compile /usr/local/gcc2/bin/gcc
-I/root/build/phIext/mysql/ -I/root/build/php4/ext/mysql/
-DPHP_ATOM_INC -I/root/build/php4/inclmain -I/root/build/php4
-I/root/build/php4/Zend -I/usr/local/ssl/include
-I/usr/cal/include/libxml2 -I/usr/local/include/freetype2
-I/usr/local/gd/include -I/us/usr/local/pgsql/include
-I/root/build/php4/ext/xml/expat -DLINUX=22 -DMOD_SSL=EAPI
-I/root/build/php4/TSRM -g -O2 -prefer-pic -c
/root/build/php4/ext/mysql/ext/mysql/libmysql/libmysql.lo
In file included from
/root/build/php4/ext/mysql/libmysql/libmysql.c:4:
/root/build/php4/ext/mysql/libmysql/global.h:136: parse error
In file included from
/root/build/php4/ext/mysql/libmysql/libmysql.c:4:
/root/build/php4/ext/mysql/libmysql/global.h:505: parse error
In file included from
/root/build/php4/ext/mysql/libmysql/libmysql.c:11:
/root/build/php4/ext/mysql/libmysql/m_string.h:208: parse error
make: *** [ext/mysql/libmysql/libmysql.lo] Error 1
I tried configuring with the following options:
1) --with-mysql=shared,/usr/local/mysql
2) --with-mysql=/usr/local/mysql
Nothing changed.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20229&edit=1