Issue 8948 - -ldb incorrectly added to SLAPD_LIBS with modular build
Summary: -ldb incorrectly added to SLAPD_LIBS with modular build
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: build (show other issues)
Version: 2.4.47
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-31 18:22 UTC by Quanah Gibson-Mount
Modified: 2019-07-24 18:54 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Quanah Gibson-Mount 2018-12-31 18:22:13 UTC
Full_Name: Quanah Gibson-Mount
Version: 2.4.47
OS: N/A
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (47.208.148.239)


configure.in has the following section handling the BDB library:

if test $ol_enable_bdb/$ol_enable_hdb != no/no; then
    OL_BERKELEY_DB

    if test $ol_cv_berkeley_db = no ; then
        AC_MSG_ERROR(BDB/HDB: BerkeleyDB not available)
    fi

    AC_DEFINE(HAVE_BERKELEY_DB,1,
        [define this if Berkeley DB is available])

    dnl $ol_cv_lib_db should be yes or -ldb
    dnl (it could be no, but that would be an error
    if test $ol_cv_lib_db != yes ; then
        BDB_LIBS="$BDB_LIBS $ol_cv_lib_db"
    fi

    SLAPD_LIBS="$SLAPD_LIBS \$(BDB_LIBS)"

    ol_link_bdb=yes
fi


This has the effect of always attempting to link the slapd binary with the BDB
library.  This block should instead be:

if test $ol_enable_bdb/$ol_enable_hdb != no/no; then
    OL_BERKELEY_DB

    if test $ol_cv_berkeley_db = no ; then
        AC_MSG_ERROR(BDB/HDB: BerkeleyDB not available)
    fi

    AC_DEFINE(HAVE_BERKELEY_DB,1,
        [define this if Berkeley DB is available])

    dnl $ol_cv_lib_db should be yes or -ldb
    dnl (it could be no, but that would be an error
    if test $ol_cv_lib_db != yes ; then
        BDB_LIBS="$BDB_LIBS $ol_cv_lib_db"
    fi

    dnl link BDB library to slapd with static backend
    if test $ol_enable_bdb/$ol_enable_hdb != mod/mod; then
        SLAPD_LIBS="$SLAPD_LIBS \$(BDB_LIBS)"
    fi

    ol_link_bdb=yes
fi

Comment 1 Quanah Gibson-Mount 2018-12-31 18:22:28 UTC
moved from Incoming to Build
Comment 2 Quanah Gibson-Mount 2018-12-31 18:26:24 UTC
changed notes
Comment 3 Quanah Gibson-Mount 2018-12-31 21:37:24 UTC
changed notes
changed state Open to Release
Comment 4 OpenLDAP project 2019-07-24 18:54:43 UTC
fixed in master
fixed in RE24 (2.4.48)
Comment 5 Quanah Gibson-Mount 2019-07-24 18:54:43 UTC
changed notes
changed state Release to Closed