#42627 [Opn->Csd]: bz2 extension fails to build with -fno-common
| From: | jani@php.net | Date: | Wed, 12 Sep 2007 11:45:15 +0000 |
| Subject: | #42627 [Opn->Csd]: bz2 extension fails to build with -fno-common | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-117481@lists.php.net to get a copy of this message | ||
ID: 42627
Updated by: jani@php.net
Reported By: jdolecek at netbsd dot org
-Status: Open
+Status: Closed
-Bug Type: Compile Failure
+Bug Type: Bzip2 Related
Operating System: Mac OS X
PHP Version: 5.2.4
New Comment:
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
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2007-09-11 19:34:15] jdolecek at netbsd dot org
Description:
------------
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.
Fix:
--- 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
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42627&edit=1