php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56691 PDO_MYSQL 1.0.1 make fails
Submitted: 2005-12-03 15:56 UTC Modified: 2005-12-04 13:34 UTC
From: dmytton@php.net Assigned: sniper (profile)
Status: Closed Package: PDO_MYSQL (PECL)
PHP Version: 5.0.5 OS: Fedora Linux Core 2 (2.6.9-1.6)
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: dmytton@php.net
New email:
PHP Version: OS:

 

 [2005-12-03 15:56 UTC] dmytton@php.net
Description:
------------
When compiling the shared PECL extension with phpize, the process fails on the make command.

Reproduce code:
---------------
Download PDO_MYSQL-1.0.1.tgz and execute:

$ cd PDO_MYSQL-1.0.1
$ phpize
$ ./configure
$ make

Expected result:
----------------
Should complete without error

Actual result:
--------------
root@server1 [~/installs]# cd PDO_MYSQL-1.0.1
root@server1 [~/installs/PDO_MYSQL-1.0.1]# phpize
Configuring for:
PHP Api Version:         20031224
Zend Module Api No:      20041030
Zend Extension Api No:   220040412
root@server1 [~/installs/PDO_MYSQL-1.0.1]# ./configure
...output...
root@server1 [~/installs/PDO_MYSQL-1.0.1]# make
/bin/sh /root/installs/PDO_MYSQL-1.0.1/libtool --mode=compile gcc -I/usr/local/include/php/ext  -I. -I/root/installs/PDO_MYSQL-1.0.1 -DPHP_ATOM_INC -I/root/installs/PDO_MYSQL-1.0.1/include -I/root/installs/PDO_MYSQL-1.0.1/main -I/root/installs/PDO_MYSQL-1.0.1 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend  -DHAVE_CONFIG_H  -g -O2   -c /root/installs/PDO_MYSQL-1.0.1/pdo_mysql.c -o pdo_mysql.lo
gcc -I/usr/local/include/php/ext -I. -I/root/installs/PDO_MYSQL-1.0.1 -DPHP_ATOM_INC -I/root/installs/PDO_MYSQL-1.0.1/include -I/root/installs/PDO_MYSQL-1.0.1/main -I/root/installs/PDO_MYSQL-1.0.1 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -DHAVE_CONFIG_H -g -O2 -c /root/installs/PDO_MYSQL-1.0.1/pdo_mysql.c  -fPIC -DPIC -o pdo_mysql.lo
In file included from /root/installs/PDO_MYSQL-1.0.1/pdo_mysql.c:31:
/root/installs/PDO_MYSQL-1.0.1/php_pdo_mysql_int.h:25:19: mysql.h: No such file or directory
In file included from /root/installs/PDO_MYSQL-1.0.1/pdo_mysql.c:31:
/root/installs/PDO_MYSQL-1.0.1/php_pdo_mysql_int.h:36: error: syntax error before "MYSQL"
/root/installs/PDO_MYSQL-1.0.1/php_pdo_mysql_int.h:36: warning: no semicolon at end of struct or union
/root/installs/PDO_MYSQL-1.0.1/php_pdo_mysql_int.h:38: error: syntax error before ':' token
/root/installs/PDO_MYSQL-1.0.1/php_pdo_mysql_int.h:39: error: syntax error before ':' token
/root/installs/PDO_MYSQL-1.0.1/php_pdo_mysql_int.h:40: error: syntax error before ':' token
/root/installs/PDO_MYSQL-1.0.1/php_pdo_mysql_int.h:43: error: syntax error before '}' token
/root/installs/PDO_MYSQL-1.0.1/php_pdo_mysql_int.h:43: warning: data definition has no type or storage class
/root/installs/PDO_MYSQL-1.0.1/php_pdo_mysql_int.h:46: error: syntax error before "MYSQL_FIELD"
/root/installs/PDO_MYSQL-1.0.1/php_pdo_mysql_int.h:46: warning: no semicolon at end of struct or union
/root/installs/PDO_MYSQL-1.0.1/php_pdo_mysql_int.h:47: warning: data definition has no type or storage class
/root/installs/PDO_MYSQL-1.0.1/php_pdo_mysql_int.h:50: error: syntax error before "pdo_mysql_db_handle"
/root/installs/PDO_MYSQL-1.0.1/php_pdo_mysql_int.h:50: warning: no semicolon at end of struct or union
/root/installs/PDO_MYSQL-1.0.1/php_pdo_mysql_int.h:51: warning: data definition has no type or storage class
/root/installs/PDO_MYSQL-1.0.1/php_pdo_mysql_int.h:52: error: syntax error before '*' token
/root/installs/PDO_MYSQL-1.0.1/php_pdo_mysql_int.h:52: warning: data definition has no type or storage class
/root/installs/PDO_MYSQL-1.0.1/php_pdo_mysql_int.h:53: error: syntax error before "current_data"
/root/installs/PDO_MYSQL-1.0.1/php_pdo_mysql_int.h:53: warning: data definition has no type or storage class
/root/installs/PDO_MYSQL-1.0.1/php_pdo_mysql_int.h:69: error: syntax error before '}' token
/root/installs/PDO_MYSQL-1.0.1/php_pdo_mysql_int.h:69: warning: data definition has no type or storage class
make: *** [pdo_mysql.lo] Error 1

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-03 19:04 UTC] wez@php.net
Which version of mysql do you have?
What did the configure output say about mysql_config and the other mysql functions it was probing?
Where is mysql.h located on your system?
 [2005-12-04 04:45 UTC] dmytton@php.net
MySQL Version: MySQL 4.1.14-standard

root@server1 [~/installs/PDO_MYSQL-1.0.1]# locate mysql.h
/usr/include/mysql/mysql.h
/root/installs/PDO_MYSQL-1.0.1/php_pdo_mysql.h

./configure output:

root@server1 [~/installs/PDO_MYSQL-1.0.1]# ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether gcc and cc understand -c and -o together... yes
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20041030
checking for re2c... exit 0;
checking for gawk... gawk
checking for MySQL support for PDO... yes, shared
checking for mysql_config... /usr/bin/mysql_config
./configure: line 1: -e: command not found
./configure: line 1: -e: command not found
checking for mysql_query in -lmysqlclient... yes
checking for mysql_commit... no
checking for mysql_stmt_prepare... no
checking for mysql_next_result... no
checking for mysql_sqlstate... no
checking for PDO includes... checking for PDO includes... /usr/local/include/php/ext
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking for a sed that does not truncate output... /bin/sed
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking command to parse /usr/bin/nm -B output... ok
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for ranlib... ranlib
checking for strip... strip
checking for objdir... .libs
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.lo... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking whether the linker (/usr/bin/ld) supports shared libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking whether -lc should be explicitly linked in... no
creating libtool
configure: creating ./config.status
config.status: creating config.h
 [2005-12-04 10:54 UTC] wez@php.net
Jani, your fix for broken mysql_config uses $SED, but this doesn't appear to be defined in PHP 5.0.X phpize.

dmytton:
The workaround for now is to export SED=sed prior to running configure.
 [2005-12-04 11:39 UTC] sniper@php.net
Install PHP 5.1.1.
 [2005-12-04 13:34 UTC] wez@php.net
Fixed in CVS.
PDO_MYSQL 1.0.2 will have the fix; until then, set SED from your shell.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC