dev-python/mysql-python fails to build (tried 1.2.5 and 1.2.3): x86_64-pc-linux-gnu-gcc -O2 -pipe -fno-strict-aliasing -fPIC -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/include/mysql -I/usr/include/mysql/.. -I/usr/include/python2.7 -c _mysql.c -o /free/portage/dev-python/mysql-python-1.2.5-r1/work/MySQL-python-1.2.5-python2_7/temp.linux-x86_64-2.7/_mysql.o _mysql.c:44:10: fatal error: my_config.h: No such file or directory After some investigation, the problem seems to be that MariaDB 10.2.8 cleaned up the install process so that headers are installed in more sensible locations [1]. This involved my_config being moved into the server/ subdiorectory, a change python-mysql (and others) are not aware of. Is there any way to detect this in the ebuild and modify CFLAGS accordingly, until upstream fixes it [2]? [1]: https://jira.mariadb.org/browse/MDEV-13370 [2]: https://github.com/farcepest/MySQLdb1/issues/132
Yep, confirmed, this is happening w/ dev-db/mariadb-10.2
appeared recently at the tinderbox image 17.1_desktop_gnome_systemd-20190816-151832
Created attachment 587460 [details] emerge-info.txt
Created attachment 587462 [details] dev-python:mysql-python-1.2.5-r2:20190819-043822.log
Created attachment 587464 [details] emerge-history.txt
Created attachment 587466 [details] environment
Created attachment 587468 [details] etc.portage.tbz2
Created attachment 587470 [details] temp.tbz2
It's happenning with mysql-8 and mysql-connector-c-8 as well.
Created attachment 587766 [details, diff] MySQL-python-1.2.5-my_config-missing.diff Couldn't we just get rid of this include? Works for me.
here only rdflib was depending on mysql-python and nothing depended on rdflib, so.. emerge -a --depclean rdflib mysql-python solved the problem.
This package is a dependency for MythTV, so I can't drop it, but the comment above about the include not being needed provided a trivial workaround. Until this is fixed in the ebuild, this gets me going: touch /usr/include/my_config.h emerge -1v dev-python/mysql-python rm /usr/include/my_config.h
A patched dev-python/mysql-python-1.2.5-r3 is available in my overlay: https://github.com/stefantalpalaru/gentoo-overlay
I was not able to figure out how to access the fix in comment 13, but the one in comment 12 worked fine, and seems safe to me. Thanks, Preston
(In reply to Petr Cerny [:hrosik] from comment #0) > Is there any way to detect this in the ebuild and modify CFLAGS accordingly, > until upstream fixes it [2]? Upstream says they are not going to fix it and the whole project is unmaintained: https://github.com/farcepest/MySQLdb1/issues/132#issuecomment-334560666 People shall use the "mysqlclient" fork instead: https://pypi.org/project/mysqlclient/ I assume we should last rite dev-python/mysql-python and move its reverse dependencies to dev-python/mysqlclient.
Just run into this issue too.
hit this bug after recent sync and being forced to rebuild dev-python/mysql-python. The current version 1.2.5-r1 is marked is stable but it's broken. Please apply patches asap.
Same issue here.
Created attachment 614234 [details] alarig-emerge--info
Created attachment 614236 [details] alarig-emerge-pqv
Created attachment 614238 [details] alarig-build.log
Same here, see my previous attachments for the requested outputs.
Thanks for the pointer to dev-python/mysqlclient, it worked for my usecase (LibreNMS).
I understand there is ongoing effort to replace dev-python/mysql-python with dev-python/mysqlclient, however please apply the proposed patch and create the -r3, so it doesn't break world updates.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13926f810426bd99d4d580bf6facc29d552e5e6f commit 13926f810426bd99d4d580bf6facc29d552e5e6f Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2020-03-08 01:23:05 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2020-03-08 01:31:32 +0000 dev-python/mysql-python: fix building against dev-db/mysql-8+ Closes: https://bugs.gentoo.org/632578 Package-Manager: Portage-2.3.91, Repoman-2.3.20 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> ...sql-python-1.2.5-drop-my_config.h-include.patch | 15 +++++++ .../mysql-python/mysql-python-1.2.5-r3.ebuild | 46 ++++++++++++++++++++++ 2 files changed, 61 insertions(+)