php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77677 FPM fails to build on AIX due to missing WCOREDUMP
Submitted: 2019-02-28 03:46 UTC Modified: -
From: kadler at us dot ibm dot com Assigned:
Status: Closed Package: Compile Failure
PHP Version: 7.3.2 OS: AIX
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kadler at us dot ibm dot com
New email:
PHP Version: OS:

 

 [2019-02-28 03:46 UTC] 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


Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-02-28 03:51 UTC]
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-03-01 13:52 UTC] nikic@php.net
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
 [2019-03-01 13:52 UTC] nikic@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 23 22:01:28 2024 UTC