Bug #65016 [Asn->Opn]: configure can not find libxpm

From: Date: Tue, 24 Oct 2017 06:29:12 +0000
Subject: Bug #65016 [Asn->Opn]: configure can not find libxpm
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-212003@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 Updated by: kalle@php.net Reported by: gunter at grodotzki dot co dot za Summary: configure can not find libxpm -Status: Assigned +Status: Open Type: Bug Package: Compile Failure Operating System: Debian Wheezy PHP Version: 5.4.16 -Assigned To: ondrej +Assigned To: Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2014-07-16 22:03:05] tcotav at gmail dot com 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/ ------------------------------------------------------------------------ [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? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=65016 -- Edit this bug report at https://bugs.php.net/bug.php?id=65016&edit=1

« previous php.bugs (#212003) next »