php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78149 when built using some older versions of gcc, php's API symbols aren't exported
Submitted: 2019-06-12 11:46 UTC Modified: 2019-06-12 12:30 UTC
From: php at geoff dot dj Assigned:
Status: Duplicate Package: *Compile Issues
PHP Version: 7.2.19 OS: RHEL4.7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php at geoff dot dj
New email:
PHP Version: OS:

 

 [2019-06-12 11:46 UTC] php at geoff dot dj
Description:
------------
Several places in the code test for GNUC >= 4 before #defining API strings

 #elif defined(__GNUC__) && __GNUC__ >= 4
 #      define CWD_API __attribute__ ((visibility("default")))
 #else
 #      define CWD_API
 #endif

This is all very well but some versions of gcc (eg the version in RHEL4, gcc 3.4.6) supports visibility attribute; this is made worse because the configure script actually tests whether visibility is supported by the compiler and (if so) adds the -fvisibility=hidden compile flag. This means that none of the API symbols are visible when built on those versions of gcc.

Suggest adding a GCC_HAS_VISIBILITY or similar flag that the configure script can set after its test and that can be used in place of the GNUC >= 4 test above.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-06-12 11:49 UTC] derick@php.net
This is known, and I wrote about it too:
https://derickrethans.nl/significant-symbols.html
 [2019-06-12 11:51 UTC] derick@php.net
-Status: Open +Status: Duplicate
 [2019-06-12 11:51 UTC] derick@php.net
Duplicate of 77883
 [2019-06-12 12:30 UTC] php at geoff dot dj
Have added a patch to bug 77883.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Jan 24 01:01:26 2020 UTC