Skip to content

Build failure of v3.12.0rc1 due to missing _gdbm on macOS #108856

@detrin

Description

@detrin

Bug report

Checklist

  • I am confident this is a bug in CPython, not a bug in a third-party project
  • I have searched the CPython issue tracker,
    and am confident this bug has not been reported before

CPython versions tested on:

3.12

Operating systems tested on:

macOS

Output from running 'python -VV' on the command line:

No response

A clear and concise description of the bug:

I think the source of error will be with incorrect paths to gdbm lib.
I installed gdbm with https://formulae.brew.sh/formula/gdbm.
In order to use it with python3.11 installed via homebrew I had to install python-gdbm@3.11.
Looking into its install script https://github.com/Homebrew/homebrew-core/blob/9ac362e437a4cb09808f3a7e01066f5619a71fa3/Formula/p/python-gdbm@3.11.rb it is installing gdbm module after the python installation.

Steps I did

git clone https://github.com/python/cpython
git checkout v3.12.0rc1
./configure
make

and I am getting an error

The necessary bits to build these optional modules were not found:
_gdbm

When using flags in make

CPPFLAGS="-I/opt/homebrew/Cellar/gdbm/1.23/include" LDFLAGS="-L/opt/homebrew/Cellar/gdbm/1.23/lib" make 

I am still getting the same error.

I have no idea how to fix this issue any suggestion will be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-macbuildThe 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