ID: 20229
Comment by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Feedback
Bug Type: Compile Failure
Operating System: RedHat Linux 8.0
PHP Version: 4CVS-2002-11-03
New Comment:
Just sent.
Previous Comments:
------------------------------------------------------------------------
[2002-11-05 13:00:05] [EMAIL PROTECTED]
No worries you're almost there :)
Just loose the '-prefer-pic'. Then please send php_mysql.out to my
email.
------------------------------------------------------------------------
[2002-11-05 11:00:12] [EMAIL PROTECTED]
Sorry... I didn't understand what you are saying. I've tried with gcc3
- same error, so it can't be a product of 'using gcc2 on RedHat 8'.
Is PHP compatible with gcc3?
Please help me. I'm not a C programmer so I can't understand if the gcc
command I've just typed in my terminal is right or wrong. It's not so
obvious for me.
I've tried with the following command
[root@idave libmysql]# /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/main
-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 -I/usr/local/mysql/include -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:56: mysql.h: No such file or
directory
[root@idave libmysql]#
Trying "pushd / && locate mysql.h %% popd" returns:
/root/build/courier-imap-1.6.0.20021025/authlib/authmysql.h
/root/build/courier-imap-1.6.0.20021025/authlib/README.authmysql.html
/root/build/vpopmail-5.2.1/vmysql.h
/root/build/php4/ext/dbx/dbx_mysql.h
/root/build/php4/ext/mysql/libmysql/mysql.h
/root/build/php4/ext/mysql/php_mysql.h
/root/build/mysql-4.0.4-beta/include/mysql.h
/root/build/mysql-4.0.4-beta/innobase/include/row0mysql.h
/root/build/php-4.3.0pre2/ext/dbx/dbx_mysql.h
/root/build/php-4.3.0pre2/ext/mysql/libmysql/mysql.h
/root/build/php-4.3.0pre2/ext/mysql/php_mysql.h
/root/build/php-4.2.3/ext/dbx/dbx_mysql.h
/root/build/php-4.2.3/ext/mysql/libmysql/mysql.h
/root/build/php-4.2.3/ext/mysql/php_mysql.h
/root/build/mysql-3.23.53/include/mysql.h
/root/build/mysql-3.23.53/innobase/include/row0mysql.h
/usr/share/apps/quanta/doc/php/ref.mysql.html
/usr/local/mysql/include/mysql/mysql.h
So I've tried:
[root@idave libmysql]# /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/main
-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 -I/usr/local/mysql/include/mysql -g -O2
-prefer-pic -c /root/build/php4/ext/mysql/php_mysql.c -o php_mysql.out
gcc: unrecognized option `-prefer-pic'
[root@idave libmysql]#
and then the command "grep -10 'For AIX string library'
./php_mysql.out" hadn't any output.
------------------------------------------------------------------------
[2002-11-05 10:18:47] [EMAIL PROTECTED]
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'.
------------------------------------------------------------------------
[2002-11-05 09:01:40] [EMAIL PROTECTED]
[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] [EMAIL PROTECTED]
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.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/20229
--
Edit this bug report at http://bugs.php.net/?id=20229&edit=1