-
Notifications
You must be signed in to change notification settings - Fork 197
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
Fix error linking with pthread #469
base: master
Are you sure you want to change the base?
Conversation
config.m4
Outdated
@@ -122,7 +122,7 @@ if test "$PHP_APCU" != "no"; then | |||
} | |||
]])],[ dnl -Success- | |||
APCU_CFLAGS="-D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1" | |||
PHP_ADD_LIBRARY(pthread) | |||
PHP_ADD_LIBRARY(pthread,, APCU_SHARED_LIBADD) | |||
PHP_LDFLAGS="$PHP_LDFLAGS -lpthread" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, do we need the PHP_LDFLAGS adjustment? As I understand it, if apcu is not build shared PHP_ADD_LIBRARY should already be adding it to LIBS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming not, and can't think of any reason to have this, but not 100% sure and haven't checked back to 7.0. It gets added to the Makefile but nothing in the Makefile uses PHP_LDFLAGS.
Even when compiling apcu statically this still wouldn't affect other modules
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case I think we should drop these lines and see if anyone complains...
6ef5f79
to
fdfe78c
Compare
Noticed in php 8.3-dev configured with --disable-all The "-pthread" flag wasn't actually getting used in the makefile.
fdfe78c
to
b27e1ce
Compare
php/php-src@ea372e7 is also relevant - neither the old nor new version work in php < 7.4.14. A possible alternative is to manually concatenate the string instead |
Noticed in php 8.3-dev configured with --disable-all
The "-pthread" flag wasn't actually getting used in the makefile.