|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65319 Unable to build event extension statically into PHP
Submitted: 2013-07-23 21:48 UTC Modified: 2013-07-26 09:03 UTC
From: florin dot asavoaie at gmail dot com Assigned: osmanov (profile)
Status: Closed Package: event (PECL)
PHP Version: 5.5.1 OS: Probably any
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.
Block user comment
Status: Assign to:
Bug Type:
From: florin dot asavoaie at gmail dot com
New email:
PHP Version: OS:


 [2013-07-23 21:48 UTC] florin dot asavoaie at gmail dot com
Tested with PHP 5.5.1 source and event 1.7.1.

The problem is in the code of config.m4 that belongs to this extension, the part 
where it checks the PHP version. It creates a source file that includes 
<php_version.h>. However, if you have a different PHP version (older than 5.4.0 in 
my case) installed already, it will, of course, include that file and say that it 
requires a PHP version newer than 5.4.0. Of course, it would be correct that, in 
this case, it would include something like "main/php_version.php" and use some 
other method to detect the PHP version that you are trying to build and not 
whatever else you have installed on your system.

Test script:

Expected result:
Being able to compile the extension statically into PHP

Actual result:
Finds a different version number rather than the one I am trying to build.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-07-24 12:51 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: osmanov
 [2013-07-24 12:51 UTC]
I've replaced the try-compile block with some $AWK parsing.
Please try Git version:

	git clone

 [2013-07-25 13:04 UTC] florin dot asavoaie at gmail dot com
Now it works just fine (with the version from git). I still have a problem when 
I compile libevent without OpenSSL and specify --without-event-openssl in php 
configure command. I am not sure if it is because of the extension or because of 
the alpha version of libevent that I am using. I will test more and open another 
bug if I realize it is a problem with the extension.

$ php/bin/php -i | grep event
Configure Command =>  './configure'  '--disable-all' '--disable-cgi' '--with-
event-libevent-dir=/home/florin/use/libevent' '--prefix=/home/florin/use/php' '-
-with-event-core' '--with-event-openssl' '--without-pcre-regex' '--with-event-
extra' '--without-event-pthreads'
event support => enabled
 [2013-07-26 09:03 UTC]
Indeed, there was a bug in confing.m4. LDFLAGS included -levent_pthreads with no 
regards to whether pthreads are enabled:

However, --with-event-openssl option shouldn't cause issues. Please check out 
current Git version. I'll package release, if everything is OK.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun Oct 02 22:05:53 2022 UTC