|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17423 COMPILE_DL_MODULENAME different in configure and
Submitted: 2002-05-25 01:38 UTC Modified: 2002-06-28 21:41 UTC
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: list at firehawksystems dot com Assigned:
Status: Closed Package: *Compile Issues
PHP Version: 4.2.1 OS: FreeBSD 4.3, same on any unix
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: list at firehawksystems dot com
New email:
PHP Version: OS:


 [2002-05-25 01:38 UTC] list at firehawksystems dot com
I am changing the way I build my PHP extension and am running into some problems. I was originally would build it by copying the directory foo_bar into the ext directory and added --enable-foo_bar=shared to the configure line of PHP and build PHP. Everything worked great!  Now I am looking to build it by:

./configure --enable-foo_bar=shared

If I build PHP with the module and install it, include/php/main/php_config.h would have two lines in it:

/*   */
#define HAVE_FOO_BAR 1

/* Whether to build foo_bar as dynamic module */

And now any clean rebuilds of the extension using the phpize way will work, becuase of the lines in php_config.h.

Now if I do a clean build and install of PHP without the module, then try to build the module PHP via phpize, PHP can't load it.  Running nm on it reveals that the get_module function is not in the .so file. I have traced the missing get_module function down to:


and COMPILE_DL_FOO_BAR is not defined at compile time.  This is not defined because after running phpize and configure are different:



It seems that the configure script is getting the underscore removed from the module name.  From what I can tell this is done in acinclude.m4 line 962:

AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z-,A-Z_), 1, Whether to build $1 as dynamic module)

I think this needs to be changed to:

AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z_-,A-Z__), 1, Whether to build $1 as dynamic module)

This will handle extensions with both dashes and underscores, I think.

I also find the same line in the aclocal.m4, so it may need changed there to.



BTW, no my extension is not named foo_bar, but it does have a underscore it.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-28 21:41 UTC]
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at In case this was a documentation 
problem, the fix will show up soon at
In case this was a website problem, the change will show
up on the site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Jan 27 19:03:58 2023 UTC