Bug #77677 [Opn->Csd]: FPM fails to build on AIX due to missing WCOREDUMP
| From: | nikic@php.net | Date: | Fri, 01 Mar 2019 13:52:21 +0000 |
| Subject: | Bug #77677 [Opn->Csd]: FPM fails to build on AIX due to missing WCOREDUMP | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-219792@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77677&edit=1
ID: 77677
Updated by: nikic@php.net
Reported by: kadler at us dot ibm dot com
Summary: FPM fails to build on AIX due to missing WCOREDUMP
-Status: Open
+Status: Closed
Type: Bug
Package: Compile Failure
Operating System: AIX
PHP Version: 7.3.2
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of kadler@us.ibm.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=006355c9fa0d1cd8aef86a97c162053e7d2d896e
Log: Fix bug #77677: WCOREDUMP not available on all systems
Previous Comments:
------------------------------------------------------------------------
[2019-02-28 03:51:06]
The following pull request has been associated:
Patch Name: Fix bug #77677: WCOREDUMP not available on all systems
On GitHub: https://github.com/php/php-src/pull/3897
Patch: https://github.com/php/php-src/pull/3897.patch
------------------------------------------------------------------------
[2019-02-28 03:46:08] kadler at us dot ibm dot com
Description:
------------
WCOREDUMP is actually a macro on Linux and other systems, but since it was undefined at compile time
the compiler implicitly defined it:
/QOpenSys/home/rpmbuild/rpmbuild/BUILD/php-7.3.1/sapi/fpm/fpm/fpm_children.c:210:28: warning:
implicit declaration of function 'WCOREDUMP' [-Wimplicit-function-declaration]
const char *have_core = WCOREDUMP(status) ? " - core dumped" : "";
^~~~~~~~~
This leads to an eventual linker error due to the missing symbol:
ld: 0711-317 ERROR: Undefined symbol: .WCOREDUMP
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
According to the Linux man page, WCOREDUMP should be gated by an #ifdef
WCOREDUMP(status)
returns true if the child produced a core dump. This macro should only be employed if
WIFSIGNALED returned true. This macro is not specified in POSIX.1-2001 and is not available on some
UNIX implementations (e.g., AIX, SunOS). Only use this enclosed in #ifdef WCOREDUMP ... #endif
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77677&edit=1