Bug #65016 [Com]: configure can not find libxpm
| From: | tcotav at gmail dot com | Date: | Wed, 16 Jul 2014 22:03:07 +0000 |
| Subject: | Bug #65016 [Com]: configure can not find libxpm | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-186677@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65016&edit=1
ID: 65016
Comment by: tcotav at gmail dot com
Reported by: gunter at grodotzki dot co dot za
Summary: configure can not find libxpm
Status: Assigned
Type: Bug
Package: Compile Failure
Operating System: Debian Wheezy
PHP Version: 5.4.16
Assigned To: ondrej
Block user comment: N
Private report: N
New Comment:
Ran into this today. Running a strace on ./configure, you'll see that configure is looking for
libxpm in:
stat("/usr/lib/x86_64-linux-gnu/lib64/libXpm.so", 0x7fff2fb9bcc0) = -1 ENOENT (No such
file or directory)
stat("/usr/lib/x86_64-linux-gnu/lib64/libXpm.a", 0x7fff2fb9bcc0) = -1 ENOENT (No such file
or directory)
stat("/usr/local/lib64/libXpm.so", 0x7fff2fb9bcc0) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib64/libXpm.a", 0x7fff2fb9bcc0) = -1 ENOENT (No such file or directory)
stat("/usr/X11R6/lib64/libXpm.so", 0x7fff2fb9bcc0) = -1 ENOENT (No such file or directory)
stat("/usr/X11R6/lib64/libXpm.a", 0x7fff2fb9bcc0) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/libXpm.so", 0x7fff2fb9bcc0) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/libXpm.a", 0x7fff2fb9bcc0) = -1 ENOENT (No such file or directory)
but apt installs it into: /usr/lib/x86_64-linux-gnu/
workaround:
mkdir -p /usr/lib/x86_64-linux-gnu/lib64/
sudo ln -s /usr/lib/x86_64-linux-gnu/libXpm.so /usr/lib/x86_64-linux-gnu/lib64/
Previous Comments:
------------------------------------------------------------------------
[2013-06-18 14:31:01] googleguy@php.net
In my experience --with-libdir=/usr/lib/x86_64-linux-gnu has never solved this
problem for me on Debian based systems like Ubuntu.
I usually just end up creating a symlink to /usr/lib/libXpm.so from
/usr/lib/x86_64-linux-gnu/libXpm.so where PHP was expecting to find it and
normally it works out.
------------------------------------------------------------------------
[2013-06-13 04:13:17] rasmus@php.net
Doesn't --with-libdir=/usr/lib/x86_64-linux-gnu fix this?
------------------------------------------------------------------------
[2013-06-12 06:43:35] ondrej@php.net
That's quite easy to answer. Debian wheezy switched to Multi-Arch which puts
the libraries into /usr/lib/<triplet>/ location. E.g. libXpm.so now resides in:
$ ldconfig -p | grep Xpm
libXpm.so.4 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libXpm.so.4
libXpm.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libXpm.so
and ld.so is able to find it:
$ cat /etc/ld.so.conf.d/x86_64-linux-gnu.conf
# Multiarch support
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
That's why we carry patches such as:
http://anonscm.debian.org/gitweb/?p=pkg-
php/php.git;a=blob;f=debian/patches/temporary-path-fixes-for-
multiarch.patch;h=dcca64de3cb6cb3398fa70b5ed878685f66a7acf;hb=refs/heads/master-
wheezy
in our Debian package.
The problem with PHP autoconf script is that it expects to find the library at
specific place (f.e. /usr/lib) and it should just try linking the library
instead (e.g. AC_SEARCH_LIBS). The "test -f" sort of mimick the ldconfig to
"know" where the library should be.
Unfortunatelly it cannot be solved by simple --with-library=/usr/lib/<tripplet>,
because that would usually break the header files location.
I think that correct way to fix this in vanilla PHP would be to switch to
AC_SEARCH_LIBS when looking for the library.
I might prepare the patch, but I am quite afraid that it's post-5.5 material,
because that might break on oh-so-many places.
O.
------------------------------------------------------------------------
[2013-06-12 05:58:55] pajoye@php.net
I don't have a weezy to test, Ondrej, can you take a look pls?
------------------------------------------------------------------------
[2013-06-12 05:57:11] gunter at grodotzki dot co dot za
Description:
------------
What used to work perfectly in Debian Squeeze does not work anymore in Debian
Wheezy.
# dpkg -L libxpm-dev
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/libxpm-dev
/usr/share/doc/libxpm-dev/copyright
/usr/share/doc/libxpm-dev/xpm.PS.gz
/usr/share/doc/libxpm-dev/changelog.Debian.gz
/usr/share/doc/libxpm-dev/changelog.gz
/usr/include
/usr/include/X11
/usr/include/X11/xpm.h
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/pkgconfig
/usr/lib/x86_64-linux-gnu/pkgconfig/xpm.pc
/usr/lib/x86_64-linux-gnu/libXpm.a
/usr/lib/x86_64-linux-gnu/libXpm.so
# ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --disable-cgi
--with-config-file-path=/etc/php5/cli --with-libxml-dir --with-openssl --with-
kerberos --with-pcre-regex --with-zlib --with-bz2 --enable-calendar --with-curl
--enable-exif --enable-ftp --with-gd --with-vpx-dir --with-jpeg-dir --with-png-
dir --with-xpm-dir --with-freetype-dir --enable-gd-native-ttf --enable-gd-jis-
conv --with-gettext --with-imap --with-kerberos --with-imap-ssl --enable-intl --
enable-bcmath --with-icu-dir=/usr --enable-mbstring --with-mcrypt --with-mysql -
-with-mysqli --with-pdo-mysql --enable-shmop --enable-soap --enable-sockets --
with-xmlrpc --with-xsl --enable-zip --with-iconv-dir --with-pear --with-tidy --
enable-pcntl
Last lines of configure:
checking for GD support... yes
checking for the location of libvpx... yes
checking for the location of libjpeg... yes
checking for the location of libpng... yes
checking for the location of libXpm... yes
checking for FreeType 2... yes
checking for T1lib support... no
checking whether to enable truetype string function in GD... yes
checking whether to enable JIS-mapped Japanese font support in GD... yes
checking for fabsf... yes
checking for floorf... yes
checking for jpeg_read_header in -ljpeg... yes
checking for vpx_codec_destroy in -lvpx... yes
checking for png_write_image in -lpng... yes
configure: error: libXpm.(a|so) not found.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65016&edit=1