Summary: | www/unit-php: error: no PHP embed SAPI found. | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | iron.udjin | ||||
Component: | Individual Port(s) | Assignee: | Sergey A. Osokin <osa> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | CC: | ale, iron.udjin, osa | ||||
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(osa) |
||||
Version: | Latest | ||||||
Hardware: | amd64 | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
iron.udjin
2018-11-16 17:24:49 UTC
Workaroud: build php56 with ZTS=off It would be good to make unit-php port correctly detect such situations. Hi, thanks for the report. I can't reproduce this issue on my laptop with FreeBSD 12.0-BETA4. To fix the issue I'd recommend to install php56 with pkg(1) utility, php 5.6.38 has been built with "--enable-embed" option: % php-config --configure-options --with-layout=GNU --with-config-file-scan-dir=/usr/local/etc/php --disable-all --enable-libxml --enable-mysqlnd --with-libxml-dir=/usr/local --with-pcre-regex=/usr/local --with-zlib-dir=/usr --program-prefix= --enable-fpm --with-fpm-user=www --with-fpm-group=www --enable-embed --with-regex=php --with-zend-vm=CALL --prefix=/usr/local --localstatedir=/var --mandir=/usr/local/man --infodir=/usr/local/info/ --build=amd64-portbld-freebsd12.0 build_alias=amd64-portbld-freebsd12.0 CC=cc CFLAGS=-O2 -pipe -fstack-protector -fno-strict-aliasing LDFLAGS= -fstack-protector LIBS=-lpthread CPPFLAGS= CPP=cpp CXX=c++ CXXFLAGS=-O2 -pipe -fstack-protector -fno-strict-aliasing Also, unit-php56 can be installed via pkg(1) as well. I've missed your recent commit about ZTS option for php. So, let's try to get a comment about that behavior from lang/php56 maintainer. Hi Alex, hope you're doing well. Could you help us to resolve the issue - when lang/php56 built with ZTS option the configure script from www/php-unit fails, i.e. can't detect php shared library. Dear iron.udjin@gmail.com, Could you please attach the unit-php/work-php56/unit-1.6/build/autoconf.err file to the ticket, hope it helps us to better understand the issue. Thanks. Created attachment 199306 [details]
autoconf.err
Thanks for the autoconf.err file. As far as we can see there next code can't be compiled: #include <php.h> #include <php_main.h> int main() { php_request_startup(); return 0; } /usr/local/include/php/main/php_main.h:30:1: note: 'php_request_startup' declared here PHPAPI int php_request_startup(TSRMLS_D); ^ /usr/local/include/php/main/php.h:60:18: note: expanded from macro 'PHPAPI' # define PHPAPI __attribute__ ((visibility("default"))) 1 error generated. So, it looks like unit doesn't support Zend Thread Safety (ZTS) feature of php. I'd recommend to raise a feature request about that with the vendor, https://trac.nginx.org/. I guess you should replace all php_request_startup() occurrences with php_request_startup(TSRMLS_C), to support thread-safe php 5.6. Could you please add this patch? https://github.com/nginx/unit/issues/184#issuecomment-439994329 With the patch unit-php compiles fine when ZFS 'on' or 'off'. A commit references this bug: Author: osa Date: Mon Nov 19 21:40:16 UTC 2018 New revision: 485364 URL: https://svnweb.freebsd.org/changeset/ports/485364 Log: Fix the unit's php module build when the lang/php* was built with the ZTS option. Bump PORTREVISION. PR: 233255 Patch: https://github.com/nginx/unit/issues/184 Changes: head/www/unit/Makefile head/www/unit/files/php_zts.patch Thanks for the report, the issue has been fixed. |