php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63289 won't compile on PHP 5.4
Submitted: 2012-10-16 16:27 UTC Modified: 2012-10-19 10:44 UTC
From: chibisuke at web dot de Assigned: krakjoe (profile)
Status: Closed Package: pthreads (PECL)
PHP Version: 5.4.7 OS: FreeBSD
Private report: No CVE-ID: None
 [2012-10-16 16:27 UTC] chibisuke at web dot de
Description:
------------
The buildsystem of php 5.4 somehow adds -DTHREAD=1 to the libtool commandline which causes the compile to fail at pthreads_thread.h:83

/bin/sh /usr/local/src/php-5.4.7/libtool --silent --preserve-dup-deps --mode=compile /usr/local/src/php-5.4.7/meta_ccld  -Iext/pthreads/ -I/usr/local/src/php-5.4.7/ext/pthreads/ -DPHP_ATOM_INC -I/usr/local/src/php-5.4.7/include -I/usr/local/src/php-5.4.7/main -I/usr/local/src/php-5.4.7 -I/usr/local/src/php-5.4.7/ext/date/lib -I/usr/local/src/php-5.4.7/ext/ereg/regex -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/src/php-5.4.7/ext/mbstring/oniguruma -I/usr/local/src/php-5.4.7/ext/mbstring/libmbfl -I/usr/local/src/php-5.4.7/ext/mbstring/libmbfl/mbfl -I/usr/local/src/php-5.4.7/ext/sqlite3/libsqlite -I/usr/local/src/php-5.4.7/TSRM -I/usr/local/src/php-5.4.7/Zend  -D_REENTRANT -D_THREAD_SAFE -DTHREAD=1  -I/usr/local/include -g -O2 -fvisibility=hidden -pthread -DZTS  -c /usr/local/src/php-5.4.7/ext/pthreads/php_pthreads.c -o ext/pthreads/php_pthreads.lo
In file included from /usr/local/src/php-5.4.7/ext/pthreads/pthreads_globals.h:39,
                 from /usr/local/src/php-5.4.7/ext/pthreads/php_pthreads.c:59:
/usr/local/src/php-5.4.7/ext/pthreads/pthreads_thread.h:84: error: expected identifier or '(' before numeric constant
/usr/local/src/php-5.4.7/ext/pthreads/pthreads_thread.h:87: error: expected ')' before 'first'

since the definition of THREAD is not used anywhere in the code it can just be removed to work around that problem.

--- pthreads_thread.h.orig      2012-10-16 16:22:49.000000000 +0200
+++ pthreads_thread.h   2012-10-16 16:23:07.000000000 +0200
@@ -81,7 +81,7 @@
        * Significant Other
        */
        struct _pthread_construct *sig;
-} THREAD, *PTHREAD;
+} *PTHREAD;
 
 /* {{{ comparison function */
 int pthreads_equal(PTHREAD first, PTHREAD second) {



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-10-16 16:36 UTC] chibisuke at web dot de
I did some more tests and noticed that it only happens when you try to compile the module statically into php and have the --with-mysql flag enabled.
 [2012-10-19 10:44 UTC] krakjoe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: krakjoe
 [2012-10-19 10:44 UTC] krakjoe@php.net
The fix for this bug has been committed.

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/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

Fixed in version control
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Nov 12 16:01:30 2019 UTC