This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author yan12125
Recipients yan12125
Date 2017-02-04.05:18:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1486185534.28.0.954859942515.issue29440@psf.upfronthosting.co.za>
In-reply-to
Content
In setup.py, _dbm links to gdbm_compat only. If gdbm is built as dynamic libraries, libgdbm_compat.so has a NEEDED flag for libgdbm.so, so both symbols in libgdbm and libgdbm_compat can be used. However, as static libraries does not provide such a flag, importing _dbm raises ImportError:

shell@ASUS_Z00E_2:/data/local/tmp $ python3.7m -c 'import _dbm'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: dlopen failed: cannot locate symbol "gdbm_errno" referenced by "/data/local/tmp/python3/usr/lib/python3.7/lib-dynload/_dbm.cpython-37m.so"...

gdbm_errno is a symbol in libgdbm.a.

gdbm manual [1] suggests linking to both libraries, too.

[1] http://www.gnu.org.ua/software/gdbm/manual/html_node/Compatibility.html
History
Date User Action Args
2017-02-04 05:18:54yan12125setrecipients: + yan12125
2017-02-04 05:18:54yan12125setmessageid: <1486185534.28.0.954859942515.issue29440@psf.upfronthosting.co.za>
2017-02-04 05:18:54yan12125linkissue29440 messages
2017-02-04 05:18:53yan12125create