Open foobar26 opened 3 years ago
And another issue I forgot: initially the build failed because the mysql_config application was missing:
Building wheel for mysqlclient (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /var/lib/syncserver_1.9_doesntWork/local/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fxEZaW/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fxEZaW/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-hpxa8e
cwd: /tmp/pip-install-fxEZaW/mysqlclient/
Complete output (40 lines):
sh: 1: mysql_config: not found
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/_exceptions.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/compat.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-2.7/MySQLdb
creating build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
running build_ext
building 'MySQLdb._mysql' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/MySQLdb
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wno-error -Wno-error=format-security -fPIC -Dversion_info=(1,4,6,'final',0) -D__version__=1.4.6 -I/usr/include/mariadb -I/usr/include/mariadb/mysql -I/usr/include/python2.7 -c MySQLdb/_mysql.c -o build/temp.linux-x86_64-2.7/MySQLdb/_mysql.o
MySQLdb/_mysql.c: In function ‘_mysql_field_to_python’:
MySQLdb/_mysql.c:1145:33: warning: passing argument 1 of ‘PyInt_FromString’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
return PyInt_FromString(rowitem, NULL, 10);
^~~~~~~
In file included from /usr/include/python2.7/Python.h:89:0,
from MySQLdb/_mysql.c:38:
/usr/include/python2.7/intobject.h:37:24: note: expected ‘char *’ but argument is of type ‘const char *’
PyAPI_FUNC(PyObject *) PyInt_FromString(char*, char**, int);
^~~~~~~~~~~~~~~~
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-gnDdqE/python2.7-2.7.17=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wno-error -Wno-error=format-security -fPIC build/temp.linux-x86_64-2.7/MySQLdb/_mysql.o -L/usr/lib/x86_64-linux-gnu/ -lmariadb -lz -ldl -lm -lpthread -lssl -lcrypto -o build/lib.linux-x86_64-2.7/MySQLdb/_mysql.so
/usr/bin/ld: -lz kann nicht gefunden werden
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for mysqlclient
Running setup.py clean for mysqlclient
Building wheel for SyncStorage (setup.py) ... done
Created wheel for SyncStorage: filename=SyncStorage-1.8.0-py2-none-any.whl size=134927 sha256=091ab42387231ba9e75a25d65d10f9aaf0a434bc1ca843c25fef60958af0ba4c
Stored in directory: /tmp/pip-ephem-wheel-cache-R2JsvT/wheels/1a/b3/a7/c4a20c59595db53cc096c436c87cac53ffd9c3aff36e5901b5
Successfully built tokenserver SyncStorage
Failed to build mysqlclient
Installing collected packages: mysqlclient, Paste, plaster, plaster-pastedeploy, PyBrowserID, PyJWT, PyFxA, PyMySQL, pymysql-sa, testfixtures, tokenlib, tokenserver, pyramid-hawkauth, wsgiproxy, waitress, beautifulsoup4, webtest, SyncStorage
Running setup.py install for mysqlclient ... error
ERROR: Command errored out with exit status 1:
command: /var/lib/syncserver_1.9_doesntWork/local/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fxEZaW/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fxEZaW/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-5zpyWX/install-record.txt --single-version-externally-managed --compile --install-headers /var/lib/syncserver_1.9_doesntWork/local/include/site/python2.7/mysqlclient
cwd: /tmp/pip-install-fxEZaW/mysqlclient/
Complete output (40 lines):
sh: 1: mysql_config: not found
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/_exceptions.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/compat.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-2.7/MySQLdb
creating build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
running build_ext
building 'MySQLdb._mysql' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/MySQLdb
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wno-error -Wno-error=format-security -fPIC -Dversion_info=(1,4,6,'final',0) -D__version__=1.4.6 -I/usr/include/mariadb -I/usr/include/mariadb/mysql -I/usr/include/python2.7 -c MySQLdb/_mysql.c -o build/temp.linux-x86_64-2.7/MySQLdb/_mysql.o
MySQLdb/_mysql.c: In function ‘_mysql_field_to_python’:
MySQLdb/_mysql.c:1145:33: warning: passing argument 1 of ‘PyInt_FromString’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
return PyInt_FromString(rowitem, NULL, 10);
^~~~~~~
In file included from /usr/include/python2.7/Python.h:89:0,
from MySQLdb/_mysql.c:38:
/usr/include/python2.7/intobject.h:37:24: note: expected ‘char *’ but argument is of type ‘const char *’
PyAPI_FUNC(PyObject *) PyInt_FromString(char*, char**, int);
^~~~~~~~~~~~~~~~
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-gnDdqE/python2.7-2.7.17=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wno-error -Wno-error=format-security -fPIC build/temp.linux-x86_64-2.7/MySQLdb/_mysql.o -L/usr/lib/x86_64-linux-gnu/ -lmariadb -lz -ldl -lm -lpthread -lssl -lcrypto -o build/lib.linux-x86_64-2.7/MySQLdb/_mysql.so
/usr/bin/ld: -lz kann nicht gefunden werden
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /var/lib/syncserver_1.9_doesntWork/local/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fxEZaW/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fxEZaW/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-5zpyWX/install-record.txt --single-version-externally-managed --compile --install-headers /var/lib/syncserver_1.9_doesntWork/local/include/site/python2.7/mysqlclient Check the logs for full command output.
Makefile:27: recipe for target 'local/COMPLETE' failed
make: *** [local/COMPLETE] Error 1
For this a workaround was to just do a
ln -s mariadb_config mysql_config
in /usr/bin.
Just another info: release 1.8.0 was building ok.
@foobar26:
And another issue I forgot: initially the build failed because the mysql_config application was missing: ... For this a workaround was to just do a
ln -s mariadb_config mysql_config
in /usr/bin.
I tried the same as also on my machine, the build fails (see #284).
But the link is a "dead" link as "mariadb_config" doesn't exist.
Is this available in your installation and with which installation package is it installed (haven't found it with apt search mariadb_config
)?
@KanteTaete You can use apt-file search mariadb_config
to find out which package provides the file. In my case (Ubuntu 18) it is libmariadb-dev.
Hi, I tried to compile the latest release (1.9.1) on most recent Ubuntu 18.04.3 LTS with MariaDB (1:10.1.47-0ubuntu0.18.04.1) with libmariadb-dev (3.0.3-1build1), and compilation fails:
I already fiddled around with the mysql.h, but couldn't find a working solution. Is there anything I can do to prevent the mysql package from being built or to fix this issue?
Thanks in advance, Frank