PHP 4.0 Bug #4567: Fails to find mysql.h during make (solution included)
| From: | ragnar at spinweb dot net | Date: | Wed, 24 May 2000 01:21:08 +0000 |
| Subject: | PHP 4.0 Bug #4567: Fails to find mysql.h during make (solution included) | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-19344@lists.php.net to get a copy of this message | ||
From: ragnar@spinweb.net
Operating system: Solaris 8
PHP version: 4.0.0 Release
PHP Bug Type: Compile Failure
Bug description: Fails to find mysql.h during make (solution included)
When building php 4.0.0 on Solaris 8 for SPARC, it fails compiling with an error from
./ext/mysql/php_mysql.c:
gcc -DHAVE_CONFIG_H -I. -I/usr/local/src/php-4.0.0/ext/mysql -I/usr/local/src/php-4.0.0
-I/usr/local/src/apache_1.3.12/src/include -I/usr/local/src/apache_1.3.12/src/os/unix
-I/usr/local/src/php-4.0.0/Zend -I/usr/local/src/php-4.0.0 -DXML_BYTE_ORDER=21 -g -O2 -Wall -c
php_mysql.c && touch php_mysql.lo
php_mysql.c:58: mysql.h: No such file or directory
I had built this successfully on Solaris 7 earlier, so this made supicious. I compared the
environment settings of the shells, but didn't find anything seriously different. Since the
error directed me to line 58 of the source code, I looked at it and saw the following fragment:
# if HAVE_MYSQL_MYSQL_H
# include <mysql/mysql.h>
# else
# include <mysql.h>
# endif
The second include statement is line 58. On a hunch I changed it to the following and it compiled
fine afterwards:
# if HAVE_MYSQL_MYSQL_H
# include <mysql/mysql.h>
# else
# include <mysql/mysql.h>
# endif
This could be a bug in my setup, but I figure others may experience it too. I'll be happy to
furnish more details if it helps the developers to track this down.