/var/tmp/portage/dev-lang/php-8.1.30/work/sapis-build/cli/ext/pdo_odbc/odbc_driver.c: In function ‘pdo_odbc_error’: /var/tmp/portage/dev-lang/php-8.1.30/work/sapis-build/cli/ext/pdo_odbc/odbc_driver.c:86:79: error: passing argument 5 of ‘SQLGetDiagRec’ from incompatible pointer type [-Wincompatible-pointer-types] 86 | rc = SQLGetDiagRec(htype, eh, recno++, (SQLCHAR *) einfo->last_state, &einfo->last_error, | ^~~~~~~~~~~~~~~~~~ | | | SDWORD * {aka long int *} In file included from /usr/include/iodbc/sqlext.h:82, from /usr/include/iodbc/sqlucode.h:81, from /var/tmp/portage/dev-lang/php-8.1.30/work/sapis-build/cli/ext/pdo_odbc/php_pdo_odbc_int.h:51, from /var/tmp/portage/dev-lang/php-8.1.30/work/sapis-build/cli/ext/pdo_odbc/odbc_driver.c:27: /usr/include/iodbc/sql.h:1006:27: note: expected ‘SQLINTEGER *’ {aka ‘int *’} but argument is of type ‘SDWORD *’ {aka ‘long int *’} 1006 | SQLINTEGER * NativeError, | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ /var/tmp/portage/dev-lang/php-8.1.30/work/sapis-build/cli/ext/pdo_odbc/odbc_driver.c:101:104: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘SDWORD’ {aka ‘long int’} [-Wformat=] 101 | zend_throw_exception_ex(php_pdo_get_exception(), einfo->last_error, "SQLSTATE[%s] %s: %d %s", | ~^ | | | int | %ld 102 | *pdo_err, what, einfo->last_error, einfo->last_err_msg); | ~~~~~~~~~~~~~~~~~ | | | SDWORD {aka long int} Reproducible: Always
Please always include the full build.log.
Created attachment 906851 [details, diff] php-8.1.30-pgo-odbc-gcc14.patch Works for me
There was a real size mismatch between these two types that can't be fixed with a cast: https://github.com/php/php-src/issues/14367 8.1.x is EOL upstream unless you can convince them that this is a security issue. You'll have to upgrade to 8.2.x or, preferably, 8.3.x. I've been planning to mask 8.1.x but other things keep coming up.
Yes, all casts should be done as a last-resort after real analysis, not just slapping it on.
(In reply to Michael Orlitzky from comment #3) > There was a real size mismatch between these two types that can't be fixed > with a cast: https://github.com/php/php-src/issues/14367 > > 8.1.x is EOL upstream unless you can convince them that this is a security > issue. You'll have to upgrade to 8.2.x or, preferably, 8.3.x. I've been > planning to mask 8.1.x but other things keep coming up. It's still there, so re-opening for the moment.
(In reply to Andreas K. Hüttel from comment #5) > (In reply to Michael Orlitzky from comment #3) > > There was a real size mismatch between these two types that can't be fixed > > with a cast: https://github.com/php/php-src/issues/14367 > > > > 8.1.x is EOL upstream unless you can convince them that this is a security > > issue. You'll have to upgrade to 8.2.x or, preferably, 8.3.x. I've been > > planning to mask 8.1.x but other things keep coming up. > > It's still there, so re-opening for the moment. There's a newer stable series of PHP already so this shouldn't block GCC stabilization IMO. Say: fixed in 8.2.24 (stable).