diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -1256,17 +1260,17 @@ class PyBuildExt(build_ext): if find_file("ndbm.h", inc_dirs, []) is not None: # Some systems have -lndbm, others have -lgdbm_compat, # others don't have either if self.compiler.find_library_file(lib_dirs, 'ndbm'): ndbm_libs = ['ndbm'] elif self.compiler.find_library_file(lib_dirs, 'gdbm_compat'): - ndbm_libs = ['gdbm_compat'] + ndbm_libs = ['gdbm', 'gdbm_compat'] else: ndbm_libs = [] if dbm_setup_debug: print("building dbm using ndbm") dbmext = Extension('_dbm', ['_dbmmodule.c'], define_macros=[ ('HAVE_NDBM_H',None), ], libraries=ndbm_libs)