Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solaris needs #include "python.h" as soon as possible #213

Closed
jcea opened this issue Sep 27, 2019 · 2 comments
Closed

Solaris needs #include "python.h" as soon as possible #213

jcea opened this issue Sep 27, 2019 · 2 comments

Comments

@jcea
Copy link
Contributor

jcea commented Sep 27, 2019

Affected Operating Systems

  • Solaris family

Affected py-lmdb Version

Releases after Jan 22, 2019.

py-lmdb Installation Method

sudo pip install lmdb

Using bundled or distribution-provided LMDB library?

Bundled and distribution-provided.

Describe Your Problem

After PR #194 was integrated, LMDB doesn't work on Solaris based systems.

Full triage and details: TritonDataCenter/pkgsrc#207

TL;DR: After PR #194, code uses errno. In Solaris, errno implementation depends of _REENTRANT symbol defined of not. In distribution-based python, _REENTRANT is defined in python.h, but in current LMDB code #include "python.h" is done AFTER #include <errno.h>, too late for it to have the right effect.

Tha patch is trivial: do #include <errno.h> later or, better, do #include "python.h" because could be some other side-effects that we want to enable ASAP.

Pull Request in a few minutes.

Errors/exceptions Encountered

LMDB fails to open an old database because errno doesn't recognize "file exists" error on Solaris.

@jcea
Copy link
Contributor Author

jcea commented Sep 27, 2019

PR #214

@jnwatson
Copy link
Owner

Thank you. PR accepted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants