[MacPorts] #71488: php83-rar @4.2.0: rararch.c:547:12: error: conflicting types for 'rararch_count_elements' (was: php83-rar: rararch.c:547:12: error: conflicting types for 'rararch_count_elements')
MacPorts
noreply at macports.org
Sun Dec 8 11:47:12 UTC 2024
#71488: php83-rar @4.2.0: rararch.c:547:12: error: conflicting types for
'rararch_count_elements'
----------------------------+------------------------
Reporter: slightlybeige | Owner: ryandesign
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.10.5
Resolution: | Keywords:
Port: php83-rar |
----------------------------+------------------------
Changes (by ryandesign):
* owner: (none) => ryandesign
* status: new => assigned
Old description:
> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
> .org_macports_release_tarballs_ports_php_php-
> rar/php83-rar/work/rar-4.2.0/rararch.c:547:12: error: conflicting types
> for 'rararch_count_elements'
> 547 | static int rararch_count_elements(handler_this_t *object, long
> *count TSRMLS_DC)
> | ^
> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
> .org_macports_release_tarballs_ports_php_php-
> rar/php83-rar/work/rar-4.2.0/rararch.c:109:26: note: previous declaration
> is here
> 109 | static ZEND_RESULT_CODE *rararch_count_elements(handler_this_t
> *object, long *count TSRMLS_DC);
> | ^
> 1 error generated.
>
> ----
>
> I was able to get the package to build by changing:
> static int rararch_count_elements(handler_this_t *object, long *count
> TSRMLS_DC)
> to:
> static int rararch_count_elements(handler_this_t *object, zend_long
> *count TSRMLS_DC)
>
> on lines 109 and 547 of
> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
> .org_macports_release_tarballs_ports_php_php-
> rar/php83-rar/work/rar-4.2.0/rararch.c
New description:
{{{
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
.org_macports_release_tarballs_ports_php_php-
rar/php83-rar/work/rar-4.2.0/rararch.c:547:12: error: conflicting types
for 'rararch_count_elements'
547 | static int rararch_count_elements(handler_this_t *object, long
*count TSRMLS_DC)
| ^
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
.org_macports_release_tarballs_ports_php_php-
rar/php83-rar/work/rar-4.2.0/rararch.c:109:26: note: previous declaration
is here
109 | static ZEND_RESULT_CODE *rararch_count_elements(handler_this_t
*object, long *count TSRMLS_DC);
| ^
1 error generated.
}}}
----
I was able to get the package to build by changing:
{{{
static int rararch_count_elements(handler_this_t *object, long *count
TSRMLS_DC)
}}}
to:
{{{
static int rararch_count_elements(handler_this_t *object, zend_long *count
TSRMLS_DC)
}}}
on lines 109 and 547 of
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
.org_macports_release_tarballs_ports_php_php-
rar/php83-rar/work/rar-4.2.0/rararch.c
--
Comment:
With which macOS version and Xcode (or CLT) version did you see this
problem? We did see a build failure of this port on our macOS 15 build
machines but not earlier ones.
Could you [https://github.com/cataphract/php-rar/issues report the bug to
the developers] or send them a pull request?
[https://github.com/php/php-
src/blob/c5d9c7da9e77b2ddafd96ba105024ef327b35deb/Zend/zend_object_handlers.h#L226
Looking in the php code], the `count_elements` field of the
`_zend_object_handlers` struct has been defined as a
`zend_object_count_elements_t` ever since [https://github.com/php/php-
src/commit/d056b25c3f6930c7034b16c7091ac49f13f07098 it was added in 2004].
Maybe the function argument should be of that type as well rather than
`zend_long` or `long`.
Don't forget to use WikiFormatting when writing in Trac, specifically
`{{{`/`}}}` before/after blocks of code.
--
Ticket URL: <https://trac.macports.org/ticket/71488#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list