Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 564824 - dev-lang/php: ./configure fails to autodetect sys-libs/db-5.3
Summary: dev-lang/php: ./configure fails to autodetect sys-libs/db-5.3
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-03 19:22 UTC by Robert Förster
Modified: 2015-11-05 19:49 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Förster 2015-11-03 19:22:49 UTC
if db 5.3 or higher is installed configure will complain:
checking for DB4 major version... configure: error: Header contains different version
just adding the block makes it work, but i feel like at least (well, probably only) 5.3 should be added to ext/dba/config.m4 as we run eautoreconf anyway...
6 is unsuitable at any rate as there is another check for DB_VERSION_MAJOR which cleanly leaves 6 out but that script is ancient anyway...
6 included a licensing change so i'm not sure if it would be suitable at all.

i have no idea how other distros do it yet; at least fedora throws the whole check away but they are still using db4.


Reproducible: Always
Comment 1 Michael Orlitzky gentoo-dev 2015-11-03 20:31:56 UTC
The autodetection in PHP's configure script actually works -- as long as you're not using db-5.3! What it does is check for db-5.1, db-5.0, db-4.8, etc. in order of preference. Only as a last resort does it fall back to /usr/include/db.h, which can point to the db-6.0 header:

    elif test -f "$i/include/db5.1/db.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/db5.1/db.h
      break
    elif test -f "$i/include/db5.0/db.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/db5.0/db.h
      break
    elif test -f "$i/include/db4.8/db.h"; then
      THIS_PREFIX=$i
      THIS_INCLUDE=$i/include/db4.8/db.h
      break

If you have db:5.1 installed, it will get autodetected even when db:6.0 is installed and everything will work fine. It's only the combination of 5.3 and 6.0 that cause problems.

Since PHP works fine with db:5.3, I think I'll just fix their configure script upstream. In the meantime it might make sense to remove db:5.3 from $DEPEND but it depends on how long it will be before the fix trickles down.
Comment 2 Michael Orlitzky gentoo-dev 2015-11-03 21:07:21 UTC
Sent a pull request:

  https://github.com/php/php-src/pull/1617

We could probably fix that right in src_prepare() for now -- we wouldn't even need a revbump. I'll play with it later, let's wait to see what upstream says.
Comment 3 Michael Orlitzky gentoo-dev 2015-11-05 19:49:00 UTC
No word on the pull request yet, but I don't want to leave this broken. Fixed in,

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74ec204a022e4126ca35008c0c27d13645d8ca27

The same problem existed with older 4.x versions.