Skip to content

configure: --with-dbmliborder=gdbm no longer satisfies _dbm #98636

Closed
@mgorny

Description

@mgorny

Bug report

It seems that the configure script is no longer able to build _dbm module from gdbm_compat.

Excerpts from configure log (full log: configure.txt):

$ ./configure -C --with-dbmliborder=gdbm
[...]
checking gdbm.h usability... yes
checking gdbm.h presence... yes
checking for gdbm.h... yes
checking for gdbm_open in -lgdbm... yes
checking ndbm.h usability... no
checking ndbm.h presence... no
checking for ndbm.h... no
checking for ndbm presence and linker args...  ()
checking gdbm/ndbm.h usability... yes
checking gdbm/ndbm.h presence... yes
checking for gdbm/ndbm.h... yes
checking gdbm-ndbm.h usability... no
checking gdbm-ndbm.h presence... no
checking for gdbm-ndbm.h... no
checking for library containing dbm_open... -lgdbm_compat
checking db.h usability... no
checking db.h presence... no
checking for db.h... no
checking for --with-dbmliborder... gdbm
checking for _dbm module CFLAGS and LIBS...  
[...]
checking for stdlib extension module _dbm... missing
checking for stdlib extension module _gdbm... yes
[...]

It seems that the problem is in the following snippet:

for db in $with_dbmliborder; do
  case "$db" in
    ndbm)
      if test "$have_ndbm" = yes; then
        DBM_CFLAGS="-DUSE_NDBM"
        DBM_LIBS="$dbm_ndbm"
        have_dbm=yes
        break
      fi
      ;;
    gdbm)
      if test "$have_gdbm_compat" = yes; then
        DBM_CFLAGS="-DUSE_GDBM_COMPAT"
        DBM_LIBS="-lgdbm_compat"
        have_dbm=yes
        break
      fi
      ;;

However, have_gdbm_compat is not declared anymore, probably because of:

AC_MSG_CHECKING([for ndbm presence and linker args])
AS_CASE([$ac_cv_search_dbm_open],
  [*ndbm*|*gdbm_compat*], [
    dbm_ndbm="$ac_cv_search_dbm_open"
    have_ndbm=yes
  ],

declaring have_ndbm=yes in this case.

Seems to have been introduced in ec5e253 by @tiran.

Your environment

  • CPython versions tested on: 3.12.0a1
  • Operating system and architecture: Gentoo/amd64

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions