Opened 7 weeks ago

Last modified 7 weeks ago

#71025 accepted defect

php74-odbc, php80-odbc: error: incompatible function pointer types

Reported by: BjarneDMat Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: sonoma sequoia Cc:
Port: php80-odbc php74-odbc

Description

:debug:main Starting logging for php80-odbc @8.0.30_0+unixodbc
:debug:sysinfo macOS 14.7 (darwin/23.6.0) arch i386
:debug:sysinfo MacPorts 2.10.2
:debug:sysinfo Xcode 16.0, CLT 16.0.0.0.1.1724870825
:debug:sysinfo SDK 14
:debug:sysinfo MACOSX_DEPLOYMENT_TARGET: 14.0
...
:info:build   889 |         odbc_stmt_get_col,
:info:build       |         ^~~~~~~~~~~~~~~~~

same error-message in both

For both ports, it was a completely fresh install of php74/php80
There're no problems w/ php81, php82, php83
& MacPorts 2.10.2 has been forcefully re-installed from source based upon the note about the Sonoma error.
I'm aware both are legacy / un-supported; but some might still need these due to legacy code like WordPress plugins

Attachments (2)

php74-odbc_main.log (154.5 KB) - added by BjarneDMat 7 weeks ago.
php80-odbc_main.log (99.2 KB) - added by BjarneDMat 7 weeks ago.

Download all attachments as: .zip

Change History (3)

Changed 7 weeks ago by BjarneDMat

Attachment: php74-odbc_main.log added

Changed 7 weeks ago by BjarneDMat

Attachment: php80-odbc_main.log added

comment:1 Changed 7 weeks ago by ryandesign (Ryan Carsten Schmidt)

Keywords: sonoma sequoia added; Sonoma removed
Owner: set to ryandesign
Status: newaccepted
Summary: php74-odbc & php80-odbc fail to compilephp74-odbc, php80-odbc: error: incompatible function pointer types

For php74-odbc the error in the log is:

php-7.4.33/ext/pdo_odbc/odbc_stmt.c:889:2: error: incompatible function pointer types initializing 'pdo_stmt_get_col_data_func' (aka 'int (*)(struct _pdo_stmt_t *, int, char **, unsigned long *, int *)') with an expression of type 'int (pdo_stmt_t *, int, char **, zend_ulong *, int *)' (aka 'int (struct _pdo_stmt_t *, int, char **, unsigned long long *, int *)') [-Wincompatible-function-pointer-types]
  889 |         odbc_stmt_get_col,
      |         ^~~~~~~~~~~~~~~~~

For php80-odbc it looks the same:

php-8.0.30/ext/pdo_odbc/odbc_stmt.c:887:2: error: incompatible function pointer types initializing 'pdo_stmt_get_col_data_func' (aka 'int (*)(struct _pdo_stmt_t *, int, char **, unsigned long *, int *)') with an expression of type 'int (pdo_stmt_t *, int, char **, zend_ulong *, int *)' (aka 'int (struct _pdo_stmt_t *, int, char **, unsigned long long *, int *)') [-Wincompatible-function-pointer-types]
  887 |         odbc_stmt_get_col,
      |         ^~~~~~~~~~~~~~~~~

Indeed the reason I keep even EOL PHP versions available in MacPorts is because people may need them for old projects. This used to be easier to do. Unfortunately in recent years Apple has been releasing compilers that consider more and more old code practices to be errors. We now get to either disable those errors or identify and backport fixes for the code.

Note: See TracTickets for help on using tickets.