Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed building wheel for mysqlclient with Debian Stretch #220

Open
stefaweb opened this issue Jun 24, 2018 · 3 comments
Open

Failed building wheel for mysqlclient with Debian Stretch #220

stefaweb opened this issue Jun 24, 2018 · 3 comments

Comments

@stefaweb
Copy link
Contributor

Impacted versions

Last git version from May 22, 2018

  • Distribution: Debian
  • Codename: Stretch
  • Arch: 64 Bits
  • Database: MariaDB 10.1 (engine = mysql in installer.cfg)

Steps to reproduce

sudo ./run.py domain.tld —debug

Same with "pip install mysqlclient"

Full trace using --debug option or current behaviour


Failed building wheel for mysqlclient
Running setup.py clean for mysqlclient
Successfully built future sqlalchemy configparser
Failed to build mysqlclient
Installing collected packages: future, lxml, ipaddress, sqlalchemy, six, python-memcached, python-dateutil, configparser, mysqlclient
Running setup.py install for mysqlclient ... error
Complete output from command /srv/automx/env/bin/python2 -u -c "import setuptools, tokenize;file='/tmp/pip-install-L5OiK4/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-OdjkKA/install-record.txt --single-version-externally-managed --compile --install-headers /srv/automx/env/include/site/python2.7/mysqlclient:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying mysql_exceptions.py -> 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/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
copying MySQLdb/constants/REFRESH.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
running build_ext
building 'mysql' extension
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Dversion_info=(1,3,12,'final',0) -D__version
=1.3.12 -I/usr/include/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -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-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/_mysql.o -lmysqlclient -lpthread -lz -lm -ldl -lssl -lcrypto -o build/lib.linux-x86_64-2.7/_mysql.so
/usr/bin/ld : ne peut trouver -lssl
/usr/bin/ld : ne peut trouver -lcrypto
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------
@stefaweb
Copy link
Contributor Author

Hello!

More on this.

With Debian 9 Stretch (fresh install), modoboa installer need to install theses packages before building Python mysqldb:

For mysql : python-mysqldb libmysqlclient-dev libssl-dev
For MariaDB : python-mysqldb libmariadbclient-dev libssl-dev

@stefaweb
Copy link
Contributor Author

More on this.

For mariaDB, its not libmariadbclient-dev but libmariadb-dev.

@titulebolide
Copy link

titulebolide commented Aug 14, 2019

@stefaweb I owe you a thank, because you solved my problem from almost two years in the past. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants