Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-3181

LP:674812 - Compiling php 5.3.3 against libmariadbclient-dev 5.2.3-mariadb87 fails

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      related package:

      ii libmariadbclient-dev 5.2.3-mariadb87 MariaDB database development files

      PHP 5.3.3 build configuration:

      ./configure --prefix=/opt/php \
      --with-apxs2=/opt/apache/bin/apxs \
      --enable-exif \
      --enable-safe-mode \
      --enable-magic-quotes \
      --enable-wddx \
      --enable-ftp \
      --with-zlib \
      --with-mysql=/usr \
      --with-mysql-sock=/var/tmp/mysqld.sock \
      --with-mysqli=/usr/bin/mysql_config \
      --with-openssl=/usr \
      --with-tsrm-pthreads \
      --with-jpeg-dir=/usr/include \
      --with-png-dir="/usr" \
      --with-png-dir=/usr/include \
      --with-xpm-dir="/usr" \
      --enable-mbstring=all \
      --with-ldap \
      --with-ldap-sasl \
      --with-gettext \
      --with-gd \
      --with-freetype-dir \
      --with-ttf \
      --enable-gd-native-ttf \
      --with-mhash \
      --with-mcrypt \
      --with-imap \
      --with-mime-magic \
      --enable-sysvshm \
      --with-kerberos \
      --with-imap-ssl \
      --with-iconv \
      --enable-mbregex \
      --enable-soap \
      --with-tidy \
      --with-curl \

      Platform is Debian Squeeze

      After make following appears:

      /bin/sh /usr/src/php-5.3.3/libtool --silent --preserve-dup-deps --mode=compile gcc -Iext/standard/ -I/usr/src/php-5.3.3/ext/standard/ -DPHP_ATOM_INC -I/usr/src/php-5.3.3/include -I/usr/src/php-5.3.3/main -I/usr/src/php-5.3.3 -I/usr/src/php-5.3.3/ext/date/lib -I/usr/src/php-5.3.3/ext/ereg/regex -I/usr/include/libxml2
      ...
      lxml2 -lxml2 -lcrypt -lxml2 -lxml2 -lxml2 -lxml2 -lcrypt -o libphp5.la
      /usr/bin/ld.bfd.real: /usr/lib/mysql/libz.a(compress.o): relocation R_X86_64_PC32 against symbol `compress2' can not be used when making a shared object; recompile with -fPIC
      /usr/bin/ld.bfd.real: final link failed: Bad value
      collect2: ld returned 1 exit status
      make: *** [libphp5.la] Fehler 1

      Problem does not occure with libmariadbclient-dev from Debian Squeeze.

      MySQL from Debian Squeeze was completely removed before MariaDB installation.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            serg Sergei Golubchik added a comment -

            Re: Compiling php 5.3.3 against libmariadbclient-dev 5.2.3-mariadb87 fails
            could you post the complete command line and the output - starting from /bin/sh /usr/src/php-5.3.3/libtool and and to the make: *** [libphp5.la] Fehler 1 ?

            I'd like to see why it tries to link with /usr/lib/mysql/libz.a.
            Probably the existence of /usr/lib/mysql/libz.a is the reason of the bug.

            Show
            serg Sergei Golubchik added a comment - Re: Compiling php 5.3.3 against libmariadbclient-dev 5.2.3-mariadb87 fails could you post the complete command line and the output - starting from /bin/sh /usr/src/php-5.3.3/libtool and and to the make: *** [libphp5.la] Fehler 1 ? I'd like to see why it tries to link with /usr/lib/mysql/libz.a. Probably the existence of /usr/lib/mysql/libz.a is the reason of the bug.
            Hide
            knielsen Kristian Nielsen added a comment -

            Re: Compiling php 5.3.3 against libmariadbclient-dev 5.2.3-mariadb87 fails
            It seems the direct problem here is that the build links /usr/lib/mysql/libz.a. It should use zlib from /usr/lib (and install package zlib1g-dev), which has libz.so.

            This problem should be fixed by fix of bug 509535, after which /usr/lib/mysql/libz.a is gone. Should be available from MariaDB 5.1.52 and 5.2.4.

            A work-around should be to ensure /usr/lib is before /usr/lib/mysql in -L search path (or simply remove /usr/lib/mysql/libz.a, though dpkg might not like that).

            Show
            knielsen Kristian Nielsen added a comment - Re: Compiling php 5.3.3 against libmariadbclient-dev 5.2.3-mariadb87 fails It seems the direct problem here is that the build links /usr/lib/mysql/libz.a. It should use zlib from /usr/lib (and install package zlib1g-dev), which has libz.so. This problem should be fixed by fix of bug 509535, after which /usr/lib/mysql/libz.a is gone. Should be available from MariaDB 5.1.52 and 5.2.4. A work-around should be to ensure /usr/lib is before /usr/lib/mysql in -L search path (or simply remove /usr/lib/mysql/libz.a, though dpkg might not like that).
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 674812

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 674812

              People

              • Assignee:
                knielsen Kristian Nielsen
                Reporter:
                christianfelsing Christian Felsing
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: