Compiling php 5.3.3 against libmariadbclient-dev 5.2.3-mariadb87 fails

Bug #674812 reported by Christian Felsing
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
Kristian Nielsen

Bug 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
/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: *** [] Fehler 1

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

MySQL from Debian Squeeze was completely removed before MariaDB installation.

Revision history for this message
Sergei Golubchik (sergii) wrote :

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: *** [] 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.

Revision history for this message
Kristian Nielsen (knielsen) wrote :

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

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).

Changed in maria:
assignee: nobody → Kristian Nielsen (knielsen)
importance: Undecided → High
milestone: none → 5.1
status: New → Fix Committed
Colin Charles (ccharles)
tags: added: packaging
Changed in maria:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers