PHP 8.0.30 build error: conflicting declaration 'typedef windowsULong_t DWORD'
csandanov opened this issue · 2 comments
csandanov commented
PHP version 8.0.30
PHP SQLSRV or PDO_SQLSRV version 5.11.0
Microsoft ODBC Driver version 18.3.1.1
SQL Server version --
Client operating system Alpine Linux 3.16 (linux/amd64)
Table schema --
Problem description
Build of pdo_sqlsrv extension fails. Worked fine prior to 8.0.30.
# running: make
# /bin/sh /tmp/pear/temp/pear-build-defaultuserdigJNn/pdo_sqlsrv-5.11.0/libtool --mode=compile g++ -I. -I/tmp/pear/temp/pdo_sqlsrv -I/tmp/pear/temp/pear-build-defaultuserdigJNn/pdo_sqlsrv-5.11.0/include -I/tmp/pear/temp/pear-build-defaultuserdigJNn/pdo_sqlsrv-5.11.0/main -I/tmp/pear/temp/pdo_sqlsrv -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/tmp/pear/temp/pdo_sqlsrv/shared/ -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -I/usr/local/include/php/ext -std=c++11 -c /tmp/pear/temp/pdo_sqlsrv/pdo_dbh.cpp -o pdo_dbh.lo
# mkdir .libs
# g++ -I. -I/tmp/pear/temp/pdo_sqlsrv -I/tmp/pear/temp/pear-build-defaultuserdigJNn/pdo_sqlsrv-5.11.0/include -I/tmp/pear/temp/pear-build-defaultuserdigJNn/pdo_sqlsrv-5.11.0/main -I/tmp/pear/temp/pdo_sqlsrv -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/tmp/pear/temp/pdo_sqlsrv/shared/ -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -I/usr/local/include/php/ext -std=c++11 -c /tmp/pear/temp/pdo_sqlsrv/pdo_dbh.cpp -fPIC -DPIC -o .libs/pdo_dbh.o
# In file included from /tmp/pear/temp/pdo_sqlsrv/shared/xplat.h:99,
# from /tmp/pear/temp/pdo_sqlsrv/shared/typedefs_for_linux.h:23,
# from /tmp/pear/temp/pdo_sqlsrv/shared/xplat_winnls.h:24,
# from /tmp/pear/temp/pdo_sqlsrv/shared/FormattedPrint.h:24,
# from /tmp/pear/temp/pdo_sqlsrv/shared/core_sqlsrv.h:41,
# from /tmp/pear/temp/pdo_sqlsrv/php_pdo_sqlsrv_int.h:23,
# from /tmp/pear/temp/pdo_sqlsrv/pdo_dbh.cpp:24:
# /tmp/pear/temp/pdo_sqlsrv/shared/xplat_intsafe.h:50:29: error: conflicting declaration 'typedef windowsULong_t DWORD'
# 50 | typedef windowsULong_t DWORD;
# | ^~~~~
# In file included from /usr/include/sql.h:19,
# from /tmp/pear/temp/pdo_sqlsrv/shared/xplat.h:30,
# from /tmp/pear/temp/pdo_sqlsrv/shared/typedefs_for_linux.h:23,
# from /tmp/pear/temp/pdo_sqlsrv/shared/xplat_winnls.h:24,
# from /tmp/pear/temp/pdo_sqlsrv/shared/FormattedPrint.h:24,
# from /tmp/pear/temp/pdo_sqlsrv/shared/core_sqlsrv.h:41,
# from /tmp/pear/temp/pdo_sqlsrv/php_pdo_sqlsrv_int.h:23,
# from /tmp/pear/temp/pdo_sqlsrv/pdo_dbh.cpp:24:
# /usr/include/sqltypes.h:100:33: note: previous declaration as 'typedef long unsigned int DWORD'
# 100 | typedef unsigned long DWORD;
# | ^~~~~
# make: *** [Makefile:209: pdo_dbh.lo] Error 1
# ERROR: `make' failed
absci commented
I can't reproduce this with docker image php:8.0.30-cli-alpine3.16
. Could you provide more info about your environment?
csandanov commented
The issue no longer reproduced after they rebuilt the official php image to the newer 3.16.7 alpine