Bug #60267 [Com]: Compile failure with freetds 0.91
| From: | art dot frela at gmail dot com | Date: | Wed, 16 Nov 2011 10:27:33 +0000 |
| Subject: | Bug #60267 [Com]: Compile failure with freetds 0.91 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-165223@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60267&edit=1
ID: 60267
Comment by: art dot frela at gmail dot com
Reported by: gnubug at billmann-edv dot net
Summary: Compile failure with freetds 0.91
Status: Open
Type: Bug
Package: Compile Failure
Operating System: Linux
PHP Version: 5.3.9RC1
Block user comment: N
Private report: N
New Comment:
root@wf:/usr/local/src/php-5.3.8# make
/bin/sh /usr/local/src/php-5.3.8/libtool --silent --preserve-dup-deps --
mode=compile gcc -Iext/mssql/ -I/usr/local/src/php-5.3.8/ext/mssql/ -
DPHP_ATOM_INC -I/usr/local/src/php-5.3.8/include -I/usr/local/src/php-5.3.8/main
-I/usr/local/src/php-5.3.8 -I/usr/local/src/php-5.3.8/ext/date/lib -
I/usr/local/src/php-5.3.8/ext/ereg/regex -I/usr/include/libxml2 -
I/usr/local/freetds//include -I/usr/local/src/php-5.3.8/ext/sqlite3/libsqlite -
I/usr/local/src/php-5.3.8/TSRM -I/usr/local/src/php-5.3.8/Zend -I/usr/include
-g -O2 -fvisibility=hidden -prefer-non-pic -c /usr/local/src/php-
5.3.8/ext/mssql/php_mssql.c -o ext/mssql/php_mssql.lo
In file included from /usr/local/src/php-5.3.8/ext/mssql/php_mssql.c:33:
/usr/local/src/php-5.3.8/ext/mssql/php_mssql.h:68: error: redefinition of
typedef âLPBYTEâ
/usr/local/freetds//include/sqlfront.h:35: note: previous declaration of
âLPBYTEâ was here
/usr/local/src/php-5.3.8/ext/mssql/php_mssql.c: In function
âphp_mssql_get_column_content_without_typeâ:
/usr/local/src/php-5.3.8/ext/mssql/php_mssql.c:1120: warning: passing argument 1
of âspprintfâ from incompatible pointer type
/usr/local/src/php-5.3.8/main/spprintf.h:40: note: expected âchar **â but
argument is of type âunsigned char **â
make: *** [ext/mssql/php_mssql.lo] ÐÑибка 1
!!!!php 5.2.17 WORKING!!!!
Previous Comments:
------------------------------------------------------------------------
[2011-11-12 00:04:13] gnubug at billmann-edv dot net
strange...
I just tried it again with fresh copies from scratch resulting in the same error.
I simply configured PHP with
./configure --prefix=$HOME/install --with-mssql=$HOME/install
and the make ended with
In file included from /home/oliver/source/php-5.3.9RC1/ext/mssql/php_mssql.c:33:
/home/oliver/source/php-5.3.9RC1/ext/mssql/php_mssql.h:68: error: redefinition of typedef
'LPBYTE'
/home/oliver/install/include/sqlfront.h:35: note: previous declaration of 'LPBYTE' was
here
Are you using an altered version of any of those two packages by chance?
Oliver
------------------------------------------------------------------------
[2011-11-11 23:23:09] felipe@php.net
I can't reproduce it.
------------------------------------------------------------------------
[2011-11-11 13:31:44] gnubug at billmann-edv dot net
Description:
------------
Trying to use PHP 5.3 (and 5.4) with the current FreeTDS 0.91 results in the following error
message:
In file included from php-5.4.0RC1/ext/mssql/php_mssql.c:33:
php-5.4.0RC1/ext/mssql/php_mssql.h:69: error: redefinition of typedef 'LPBYTE'
include/sqlfront.h:35: note: previous declaration of 'LPBYTE' was here
It seems that FreeTDS expects PHP_MSSQL_API to be defined which isn't anymore as of PHP 5.3.
Simply adding "#define PHP_MSSQL_API" to ext/mssql/php_mssql.h in line 24 solves this
error...
I'm not sure whether this should be considered a PHP or FreeTDS problem...
Regards
Oliver
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60267&edit=1