Bug 227762

Summary: net/php56-xmlrpc: fails to build when ZTS is enabled in PHP
Product: Ports & Packages Reporter: Victor Sudakov <vas>
Component: Individual Port(s)Assignee: Alex Dupre <ale>
Status: Closed DUPLICATE    
Severity: Affects Some People CC: vas
Priority: --- Flags: bugzilla: maintainer-feedback? (ale)
Version: Latest   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230452
Attachments:
Description Flags
Complete build log
none
Another build log
none
Build log of php56-xml (dependency) none

Description Victor Sudakov 2018-04-25 11:53:56 UTC
When I enable ZTS in www/mod_php56 and lang/php56, net/php56-xmlrpc and other numerous php modules fail to build.

I fail to see the connection between enabling ZTS (threads) and the build problems, it is an enigma for me, but disabling ZTS in php fixes the problems.
Comment 1 Victor Sudakov 2018-04-25 11:54:38 UTC
Created attachment 192798 [details]
Complete build log
Comment 2 Victor Sudakov 2018-04-25 11:55:40 UTC
Created attachment 192799 [details]
Another build log
Comment 3 Victor Sudakov 2018-04-25 11:58:08 UTC
Created attachment 192800 [details]
Build log of php56-xml (dependency)
Comment 4 Victor Sudakov 2018-04-25 12:44:39 UTC
Bingo! 

[root@svn ~] tar tf /poudriere/data/packages/104amd64-default-test2/All/php56-xml-5.6.34_2.txz
+COMPACT_MANIFEST
+MANIFEST
/usr/local/lib/php/20131226-zts/xml.so
/usr/local/include/php/ext/xml/php_xml.h
/usr/local/include/php/ext/xml/config.h
/usr/local/include/php/ext/xml/expat_compat.h
/usr/local/etc/php/ext-20-xml.ini
[root@svn ~]


"/usr/local/lib/php/20131226-zts/" is not where the dependent ports expect to find the lib, because of the "-zts" suffix!

Can this be fixed?
Comment 5 Victor Sudakov 2018-04-26 09:09:22 UTC
(In reply to vas from comment #4)
> /usr/local/lib/php/20131226-zts/xml.so

Other not found modules:

/usr/local/lib/php/20131226/dom.so
/usr/local/lib/php/20131226/gd.so
/usr/local/lib/php/20131226/hash.so
/usr/local/lib/php/20131226/pdo.so
/usr/local/lib/php/20131226/xml.so
Comment 6 Alex Dupre freebsd_committer freebsd_triage 2018-04-26 09:21:37 UTC
If you change the ZTS setting you have to rebuild all php modules, that's expected.
Comment 7 Victor Sudakov 2018-04-26 10:33:52 UTC
(In reply to Alex Dupre from comment #6)

I did rebuild everything from scratch (poudriere bulk -c), the build still fails.
Comment 8 Victor Sudakov 2018-04-26 10:34:37 UTC
No, it does not work at all. I did rebuild everything from scratch ("poudriere bulk -c"), the build still fails.
Comment 9 Alex Dupre freebsd_committer freebsd_triage 2018-04-26 10:48:54 UTC
Current workaround:

# If you are building PHP-based ports in poudriere(8) with ZTS enabled,
# add WITH_MPM=event to /etc/make.conf to prevent build failures.

*** This bug has been marked as a duplicate of bug 201193 ***
Comment 10 Victor Sudakov 2018-04-26 15:36:56 UTC
(In reply to Alex Dupre from comment #9)
> add WITH_MPM=event to /etc/make.conf to prevent build failures.

Thanks, it helped. Actually WITH_MPM=worker also helps.