Skip to content

[Build] 2.2.2: build fails #695

Closed
Closed
@methane

Description

@methane

Discussed in #694

Originally posted by kloczek February 4, 2024

Looks like build fails with:

+ /usr/bin/python3 -sBm build -w --no-isolation
* Getting build dependencies for wheel...
Trying pkg-config --exists mysqlclient
# Options for building extension module:
  extra_compile_args: ['-I/usr/include/mysql', '-std=c99']
  extra_link_args: ['-lmysqlclient']
  define_macros: [('version_info', (2, 2, 2, 'final', 0)), ('__version__', '2.2.2')]
running egg_info
creating src/mysqlclient.egg-info
writing src/mysqlclient.egg-info/PKG-INFO
writing dependency_links to src/mysqlclient.egg-info/dependency_links.txt
writing top-level names to src/mysqlclient.egg-info/top_level.txt
writing manifest file 'src/mysqlclient.egg-info/SOURCES.txt'
reading manifest file 'src/mysqlclient.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'src/mysqlclient.egg-info/SOURCES.txt'
* Building wheel...
Trying pkg-config --exists mysqlclient
# Options for building extension module:
  extra_compile_args: ['-I/usr/include/mysql', '-std=c99']
  extra_link_args: ['-lmysqlclient']
  define_macros: [('version_info', (2, 2, 2, 'final', 0)), ('__version__', '2.2.2')]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-38
creating build/lib.linux-x86_64-cpython-38/MySQLdb
copying src/MySQLdb/__init__.py -> build/lib.linux-x86_64-cpython-38/MySQLdb
copying src/MySQLdb/_exceptions.py -> build/lib.linux-x86_64-cpython-38/MySQLdb
copying src/MySQLdb/connections.py -> build/lib.linux-x86_64-cpython-38/MySQLdb
copying src/MySQLdb/converters.py -> build/lib.linux-x86_64-cpython-38/MySQLdb
copying src/MySQLdb/cursors.py -> build/lib.linux-x86_64-cpython-38/MySQLdb
copying src/MySQLdb/release.py -> build/lib.linux-x86_64-cpython-38/MySQLdb
copying src/MySQLdb/times.py -> build/lib.linux-x86_64-cpython-38/MySQLdb
creating build/lib.linux-x86_64-cpython-38/MySQLdb/constants
copying src/MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-cpython-38/MySQLdb/constants
copying src/MySQLdb/constants/CR.py -> build/lib.linux-x86_64-cpython-38/MySQLdb/constants
copying src/MySQLdb/constants/ER.py -> build/lib.linux-x86_64-cpython-38/MySQLdb/constants
copying src/MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-cpython-38/MySQLdb/constants
copying src/MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-cpython-38/MySQLdb/constants
copying src/MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-cpython-38/MySQLdb/constants
running egg_info
writing src/mysqlclient.egg-info/PKG-INFO
writing dependency_links to src/mysqlclient.egg-info/dependency_links.txt
writing top-level names to src/mysqlclient.egg-info/top_level.txt
reading manifest file 'src/mysqlclient.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'src/mysqlclient.egg-info/SOURCES.txt'
copying src/MySQLdb/_mysql.c -> build/lib.linux-x86_64-cpython-38/MySQLdb
running build_ext
building 'MySQLdb._mysql' extension
creating build/temp.linux-x86_64-cpython-38
creating build/temp.linux-x86_64-cpython-38/src
creating build/temp.linux-x86_64-cpython-38/src/MySQLdb
/usr/bin/gcc -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -fno-semantic-interposition -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -fno-semantic-interposition -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -fno-semantic-interposition -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -fPIC "-Dversion_info=(2, 2, 2, 'final', 0)" -D__version__=2.2.2 -I/usr/include/python3.8 -c src/MySQLdb/_mysql.c -o build/temp.linux-x86_64-cpython-38/src/MySQLdb/_mysql.o -I/usr/include/mysql -std=c99
src/MySQLdb/_mysql.c: In function ‘_mysql_ConnectionObject_kill’:
src/MySQLdb/_mysql.c:1801:69: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Wformat=]
 1801 |     r = mysql_query(&(self->connection), snprintf(query, 50, "KILL %d", pid));
      |                                                                    ~^   ~~~
      |                                                                     |   |
      |                                                                     int long unsigned int
      |                                                                    %ld
src/MySQLdb/_mysql.c:1801:42: error: passing argument 2 of ‘mysql_query’ makes pointer from integer without a cast [-Wint-conversion]
 1801 |     r = mysql_query(&(self->connection), snprintf(query, 50, "KILL %d", pid));
      |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                          |
      |                                          int
In file included from src/MySQLdb/_mysql.c:29:
/usr/include/mysql/mysql.h:479:51: note: expected ‘const char *’ but argument is of type ‘int’
  479 | int STDCALL mysql_query(MYSQL *mysql, const char *q);
      |                                       ~~~~~~~~~~~~^
error: command '/usr/bin/gcc' failed with exit code 1

ERROR Backend subprocess exited when trying to invoke build_wheel

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions