You are not logged in.

#1 2024-06-07 01:49:43

dpad
Member
Registered: 2024-05-11
Posts: 7

[SOLVED] Problem with GCC and Python module mariadb

Sorry if this is more of a Python question than an Arch question, I don't believe it is though. I'm trying to install mariadb in a new python virtual environment. I've done this several time already on this same machine and had no problems. The module still works in those other virtual environment projects as well, so I'm not sure why it suddenly won't install anymore. I assume I have a broken package somewhere.

Here's the command output:
pip install mariadb

I've tried updating the base-devel package and installing gcc, installing wheel with pip, adding --no-cache-dir to the pip install command. So far the error message is still the same.

Last edited by dpad (2024-06-07 07:37:08)


echo "Hello, friends!"

Offline

#2 2024-06-07 06:34:47

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,979

Re: [SOLVED] Problem with GCC and Python module mariadb

      mariadb/mariadb_cursor.c:1138:39: error: passing argument 2 of ‘PyBytes_AsStringAndSize’ from incompatible pointer type [-Wincompatible-pointer-types]

The code isn't standardconform and gcc14 now treats that as an error by default.
You'll have to add "-Wno-error=incompatible-pointer-types" to the CFLAGS and/or CXXFLAGS but I don't know at hand how to do that with pip.

Offline

#3 2024-06-07 07:35:54

dpad
Member
Registered: 2024-05-11
Posts: 7

Re: [SOLVED] Problem with GCC and Python module mariadb

Thanks for the response Seth, I'll go ahead and mark it as solved.


echo "Hello, friends!"

Offline

#4 2024-06-08 22:14:40

verumignis
Member
Registered: 2024-06-08
Posts: 1

Re: [SOLVED] Problem with GCC and Python module mariadb

I was able to solve this by running

CFLAGS="-Wno-error=incompatible-pointer-types" pip install mariadb`

Thanks for the help seth!

Last edited by verumignis (2024-06-08 22:16:46)

Offline

Board footer

Powered by FluxBB