Mysql-python fails to build on Centos

Bug #1526129 reported by Martin André
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla
Fix Released
High
Martin André

Bug Description

2015-12-14 22:17:51.074 | DEBUG:kolla.cmd.build:kolla-ansible: Running setup.py install for MySQL-python
2015-12-14 22:17:51.074 | DEBUG:kolla.cmd.build:kolla-ansible: Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-esaDUv/MySQL-python/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-O35Yg1-record/install-record.txt --single-version-externally-managed --compile:
2015-12-14 22:17:51.074 | DEBUG:kolla.cmd.build:kolla-ansible: running install
2015-12-14 22:17:51.074 | DEBUG:kolla.cmd.build:kolla-ansible: running build
2015-12-14 22:17:51.074 | DEBUG:kolla.cmd.build:kolla-ansible: running build_py
2015-12-14 22:17:51.074 | DEBUG:kolla.cmd.build:kolla-ansible: creating build
2015-12-14 22:17:51.074 | DEBUG:kolla.cmd.build:kolla-ansible: creating build/lib.linux-x86_64-2.7
2015-12-14 22:17:51.074 | DEBUG:kolla.cmd.build:kolla-ansible: copying _mysql_exceptions.py -> build/lib.linux-x86_64-2.7
2015-12-14 22:17:51.074 | DEBUG:kolla.cmd.build:kolla-ansible: creating build/lib.linux-x86_64-2.7/MySQLdb
2015-12-14 22:17:51.075 | DEBUG:kolla.cmd.build:kolla-ansible: copying MySQLdb/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb
2015-12-14 22:17:51.075 | DEBUG:kolla.cmd.build:kolla-ansible: copying MySQLdb/converters.py -> build/lib.linux-x86_64-2.7/MySQLdb
2015-12-14 22:17:51.075 | DEBUG:kolla.cmd.build:kolla-ansible: copying MySQLdb/connections.py -> build/lib.linux-x86_64-2.7/MySQLdb
2015-12-14 22:17:51.075 | DEBUG:kolla.cmd.build:kolla-ansible: copying MySQLdb/cursors.py -> build/lib.linux-x86_64-2.7/MySQLdb
2015-12-14 22:17:51.075 | DEBUG:kolla.cmd.build:kolla-ansible: copying MySQLdb/release.py -> build/lib.linux-x86_64-2.7/MySQLdb
2015-12-14 22:17:51.075 | DEBUG:kolla.cmd.build:kolla-ansible: copying MySQLdb/times.py -> build/lib.linux-x86_64-2.7/MySQLdb
2015-12-14 22:17:51.075 | DEBUG:kolla.cmd.build:kolla-ansible: creating build/lib.linux-x86_64-2.7/MySQLdb/constants
2015-12-14 22:17:51.075 | DEBUG:kolla.cmd.build:kolla-ansible: copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
2015-12-14 22:17:51.075 | DEBUG:kolla.cmd.build:kolla-ansible: copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
2015-12-14 22:17:51.076 | DEBUG:kolla.cmd.build:kolla-ansible: copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
2015-12-14 22:17:51.076 | DEBUG:kolla.cmd.build:kolla-ansible: copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
2015-12-14 22:17:51.076 | DEBUG:kolla.cmd.build:kolla-ansible: copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
2015-12-14 22:17:51.076 | DEBUG:kolla.cmd.build:kolla-ansible: copying MySQLdb/constants/REFRESH.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
2015-12-14 22:17:51.076 | DEBUG:kolla.cmd.build:kolla-ansible: copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
2015-12-14 22:17:51.076 | DEBUG:kolla.cmd.build:kolla-ansible: running build_ext
2015-12-14 22:17:51.076 | DEBUG:kolla.cmd.build:kolla-ansible: building '_mysql' extension
2015-12-14 22:17:51.076 | DEBUG:kolla.cmd.build:kolla-ansible: creating build/temp.linux-x86_64-2.7
2015-12-14 22:17:51.076 | DEBUG:kolla.cmd.build:kolla-ansible: gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/include/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o -g -m64 -fPIC -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing
2015-12-14 22:17:51.077 | DEBUG:kolla.cmd.build:kolla-ansible: In file included from _mysql.c:44:0:
2015-12-14 22:17:51.077 | DEBUG:kolla.cmd.build:kolla-ansible: /usr/include/mysql/my_config.h:448:0: warning: "HAVE_WCSCOLL" redefined [enabled by default]
2015-12-14 22:17:51.077 | DEBUG:kolla.cmd.build:kolla-ansible: #define HAVE_WCSCOLL
2015-12-14 22:17:51.077 | DEBUG:kolla.cmd.build:kolla-ansible: ^
2015-12-14 22:17:51.077 | DEBUG:kolla.cmd.build:kolla-ansible: In file included from /usr/include/python2.7/pyconfig.h:6:0,
2015-12-14 22:17:51.077 | DEBUG:kolla.cmd.build:kolla-ansible: from /usr/include/python2.7/Python.h:8,
2015-12-14 22:17:51.077 | DEBUG:kolla.cmd.build:kolla-ansible: from _mysql.c:29:
2015-12-14 22:17:51.077 | DEBUG:kolla.cmd.build:kolla-ansible: /usr/include/python2.7/pyconfig-64.h:908:0: note: this is the location of the previous definition
2015-12-14 22:17:51.077 | DEBUG:kolla.cmd.build:kolla-ansible: #define HAVE_WCSCOLL 1
2015-12-14 22:17:51.077 | DEBUG:kolla.cmd.build:kolla-ansible: ^
2015-12-14 22:17:51.077 | DEBUG:kolla.cmd.build:kolla-ansible: gcc -pthread -shared -Wl,-z,relro build/temp.linux-x86_64-2.7/_mysql.o -L/usr/lib64 -L/usr/lib64 -lmysqlclient -lpthread -lm -lrt -lssl -lcrypto -ldl -lpython2.7 -o build/lib.linux-x86_64-2.7/_mysql.so
2015-12-14 22:17:51.078 | DEBUG:kolla.cmd.build:kolla-ansible: /usr/bin/ld: cannot find -lmysqlclient
2015-12-14 22:17:51.078 | DEBUG:kolla.cmd.build:kolla-ansible: collect2: error: ld returned 1 exit status
2015-12-14 22:17:51.078 | DEBUG:kolla.cmd.build:kolla-ansible: error: command 'gcc' failed with exit status 1
2015-12-14 22:17:51.078 | DEBUG:kolla.cmd.build:kolla-ansible:
2015-12-14 22:17:51.078 | DEBUG:kolla.cmd.build:kolla-ansible: ----------------------------------------
2015-12-14 22:17:51.078 | DEBUG:kolla.cmd.build:kolla-ansible:Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-esaDUv/MySQL-python/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-O35Yg1-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-esaDUv/MySQL-python
2015-12-14 22:17:51.078 | DEBUG:kolla.cmd.build:kolla-ansible:Removing intermediate container c2dbfc8513ee

