php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12563 Imlib2 Issue
Submitted: 2001-08-04 00:17 UTC Modified: 2001-08-06 06:09 UTC
From: greg at destiney dot com Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.0.6 OS: RedHat 7.1 / 2.4.7 Kernel
Private report: No CVE-ID: None
 [2001-08-04 00:17 UTC] greg at destiney dot com
make fails while trying to add Imlib2 support.

./configure --with-xml --with-apxs=/usr/sbin/apxs --with-mysql=/usr --with-pgsql --with-imlib

I can see the configure script finds my new Imlib2 install:

<snip>
checking for imlib2 support... yes
checking for imlib_load_image in -lImlib2... yes
</snip>

anyway, here's the error:

Making all in .
make[1]: Entering directory `/usr/src/php-4.0.6'
/bin/sh /usr/src/php-4.0.6/libtool --silent --mode=link gcc  -I.
-I/usr/src/php-4.0.6/ -I/usr/src/php-4.0.6/main -I/usr/src/php-4.0.6
-I/usr/include/apache -I/usr/src/php-4.0.6/Zend -I/usr/include/mysql
-I/usr/src/php-4.0.6/ext/xml/expat/xmltok
-I/usr/src/php-4.0.6/ext/xml/expat/xmlparse -I/usr/src/php-4.0.6/TSRM
-DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -DSUPPORT_UTF8 -DXML_BYTE_ORDER=12 -g
-O2   -o libphp4.la -rpath /usr/src/php-4.0.6/libs -avoid-version
-L/usr/local/pgsql/lib  -R /usr/local/pgsql/lib stub.lo  Zend/libZend.la
sapi/apache/libsapi.la main/libmain.la regex/libregex.la
ext/imlib/libimlib.la ext/mysql/libmysql.la ext/pcre/libpcre.la
ext/pgsql/libpgsql.la ext/posix/libposix.la ext/session/libsession.la
ext/standard/libstandard.la ext/xml/libxml.la TSRM/libtsrm.la -lpam -ldl
-lpq -lmysqlclient -l -lcrypt -lresolv -lm -ldl -lnsl -lresolv
/usr/bin/ld: cannot find -l--library=crypt
collect2: ld returned 1 exit status
make[1]: *** [libphp4.la] Error 1
make[1]: Leaving directory `/usr/src/php-4.0.6'
make: *** [all-recursive] Error 1

I also tried adding a couple of paths to the --with-imlib switch, /usr/local/lib and /usr/local/include.  Both variations produced the same error as above.

I am trying to "add" imlib support.  This is an upgrade on the same version of PHP I'm already running, 4.06.  I experienced no missing crypt libraries on the previous install.

I don't exactly understand why it's failing on this error:

/usr/bin/ld: cannot find -l--library=crypt

I don't see any kind of crypt files listed in the requirements for Imlib2: http://www.mcclanahan.cx/php_imlib/downloads.php

If I leave off the --with-imlib option I get no errors, so I know that's the part that's breaking.

When I installed Imlib2 there were no errors, and I see the files:

> locate Imlib2
/usr/local/lib/libImlib2.so.1.0.1
/usr/local/lib/libImlib2.so.1
/usr/local/lib/libImlib2.so
/usr/local/lib/libImlib2.la
/usr/local/lib/libImlib2.a
/usr/local/include/Imlib2.h

So I had a look at /etc/ld.so.conf.  I added /usr/local/lib and ran ldconfig.  This didn't help, same errors as above.

A friend pointed out this:

> -lpq -lmysqlclient -l -lcrypt -lresolv -lm -ldl -lnsl -lresolv
>                     ^
>                     |
>             Here's the problem

I have no idea how to fix it, if this is the issue...

I am using

PHP 4.0.6
Apache 1.3.20
MySQL 3.23.40
Postgresql 7.1.2
Imlib2 1.0.1
RedHat 7.1


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-08-04 00:19 UTC] sniper@php.net
Not a PHP bug. Report this to the imlib author instead.

 [2001-08-05 20:20 UTC] greg at destiney dot com
The Imlib2 guys say it's a PHP bug:

> I reported what I thought to be a PHP bug, they say it's a bug in Imlib2.
> Please have a look.

I don't see how this can be an imlib2 bug. it's a bug in php's autoconf/make
etc. setup - probably related to how they do imlib2 detection and li checking.

they should use imlib2-config

[- 10:07AM ~ -]imlib2-config --version
1.0.4
[- 10:07AM ~ -]imlib2-config --cflags 
-I/usr/local/include -I/usr/X11R6/include
[- 10:07AM ~ -]imlib2-config --libs  
-L/usr/local/lib -lImlib2 -lttf -lm -ldl -lXext -lXext -lX11 -L/usr/X11R6/lib
[- 10:07AM ~ -]imlib2-config --prefix
/usr/local
[- 10:07AM ~ -]imlib2-config --help
Usage: imlib2-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs]
[--cflags]

to figure out cflags and link flags.

this is likely a type.missing character or missing logic statement in their
build procedure. it's not an imlib2 bug - unless your imlib2-config is spewing
out empty results for --libs or --cflags... which it shoudln't.

 [2001-08-06 03:52 UTC] wez@php.net
imlib2 uses AC_ADD_LIBRARY and friends instead of PHP_ADD_LIBRARY and friends in it's config.m4; it is broken
against CVS, but can be fixed easily.

--Wez.
 [2001-08-06 06:09 UTC] sniper@php.net
This indeed was the reason why it didn't work.
The backwards compatibily fix for this AC_* -> PHP_*
conversion didn't really fix it.

It is now fixed in CVS. Quick fix for imlib: change
the AC_ADD_ to PHP_ADD_ in imlib/config.m4 and rerun buildconf.

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 11:01:31 2024 UTC