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

error mysqlclient C library is missing #31

Closed
ghiodor opened this issue Oct 6, 2023 · 4 comments
Closed

error mysqlclient C library is missing #31

ghiodor opened this issue Oct 6, 2023 · 4 comments

Comments

@ghiodor
Copy link

ghiodor commented Oct 6, 2023

BUG/PROBLEM REPORT / FEATURE REQUEST

What I did:

Tried to installed Zope 5.8.5 with ZMySQLDA.

What actually happened:

The bin/buildout install breaks complaining it cannot find mysqlclient (C library).

The reason is that ZMySQLDA pulls the latest python mysqlclient (2.2) which is now using pkg-config. The setup of MariaDB (at least in SLES15) does not create mysqlclient.pc file, it creates only libmariadb.pc.

This has already been fixed in mysqlclient, but not yet released, see PyMySQL/mysqlclient#631.

So, for some setups using MariaDB with mysqlclient 2.2, the adapter will break.

Workaround is to copy libmariadb.pc to mysqlclient.pc (in folder /usr/lib64/pkg-config) or wait for a new release of mysqlclient.

What version of Python and Zope/Addons I am using:

Suse SLES 15 SP 5, Python 3.11, Zope 5.8.5, MariaDB 10.6.

@dataflake
Copy link
Member

A much simpler workaround is to configure a version pin in your application that pins mysqlclient to a version less than 2.2.0.

@ghiodor
Copy link
Author

ghiodor commented Oct 6, 2023

thanks, better than simpler it would be the correct fix and I thought about it but I'm not familiar with python setup&buildout stuff. I thought it was controlled by setup.py, which I "cannot" change: install_requires += [ 'mysqlclient >= 1.4',

does it work if I simply put this restriction in my zope buildout?

@dataflake
Copy link
Member

You should be able to create a [versions] section in your buildout configuration and add the pin there:

[versions]
mysqlclient = 2.1.1

If this doesn't work, add a line versions = versions in the top level [buildout] section. Then re-run the buiildout.

@ghiodor
Copy link
Author

ghiodor commented Oct 6, 2023

yes, the first change was enough, thanks!

@icemac icemac closed this as completed Mar 19, 2024
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

3 participants