Uploaded image for project: 'MariaDB Connector/Python'
  1. MariaDB Connector/Python
  2. CONPY-293

mariadb-connector-python doesn't build for any modern Python release

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 1.1.10
    • 1.1.11
    • Installation
    • None
    • 3.10, 3.11, 3.12

    Description

      same error for a pypi download as well as build from github checkout. I have many python envs here and all of 3.10, 3.11, 3.12 produce the same error. Error is reproducible in three different fedora 39/40 environments. Im not sure why i am getting this error now, is it possible that there were binary wheels for linux on pypi for some period of time that were removed?

      example:

       
      [classic@framework dev]$ git clone https://github.com/mariadb-corporation/mariadb-connector-python.git
      git clone https://github.com/mariadb-corporation/mariadb-connector-python.git
      Cloning into 'mariadb-connector-python'...
      remote: Enumerating objects: 4879, done.
      remote: Counting objects: 100% (1559/1559), done.
      remote: Compressing objects: 100% (469/469), done.
      remote: Total 4879 (delta 1183), reused 1441 (delta 1086), pack-reused 3320 (from 1)
      Receiving objects: 100% (4879/4879), 1.90 MiB | 19.62 MiB/s, done.
      Resolving deltas: 100% (3582/3582), done.
       
      [classic@framework dev]$ cd mariadb-connector-python/
       
      [classic@framework mariadb-connector-python:1.1]$ ~/.venv310/bin/python -V
      Python 3.10.13
       
      [classic@framework mariadb-connector-python:1.1]$ ~/.venv310/bin/python setup.py build
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-310
      creating build/lib.linux-x86_64-cpython-310/mariadb
      copying mariadb/__init__.py -> build/lib.linux-x86_64-cpython-310/mariadb
      copying mariadb/connectionpool.py -> build/lib.linux-x86_64-cpython-310/mariadb
      copying mariadb/connections.py -> build/lib.linux-x86_64-cpython-310/mariadb
      creating build/lib.linux-x86_64-cpython-310/mariadb/constants
      copying mariadb/constants/__init__.py -> build/lib.linux-x86_64-cpython-310/mariadb/constants
      copying mariadb/constants/CAPABILITY.py -> build/lib.linux-x86_64-cpython-310/mariadb/constants
      copying mariadb/constants/CLIENT.py -> build/lib.linux-x86_64-cpython-310/mariadb/constants
      copying mariadb/constants/CURSOR.py -> build/lib.linux-x86_64-cpython-310/mariadb/constants
      copying mariadb/constants/ERR.py -> build/lib.linux-x86_64-cpython-310/mariadb/constants
      copying mariadb/constants/FIELD_FLAG.py -> build/lib.linux-x86_64-cpython-310/mariadb/constants
      copying mariadb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-cpython-310/mariadb/constants
      copying mariadb/constants/EXT_FIELD_TYPE.py -> build/lib.linux-x86_64-cpython-310/mariadb/constants
      copying mariadb/constants/INDICATOR.py -> build/lib.linux-x86_64-cpython-310/mariadb/constants
      copying mariadb/constants/INFO.py -> build/lib.linux-x86_64-cpython-310/mariadb/constants
      copying mariadb/constants/STATUS.py -> build/lib.linux-x86_64-cpython-310/mariadb/constants
      copying mariadb/constants/TPC_STATE.py -> build/lib.linux-x86_64-cpython-310/mariadb/constants
      copying mariadb/cursors.py -> build/lib.linux-x86_64-cpython-310/mariadb
      copying mariadb/dbapi20.py -> build/lib.linux-x86_64-cpython-310/mariadb
      copying mariadb/field.py -> build/lib.linux-x86_64-cpython-310/mariadb
      copying mariadb/release_info.py -> build/lib.linux-x86_64-cpython-310/mariadb
      running build_ext
      building 'mariadb._mariadb' extension
      creating build/temp.linux-x86_64-cpython-310
      creating build/temp.linux-x86_64-cpython-310/mariadb
      gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_MARIADB_MAJOR_VERSION=1 -DPY_MARIADB_MINOR_VERSION=1 -DPY_MARIADB_PATCH_VERSION=11 -DPY_MARIADB_PRE_RELEASE_SEGMENT=\"None\" -DPY_MARIADB_PRE_RELEASE_NR=\"0\" -DPY_MARIADB_POST_RELEASE_SEGMENT=\"None\" -DPY_MARIADB_POST_RELEASE_NR=\"0\" -I/usr/include/mysql -I/usr/include/mysql/mysql -I./include -I/home/classic/.venv310/include -I/opt/python-3.10.13/include/python3.10 -c mariadb/mariadb.c -o build/temp.linux-x86_64-cpython-310/mariadb/mariadb.o -DDEFAULT_PLUGINS_SUBDIR=\"/usr/lib64/mariadb/plugin\"
      gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_MARIADB_MAJOR_VERSION=1 -DPY_MARIADB_MINOR_VERSION=1 -DPY_MARIADB_PATCH_VERSION=11 -DPY_MARIADB_PRE_RELEASE_SEGMENT=\"None\" -DPY_MARIADB_PRE_RELEASE_NR=\"0\" -DPY_MARIADB_POST_RELEASE_SEGMENT=\"None\" -DPY_MARIADB_POST_RELEASE_NR=\"0\" -I/usr/include/mysql -I/usr/include/mysql/mysql -I./include -I/home/classic/.venv310/include -I/opt/python-3.10.13/include/python3.10 -c mariadb/mariadb_codecs.c -o build/temp.linux-x86_64-cpython-310/mariadb/mariadb_codecs.o -DDEFAULT_PLUGINS_SUBDIR=\"/usr/lib64/mariadb/plugin\"
      gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_MARIADB_MAJOR_VERSION=1 -DPY_MARIADB_MINOR_VERSION=1 -DPY_MARIADB_PATCH_VERSION=11 -DPY_MARIADB_PRE_RELEASE_SEGMENT=\"None\" -DPY_MARIADB_PRE_RELEASE_NR=\"0\" -DPY_MARIADB_POST_RELEASE_SEGMENT=\"None\" -DPY_MARIADB_POST_RELEASE_NR=\"0\" -I/usr/include/mysql -I/usr/include/mysql/mysql -I./include -I/home/classic/.venv310/include -I/opt/python-3.10.13/include/python3.10 -c mariadb/mariadb_connection.c -o build/temp.linux-x86_64-cpython-310/mariadb/mariadb_connection.o -DDEFAULT_PLUGINS_SUBDIR=\"/usr/lib64/mariadb/plugin\"
      mariadb/mariadb_connection.c: In function ‘MrdbConnection_escape_string’:
      mariadb/mariadb_connection.c:826:15: warning: unused variable ‘string’ [-Wunused-variable]
        826 |     PyObject *string= NULL,
            |               ^~~~~~
      gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_MARIADB_MAJOR_VERSION=1 -DPY_MARIADB_MINOR_VERSION=1 -DPY_MARIADB_PATCH_VERSION=11 -DPY_MARIADB_PRE_RELEASE_SEGMENT=\"None\" -DPY_MARIADB_PRE_RELEASE_NR=\"0\" -DPY_MARIADB_POST_RELEASE_SEGMENT=\"None\" -DPY_MARIADB_POST_RELEASE_NR=\"0\" -I/usr/include/mysql -I/usr/include/mysql/mysql -I./include -I/home/classic/.venv310/include -I/opt/python-3.10.13/include/python3.10 -c mariadb/mariadb_cursor.c -o build/temp.linux-x86_64-cpython-310/mariadb/mariadb_cursor.o -DDEFAULT_PLUGINS_SUBDIR=\"/usr/lib64/mariadb/plugin\"
      mariadb/mariadb_cursor.c: In function ‘MrdbCursor_execute_text’:
      mariadb/mariadb_cursor.c:1138:39: error: passing argument 2 of ‘PyBytes_AsStringAndSize’ from incompatible pointer type [-Wincompatible-pointer-types]
       1138 |         PyBytes_AsStringAndSize(stmt, &statement, (Py_ssize_t *)&statement_len);
            |                                       ^~~~~~~~~~
            |                                       |
            |                                       const char **
      In file included from /opt/python-3.10.13/include/python3.10/Python.h:82,
                       from ./include/mariadb_python.h:21,
                       from mariadb/mariadb_cursor.c:20:
      /opt/python-3.10.13/include/python3.10/bytesobject.h:56:12: note: expected ‘char **’ but argument is of type ‘const char **’
         56 |     char **s,           /* pointer to buffer variable */
            |     ~~~~~~~^
      error: command '/usr/bin/gcc' failed with exit code 1
      
      

      Attachments

        Activity

          People

            georg Georg Richter
            zzzeek Mike Bayer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.