#11283 closed defect (fixed)
BUG: php5 installation fails if bind9 is already installed
Reported by: | sander@… | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | jyrkiwahlstedt, blb@…, synfinatic@…, frankelma@… | |
Port: | php5, php5-devel |
Description
If first installing port install bind9 and then trying to install php5 (+apache2 +mysql +postgresql +pear) I get a linker error.
Unresolved external _res_nclose and a few more.
Deactivating bind9, install php5 and activating bind9 works.
Attachments (3)
Change History (18)
comment:1 Changed 18 years ago by ryandesign (Ryan Carsten Schmidt)
Owner: | changed from macports-dev@… to ryandesign@… |
---|---|
Summary: | php5 installatioen with bind9 installed not working → php5 installation fails if bind9 is already installed |
comment:2 Changed 18 years ago by ryandesign (Ryan Carsten Schmidt)
comment:3 Changed 18 years ago by pipping@…
Milestone: | → Port Bugs |
---|
comment:4 Changed 17 years ago by nox@…
Priority: | Important → High |
---|---|
Summary: | php5 installation fails if bind9 is already installed → BUG: php5 installation fails if bind9 is already installed |
Version: | 1.3.2 |
comment:5 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | sander@… ryandesign@… added |
---|
Changed 17 years ago by blb@…
Attachment: | patch-configure.diff added |
---|
Patch file for configure (add to patchfiles)
comment:6 Changed 17 years ago by blb@…
Attached a patch to configure that should deal with this. Many of the changes are simply configure line number changes since I actually changed ext/standard/config.m4 to update the tests for res_nmkquery, res_nsend, and dn_expand to not look in libbind for them. Regenerating configure then results in the patch attached here.
Basically, the problem is that php checks for both res_nmkquery and __res_nmkquery (via the PHP_CHECK_FUNC def) but the code in ext/standard/dns.c only uses res_nmkquery; libbind with the bind9 port only has __res_nmkquery, hence the link errors.
comment:7 Changed 17 years ago by blb@…
Just attached the patch to use to generate a new configure file that works for the Mac. Once this patch is applied, you need to run autoconf version 2.13 (the autoconf213 port) to create a new configure. This can then be diffed to the original configure to get the patch for it. Note that there may be a few meaningless updates ('int main' versus just 'main') which I did trim out of the original patch-configure.diff. These can be left in if wanted, since they shouldn't change any functionality.
The main advantage to doing it this way instead of just including the config.m4 patch is that this only requires you to run autoconf the one time, instead of everyone wanting php5 needing to install autoconf213 and running it prior to configure.
Note this fix may be Mac-specific and a better general fix would be for the php5 autotools stuff to detect that things like __ res_nmkquery are there but not res_nmkquery and to act appropriately.
comment:9 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)
Priority: | High → Normal |
---|
I feel badly about adding a 150K patch to the port, which will have to be updated for each new version of PHP. I wish the PHP developers would fix this issue.
comment:10 Changed 17 years ago by synfinatic@…
As a user, I'd gladly download 150K extra if the f*ing thing actually worked. Right now my PHP5 install is BROKEN since I have to uninstall Bind to compile. Hence, PHP5 can't do any DNS resolution so things like Akismet don't work, so I'm getting inundated with spam on my sites.
Changed 17 years ago by synfinatic@…
Attachment: | php_config.h.patch added |
---|
patch against main/php_config (post configure) to fix build against Bind9
comment:11 Changed 17 years ago by synfinatic@…
Anyways, here's a much smaller patch (post configure) against main/php_config.h which undefs the things which break the build. Works for me. YMMV.
comment:12 follow-up: 14 Changed 16 years ago by blb@…
Port: | php5 added |
---|
You can use the config.m4.diff I attached, then add autoconf213 to depends_build and
patchfiles config.m4.diff use_autoconf yes autoconf.cmd ${prefix}/bin/autoconf213
Then no big patch and autoconf213 doesn't take but a few seconds to run.
comment:13 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)
Port: | php5-devel added |
---|
Has duplicate #17207.
comment:14 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | jwa@… blb@… synfinatic@… frankelma@… added; sander@… ryandesign@… removed |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Replying to blb@…:
You can use the config.m4.diff I attached, then add autoconf213 to depends_build [snip] Then no big patch and autoconf213 doesn't take but a few seconds to run.
Thanks, Bryan. That sounds good to me. Fixed php5-devel in r41985 and php5 in r41986. php4 does not appear to be affected. Sorry it's taken so long to get this fixed.
Ok, but unfortunately I don't know what to do to fix that. I see some references to this problem, for example here:
http://bugs.php.net/bug.php?id=26544
but I'm unclear on how to apply that to a fix in MacPorts. Anybody else know what we should do?