Summary: | graphics/graphviz fails to build with PHP option | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Tommy P <tommyhp2> |
Component: | Individual Port(s) | Assignee: | Po-Chuan Hsieh <sunpoet> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | CC: | sunpoet, tommyhp2 |
Priority: | --- | Flags: | dinoex:
maintainer-feedback?
(sunpoet) |
Version: | Latest | ||
Hardware: | amd64 | ||
OS: | Any | ||
Bug Depends on: | 246613 | ||
Bug Blocks: | |||
Attachments: |
Description
Tommy P
2020-01-25 03:07:29 UTC
Created attachment 211026 [details]
poudriere build log for graphics/graphviz
gv_php.cpp:1007:16: error: use of undeclared identifier 'gv_globals'; did you mean 'gv_globals_id'?
zend_error(SWIG_ErrorCode(), "%s", SWIG_ErrorMsg());
^
gv_php.cpp:1001:27: note: expanded from macro 'SWIG_ErrorCode'
#define SWIG_ErrorCode() (gv_globals.error_code)
^
gv_php.cpp:999:1: note: 'gv_globals_id' declared here
ZEND_DECLARE_MODULE_GLOBALS(gv)
^
/usr/local/include/php/Zend/zend_API.h:161:13: note: expanded from macro 'ZEND_DECLARE_MODULE_GLOBALS'
ts_rsrc_id module_name##_globals_id;
^
<scratch space>:241:1: note: expanded from here
gv_globals_id
^
gv_php.cpp:1007:16: error: member reference base type 'ts_rsrc_id' (aka 'int') is not a structure or union
zend_error(SWIG_ErrorCode(), "%s", SWIG_ErrorMsg());
Unable to reproduce. build with php72-7.2.27 successful. Still unable to reproduce. build with php72-7.2.27 successful. build with php73-7.3.14 successful. build with php74-7.4.2 successful. please clean up old packages and rebuild with poudriere. (In reply to Dirk Meyer from comment #3) Thanks for checking, Dirk. I tested clean builds several times to verify before submitting this. I just tried again it still fails. On non interactive build, it failed with different error. I'll attached the logs of non-interactive build and options used during the build. Created attachment 211234 [details]
Options used to build graphics/graphviz
These options failed when using PHP 7.4 as default version. For PHP 7.3 works OK.
Created attachment 211235 [details]
Logs of clean build in poudriere (part 1 of 2)
Due to size limitations in attachment, I've split into 800K chunks.
Created attachment 211236 [details]
Logs of clean build in poudriere (part 2 of 2)
Created attachment 211237 [details]
screen shot of recent interactive mode
If you look at both the logs (211235 & 211236) and the screen shot, PHP 7.4 was built and installed. However, the non interactive mode looks for PHP 7.3 which failed.
Please check your /etc/make.conf HOSTNAME may not be set at all times. so php7.3 is picked up in your case. please try to force there: DEFAULT_VERSIONS+=php=7.4 Created attachment 211395 [details] screen shot of recent 2020.02.04 clean build (Replying to comment #9) It still fails with the same error as seen in the screen shot and logs. Created attachment 211396 [details]
logs of recent 2020.02.04 clean build (1 of 2)
Created attachment 211397 [details]
logs of recent 2020.02.04 clean build (2 of 2)
Hi Dirk, I did some more investigation and found that both 7.3 and 7.4 are the same for module's globals(_id): lang/php73/work/php-7.3.14/Zend/zend_modules.h:54:# define ZEND_MODULE_GLOBALS(module_name) sizeof(zend_##module_name##_globals), &module_name##_globals_id lang/php73/work/php-7.3.14/Zend/zend_modules.h:56:# define ZEND_MODULE_GLOBALS(module_name) sizeof(zend_##module_name##_globals), &module_name##_globals lang/php74/work/php-7.4.2/Zend/zend_modules.h:54:# define ZEND_MODULE_GLOBALS(module_name) sizeof(zend_##module_name##_globals), &module_name##_globals_id lang/php74/work/php-7.4.2/Zend/zend_modules.h:56:# define ZEND_MODULE_GLOBALS(module_name) sizeof(zend_##module_name##_globals), &module_name##_globals However, I suspect this change in 7.4 that may possibly throw the error I've encountered: --- lang/php73/work/php-7.3.14/Zend/zend_API.h 2020-01-21 02:00:01.000000000 -0800 +++ lang/php74/work/php-7.4.2/Zend/zend_API.h 2020-01-21 03:35:33.000000000 -0800 @@ -140,7 +141,7 @@ #define ZEND_MODULE_ACTIVATE_D(module) int ZEND_MODULE_ACTIVATE_N(module)(INIT_FUNC_ARGS) #define ZEND_MODULE_DEACTIVATE_D(module) int ZEND_MODULE_DEACTIVATE_N(module)(SHUTDOWN_FUNC_ARGS) #define ZEND_MODULE_POST_ZEND_DEACTIVATE_D(module) int ZEND_MODULE_POST_ZEND_DEACTIVATE_N(module)(void) -#define ZEND_MODULE_INFO_D(module) void ZEND_MODULE_INFO_N(module)(ZEND_MODULE_INFO_FUNC_ARGS) +#define ZEND_MODULE_INFO_D(module) ZEND_COLD void ZEND_MODULE_INFO_N(module)(ZEND_MODULE_INFO_FUNC_ARGS) #define ZEND_MODULE_GLOBALS_CTOR_D(module) void ZEND_MODULE_GLOBALS_CTOR_N(module)(zend_##module##_globals *module##_globals) #define ZEND_MODULE_GLOBALS_DTOR_D(module) void ZEND_MODULE_GLOBALS_DTOR_N(module)(zend_##module##_globals *module##_globals) Unfortunately, my C/C++ skills are not up to par for me to dig deeper and verify. :( If you're unable to duplicate with the options I'm using, I'm OK to close this report since the changes in 7.4 also break compatibility with other ports I need (like www/nextcloud due removal of wddx). Thus, I'm stuck with PHP 7.3. Thank you. Hi Dirk, I have some again to look at this. I appears the this port only fails: /usr/ports/lang/php74 # make showconfig|grep ZTS ZTS=on: Force Zend Thread Safety (ZTS) build /usr/ports/www/apache24 # make showconfig | grep WORKER MPM_WORKER=on: hybrid multi-threaded multi-process web server Otherwise, it builds successfully. Another person has encounter similar issue with PHP ZTS: https://lists.freebsd.org/pipermail/freebsd-ports/2014-June/092744.html I'm unable to find anything regarding graphviz's support of PHP ZTS. I did find other Linux was able to build graphviz with PHP ZTS. Thanks. I can reproduce the problem, but this can not be fixed within graphviz see also: https://github.com/mapserver/mapserver/issues/5795 swig30 needs to be patched. patch suggested: https://github.com/swig/swig/pull/1238/files/03a2e2b6f74b518d8b4ade3169f7ed6544838a9b Passing over to swig30 Maintainer. According to https://github.com/mapserver/mapserver/issues/5795 and https://github.com/swig/swig/pull/1238, the problem is fixed in swig 4. Let's wait for the exp-run of swig 4.0.1 (bug #246613). swig 4.0.1 landed. |