http://logs.openstack.org/67/257567/2/check/gate-kolla-dsvm-deploy-centos-binary/2f90909/console.html#_2015-12-14_22_17_51_078

Revision history for this message
Martin André (mandre) wrote :

Most likely a packaging issue of Percona-Server-devel-56-5.6.27-rel76.0.el7.x86_64 released yesterday.
It provides /usr/lib64/libmysqlclient.so but it's a broken link to non-existing libmysqlclient.so.18

MariaDB-shared from mariadb repo provides the missing file.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla (master)

Fix proposed to branch: master
Review: https://review.openstack.org/257661

Changed in kolla:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla (master)

Reviewed: https://review.openstack.org/257661
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=b5878b2449028d1078c0ffca3ca7c114fff41e40
Submitter: Jenkins
Branch: master

commit b5878b2449028d1078c0ffca3ca7c114fff41e40
Author: Martin André <email address hidden>
Date: Tue Dec 15 12:05:20 2015 +0900

    Fix MySQL-python build on Centos

    The build of MySQL-python started to fail after the update to
    Percona-Server-devel-56-5.6.27-rel76.0.el7.x86_64 with:

      /usr/bin/ld: cannot find -lmysqlclient

    It appears Percona-Server-devel package provides a broken
    /usr/lib64/libmysqlclient.so that points to nonexistent
    libmysqlclient.so.18.

    Fix the build by installing MariaDB-shared package from the mariadb
    repo that contains the missing file.

    Change-Id: Ia95fddfe44f54bd355c6f3d0ac895fdc05cecff9
    Closes-Bug: #1526129

Changed in kolla:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to kolla (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/263648

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to kolla (master)

Reviewed: https://review.openstack.org/263648
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=92f4e5a04fed74bf5aed607a3d21dd912469c267
Submitter: Jenkins
Branch: master

commit 92f4e5a04fed74bf5aed607a3d21dd912469c267
Author: Martin André <email address hidden>
Date: Tue Jan 5 09:15:02 2016 +0900

    Remove MariaDB-shared in openstack-base

    After we switched to PyMySQL in openstack-base, there is no need to
    compile MySQL-python thus to install MariaDB-shared package as
    a workaround for busted percona packages.

    TrivialFix
    Related-Bug: #1526129

    Change-Id: I93b4bee9d42427b493dac3a0039e0b1a9cac9f71

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/264008
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=edf0468c620b8a05e87d733171be9c84bfdb6c09
Submitter: Jenkins
Branch: master

commit edf0468c620b8a05e87d733171be9c84bfdb6c09
Author: Martin André <email address hidden>
Date: Wed Jan 6 12:34:11 2016 +0900

    Fix centos-source trove image building

    It appears Trove still depends on MySQL-python.
    Restore the workaround for broken Percona repo.

    Closes-Bug: #1531371
    Related-Bug: #1526129
    Change-Id: I1781fee14e17a6b7cbb2cf8dae639e049698b9e6

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.