Bug 1191098 - cannot build openldap package: Unknown Berkeley DB major version in db.h
Summary: cannot build openldap package: Unknown Berkeley DB major version in db.h
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: openldap   
(Show other bugs)
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Synacek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 1190645
TreeView+ depends on / blocked
 
Reported: 2015-02-10 12:54 UTC by Jan Synacek
Modified: 2015-02-11 11:35 UTC (History)
5 users (show)

Fixed In Version: openldap-2.4.40-9.fc22
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-02-11 11:35:29 UTC
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
OpenLDAP ITS 8056 None None None Never

Description Jan Synacek 2015-02-10 12:54:05 UTC
Description of problem:
The configure script returns "Unknown Berkeley DB major version in db.h" for some reason.

Nothing in this regard has changed in libdb recently, db.h from F21 and from rawhide are identical. Also, nothing has changed in openldap's configure since the last build (Jan 27, 2015: http://koji.fedoraproject.org/koji/buildinfo?buildID=606939). I suspect this to be some weirdness in the autoconf machinery, but I need to investigate this a bit more.


Steps to Reproduce:
1. Try mockbuild (or regular build) of openldap for Fedora Rawhide


Actual results:
checking for db.h... yes
checking for Berkeley DB major version in db.h... none
configure: error: Unknown Berkeley DB major version in db.h


Expected results:
checking for db.h... yes
checking for Berkeley DB major version in db.h... 5
checking for Berkeley DB minor version in db.h... 3

Comment 1 Jan Synacek 2015-02-10 12:55:45 UTC
Pavel, does this look familiar? Have there been any changes recently in the autotools chain? I'm not even sure how to debug this...

Comment 2 Pavel Raiskup 2015-02-10 16:49:14 UTC
Sorry for the delay, my IMAP reader was KO.
Grepping says it is OL_BDB_HEADER_VERSION macro.  Isn't this related to gcc
update to 5.0.0?  The check is done via 'cc -E conftest.c', conftest.c
contains (something like):

  #include <db.h>
  #ifndef DB_VERSION_MAJOR
  #       define DB_VERSION_MAJOR 1
  #endif
  __db_version DB_VERSION_MAJOR

Using cpp conftest.c with slightly modified lines:

  #include <db.h>
  __db_version (DB_VERSION_MAJOR)

shows that new you can not simply grep for __db_version now, output:
                                           )
  # 2 "conftest.c"
  __db_version (
  # 2 "conftest.c" 3 4
               5
  # 2 "conftest.c"
                               )

Pavel

Comment 3 Jan Synacek 2015-02-11 09:27:55 UTC
Hmm, I didn't find anything related to this among the GCC 5 changes. Running cpp with the -P option seems to fix things, thanks!

Comment 4 Pavel Raiskup 2015-02-11 11:14:34 UTC
Yep, and making it extra portable, probably checking for '-P' option presence
should precede actual 'cc -E' call.


Note You need to log in before you can comment on or make changes to this bug.