php74 and mod_php74 problem with --enable-maintainer-zts

Hi,

I need php74 (-7.4.26) and mod_php74 (-7.4.26). I can compile php74 without problems but can not successfully compile mod_php74.
mod_php74 fails due to a configuration error about not being able to evaluate posix threads availability. I sent a problem report to the maintainer, but didn't get a response so far.

Somebody wrote that this may be fixed by setting a CONFIGURE_ENV+=pthreads_workin="yes" in the php74 Makefile.
That actually allows to compile, link and install mod_php74, but that leads to a problem with the php extensions for apache.

Apache shows errors that it cannot load dynamic libraries like xmlreader.so - many of them - from a path /usr/local/lib/php/20190902-zts/...
On the machine there is not such a directory but one /usr/local/lib/php/20190902 without the trailing "-zts".
In the directory /usr/local/lib/php/20190902 I can find all the php extensions apache complaints about not to be able to read.

As far as I understand the directory /usr/local/lib/php/20190902-zts is for such extensions that are build with the zts option.
As I did not set this option I assume from reading the config and Makefiles that it is the --enable-maintainer-zts settings that leads to that situation.
I'm trying to get rid of this setting but I'm unable to. I commented some lines in the php74 Makefile:
.if ${PORT_OPTIONS:MZTS} ...
but that didn't help.

Does anybody have a clue what is going on and how to fix that?
 
Do you want ZTS enabled or not?

I usually turn it off and don't have trouble building PHP 7.4 and mod_php74.

There's definitely a way you can get stuck in a bit of a vicious circle with mod_php and PHP so if you do get stuck - easiest to clean everything out and try again.

You can compile one, but not the other, and even changing options doesn't seem to help - so if you get to that, clean down everything and start again.

For me:

Code:
cd /usr/ports/lang/php74
make config
CLI, FPM, DTRACE, MYSQLND - everything else off (including ZTS and LINKTHR)

cd /usr/ports/www/mod_php74
make config
DTRACE, MYSQLND - everything else off (including ZTS and LINKTHR)

Even if this is not what you want - you can try this to see if you can get both to build, and then move on.
 
Do you want ZTS enabled or not?

I usually turn it off and don't have trouble building PHP 7.4 and mod_php74.

There's definitely a way you can get stuck in a bit of a vicious circle with mod_php and PHP so if you do get stuck - easiest to clean everything out and try again.

You can compile one, but not the other, and even changing options doesn't seem to help - so if you get to that, clean down everything and start again.

For me:

Code:
cd /usr/ports/lang/php74
make config
CLI, FPM, DTRACE, MYSQLND - everything else off (including ZTS and LINKTHR)

cd /usr/ports/www/mod_php74
make config
DTRACE, MYSQLND - everything else off (including ZTS and LINKTHR)

Even if this is not what you want - you can try this to see if you can get both to build, and then move on.
No, I do not want ZTS enabled.
I actually cleaned both and tried again, no help.
I stopped fiddling with that and used the packages. The packages do not use ZTS, so there must be a way to make it.
I contacted the maintainer, but no response.
 
Another option is passing parameters to the configure script. Something like,
E.g.
.if
CONFIGURE_ARGS+="--disable-maintainer-zts --without-tsrm-pthreads"
.endif
Or add this to the port makefile.
 
Back
Top