Percona Server with XtraDB

INSTALL_LIBDIR_RPM error in install_layout.cmake

Reported by Tim College on 2013-04-29
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Percona Server
Status tracked in 5.6
5.1
Undecided
Ignacio Nin
5.5
High
Ignacio Nin
5.6
High
Ignacio Nin

Bug Description

In the file /cmake/install_layout.cmake, there is the following code:

IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
  SET(INSTALL_LIBDIR_RPM "lib")
  SET(INSTALL_PLUGINDIR_RPM "lib/mysql/plugin")
ELSE()
  SET(INSTALL_LIBDIR_RPM "lib")
  SET(INSTALL_PLUGINDIR_RPM "lib/mysql/plugin")
ENDIF()

which should probably be:

IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
  SET(INSTALL_LIBDIR_RPM "lib64")
  SET(INSTALL_PLUGINDIR_RPM "lib64/mysql/plugin")
ELSE()
  SET(INSTALL_LIBDIR_RPM "lib")
  SET(INSTALL_PLUGINDIR_RPM "lib/mysql/plugin")
ENDIF()

Oddly, looking in Launchpad (http://bazaar.launchpad.net/~percona-core/percona-server/5.6/view/head:/Percona-Server/cmake/install_layout.cmake), this is fixed, but perhaps not released? I downloaded the source for 5.5.30-1, 5.5.30-2, and 5.6.10-alpha60.2, all three have the bug.

Thanks
Tim

Tags: pkg Edit Tag help
Tim College (tcollege) wrote :
Alexey Kopytov (akopytov) wrote :

It is "lib64" in the source code branch, but we seem to be patching it to "lib" in build-rpm.sh:

    # "Fix" cmake destdirs, since we cannot alter SYSTEM_PROCESSOR
    if test "x$TARGET" != "x"
    then
        sed -i 's/lib64/lib/' "$PRODUCT/cmake/install_layout.cmake"
    fi

I don't understand why we need that, perhaps it should be removed. Can you elaborate on what problems are introduced with that change?

Changed in percona-server:
status: New → Incomplete
Tim College (tcollege) wrote :
Download full text (3.9 KiB)

That explains why it did't look right in Launchpad!

What happens is that when you build in an x86_64 environment, some files are put in lib and lib/mysql/plugin, instead of lib64 and lib64/mysql/plugin. The %files section then fails, because it's looking for the lib64 location, using the %{_libdir} variable.

You end up with this output:

Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/iworx-db-55-5.5.30-build
RPM build errors:
    File not found: /var/tmp/iworx-db-55-5.5.30-build/home/interworx/mysql/usr/lib64/mysql/plugin/daemon_example.ini
    File not found: /var/tmp/iworx-db-55-5.5.30-build/home/interworx/mysql/usr/lib64/mysql/plugin/adt_null.so
    File not found: /var/tmp/iworx-db-55-5.5.30-build/home/interworx/mysql/usr/lib64/mysql/plugin/libdaemon_example.so
    File not found: /var/tmp/iworx-db-55-5.5.30-build/home/interworx/mysql/usr/lib64/mysql/plugin/mypluglib.so
    File not found: /var/tmp/iworx-db-55-5.5.30-build/home/interworx/mysql/usr/lib64/mysql/plugin/semisync_master.so
    File not found: /var/tmp/iworx-db-55-5.5.30-build/home/interworx/mysql/usr/lib64/mysql/plugin/semisync_slave.so
    File not found: /var/tmp/iworx-db-55-5.5.30-build/home/interworx/mysql/usr/lib64/mysql/plugin/auth.so
    File not found: /var/tmp/iworx-db-55-5.5.30-build/home/interworx/mysql/usr/lib64/mysql/plugin/auth_socket.so
    File not found: /var/tmp/iworx-db-55-5.5.30-build/home/interworx/mysql/usr/lib64/mysql/plugin/auth_test_plugin.so
    File not found: /var/tmp/iworx-db-55-5.5.30-build/home/interworx/mysql/usr/lib64/mysql/plugin/qa_auth_client.so
    File not found: /var/tmp/iworx-db-55-5.5.30-build/home/interworx/mysql/usr/lib64/mysql/plugin/qa_auth_interface.so
    File not found: /var/tmp/iworx-db-55-5.5.30-build/home/interworx/mysql/usr/lib64/mysql/plugin/qa_auth_server.so
    File not found: /var/tmp/iworx-db-55-5.5.30-build/home/interworx/mysql/usr/lib64/mysql/plugin/auth_pam.so
    File not found: /var/tmp/iworx-db-55-5.5.30-build/home/interworx/mysql/usr/lib64/mysql/plugin/auth_pam_compat.so
    File not found: /var/tmp/iworx-db-55-5.5.30-build/home/interworx/mysql/usr/lib64/mysql/plugin/dialog.so
    File not found: /var/tmp/iworx-db-55-5.5.30-build/home/interworx/mysql/usr/lib64/mysql/plugin/debug/adt_null.so
    File not found: /var/tmp/iworx-db-55-5.5.30-build/home/interworx/mysql/usr/lib64/mysql/plugin/debug/libdaemon_example.so
    File not found: /var/tmp/iworx-db-55-5.5.30-build/home/interworx/mysql/usr/lib64/mysql/plugin/debug/mypluglib.so
    File not found: /var/tmp/iworx-db-55-5.5.30-build/home/interworx/mysql/usr/lib64/mysql/plugin/debug/semisync_master.so
    File not found: /var/tmp/iworx-db-55-5.5.30-build/home/interworx/mysql/usr/lib64/mysql/plugin/debug/semisync_slave.so
    File not found: /var/tmp/iworx-db-55-5.5.30-build/home/interworx/mysql/usr/lib64/mysql/plugin/debug/auth.so
    File not found: /var/tmp/iworx-db-55-5.5.30-build/home/interworx/mysql/usr/lib64/mysql/plugin/debug/auth_socket.so
    File not found: /var/tmp/iworx-db-55-5.5.30-build/home/interworx/mysql/usr/lib64/mysql/plugin/debug/auth_test_plugin.so
    File not found: /var/tmp/iworx-db-55-5.5.30-build/home/interworx/mysql/u...

Read more...

Alexey Kopytov (akopytov) wrote :

Thanks, Tim.

tags: added: pkg
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers