|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42627 bz2 extension fails to build with -fno-common
Submitted: 2007-09-11 19:34 UTC Modified: 2007-09-12 11:45 UTC
From: jdolecek at netbsd dot org Assigned:
Status: Closed Package: Bzip2 Related
PHP Version: 5.2.4 OS: Mac OS X
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: jdolecek at netbsd dot org
New email:
PHP Version: OS:


 [2007-09-11 19:34 UTC] jdolecek at netbsd dot org
bz2 extension header causes php_bz2_filter_factory symbol to be a common symbol, rather then extern variable, due to lacking 'extern' modifier. When compiling on Mac OS X, which uses -fno-common by default, this causes build failure. The header should define it just as extern, since the symbol is properly declared in bz2_filter.c.


--- ext/bz2/php_bz2.h.orig      2007-09-02 20:11:08.000000000 +0200
+++ ext/bz2/php_bz2.h
@@ -51,7 +51,7 @@ PHP_BZ2_API php_stream *_php_stream_bz2o
 #define php_stream_bz2open_from_BZFILE(bz, mode, innerstream)  _php_stream_bz2open_from_BZFILE((bz), (mode), (innerstream) STREAMS_CC TSRMLS_CC)
 #define php_stream_bz2open(wrapper, path, mode, options, opened_path)  _php_stream_bz2open((wrapper), (path), (mode), (options), (opened_path), NULL STREAMS_CC TSRMLS_CC)

-php_stream_filter_factory php_bz2_filter_factory;
+extern php_stream_filter_factory php_bz2_filter_factory;
 extern php_stream_ops php_stream_bz2io_ops;
 #define PHP_STREAM_IS_BZIP2    &php_stream_bz2io_ops


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-12 11:45 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Mar 28 22:03:42 2023 UTC