Skip to content

Build failure in ext/sockets #9493

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rs-bc opened this issue Sep 7, 2022 · 3 comments
Closed

Build failure in ext/sockets #9493

rs-bc opened this issue Sep 7, 2022 · 3 comments

Comments

@rs-bc
Copy link

rs-bc commented Sep 7, 2022

Description

/tmp/build-php-8.2.0RC1/php-8.2.0RC1/ext/sockets/conversions.c:1313:29: error:
no member named 'sc_pid' in 'sockcred'
...{"pid", sizeof("pid"), 1, offsetof(struct sockcred, sc_pid), from_zval_w...
^ ~~~~~~
/usr/include/stddef.h:73:31: note: expanded from macro 'offsetof'
#define offsetof(type, field) __offsetof(type, field)
^ ~~~~~
/usr/include/sys/cdefs.h:487:34: note: expanded from macro '__offsetof'
#define __offsetof(type, field) __builtin_offsetof(type, field)
^ ~~~~~
1 error generated.

Note: there is a struct sockcred2 since FreeBSD 13.0 which contains a member called sc_pid. FreeBSD-12.3 which is officially supported does NOT declare that struct either.

PHP Version

PHP 8.2.0RC1

Operating System

FreeBSD 11.4

@devnexen
Copy link
Member

devnexen commented Sep 7, 2022

Thanks for your report it is in fact compatible with FreeBSD 13 but previous release needs to be opted out for this indeed. Will look into this later in the day.

devnexen added a commit to devnexen/php-src that referenced this issue Sep 7, 2022
…release.

the legacy sockcred struct does not hold the process id, thus sockcred2
 had been added from FreeBSD 13 in conjunction with LOCAL_CREDS_PERSISTENT
 to address this thus we disable the feature for earlier releases.
devnexen added a commit to devnexen/php-src that referenced this issue Sep 7, 2022
…release.

the legacy sockcred struct does not hold the process id, thus sockcred2
 had been added from FreeBSD 13 in conjunction with LOCAL_CREDS_PERSISTENT
 to address this thus we disable the feature for earlier releases.
@devnexen
Copy link
Member

devnexen commented Sep 7, 2022

@rs-bc would it be possible for you to build from the PR branch ?

@rs-bc
Copy link
Author

rs-bc commented Sep 8, 2022

@rs-bc would it be possible for you to build from the PR branch ?

I just applied the patch manually, the build now completes.
Thanks!

@rs-bc rs-bc closed this as completed Sep 8, 2022
devnexen added a commit that referenced this issue Sep 8, 2022
…ease. (#9496)

the legacy sockcred struct does not hold the process id, thus sockcred2
 had been added from FreeBSD 13 in conjunction with LOCAL_CREDS_PERSISTENT
 to address this thus we disable the feature for earlier releases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants