Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 27525 - mod_php-4.3.3 fails on check for libjpeg
Summary: mod_php-4.3.3 fails on check for libjpeg
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: PHP Bugs
: 28848 32464 (view as bug list)
Depends on:
Reported: 2003-08-29 05:12 UTC by Martin Ehmsen (RETIRED)
Modified: 2004-02-11 09:13 UTC (History)
12 users (show)

See Also:
Package list:
Runtime testing required: ---

/var/tmp/portage/mod_php-4.3.3/work/php-4.3.3/config.log (config.log,53.94 KB, text/plain)
2003-08-30 02:25 UTC, Martin Ehmsen (RETIRED)
/var/tmp/portage/mod_php-4.3.4/work/php-4.3.4/config.log (config.log,65.64 KB, text/plain)
2003-11-14 08:20 UTC, Douglas Russell (RETIRED)
/var/tmp/portage/mod_php-4.3.4-r1/work/php-4.3.4-r1/config.log (config.log,65.69 KB, text/plain)
2003-11-26 02:02 UTC, Douglas Russell (RETIRED)

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Ehmsen (RETIRED) gentoo-dev 2003-08-29 05:12:21 UTC
In the configure script for mod_php-4.3.3 I get the following error in the
"Configuring extensions" section:
checking for Oracle-ORACLE support... no
checking whether to enable user-space object overloading support... yes
checking for Ovrimos SQL Server support... no
checking whether to enable pcntl support... no
checking for PCRE support... yes
checking for PDFlib support... yes
checking for the location of libtiff... /usr
checking for jpeg_read_header in -ljpeg... no
configure: error: libjpeg not found!

!!! ERROR: dev-php/mod_php-4.3.3 failed.
!!! Function econf, Line 324, Exitcode 1
!!! econf failed

I do have the media-libs/jpeg package installed, so I don't know what the
problem is.

Reproducible: Always
Steps to Reproduce:
1. emerge -u mod_php

Portage 2.0.49-r1 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 2.4.22)
System uname: 2.4.22 i686 AMD Athlon(TM) XP1900+
CFLAGS="-mcpu=athlon-xp -O3 -pipe"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config
/usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-mcpu=athlon-xp -O3 -pipe"
FEATURES="sandbox ccache autoaddcvs notitles"
USE="x86 oss 3dnow apm avi crypt cups encode foomaticdb gif jpeg libg++ mad
mikmod mmx mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv
zlib alsa gdbm berkdb slang readline tetex svga tcltk java guile X sdl gpm tcpd
pam libwww ssl perl python esd imlib oggvorbis gtk qt motif opengl mozilla cdr
doc emacs fbcon flash gtk2 maildir mbox tiff xml -arts -gnome -kde"
Comment 1 Markus Nigbur (RETIRED) gentoo-dev 2003-08-29 05:43:43 UTC
try reemerging media-libs/jpeg and media-libs/jpeg-mmx
Comment 2 Martin Ehmsen (RETIRED) gentoo-dev 2003-08-29 06:06:31 UTC
dosen't change a thing... 
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-08-29 09:43:09 UTC
could you please attach /var/tmp/portage/mod_php-4.3.3/work/php-4.3.3/config.log 
Comment 4 Martin Ehmsen (RETIRED) gentoo-dev 2003-08-30 02:25:46 UTC
Created attachment 16805 [details]
Comment 5 Thorsten Becker 2003-08-30 03:28:53 UTC tracks down the problem 
Comment 6 Daniel Seyffer 2003-08-31 12:44:42 UTC
same here
Comment 7 David E.Miller 2003-08-31 20:49:26 UTC
Had the exact same emerge/compile error message. Also for emerge php, Same thing. Turned off pdflib support in /etc/make.conf (-pdflib) and both packages compiled successfully. I did not check the make file to see why this is working, but rather based it on a bug resolution earlier that had similar symptoms. I tried it an it worked, and that is all I can say.
Comment 8 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-08-31 21:07:29 UTC
I can't reproduce the problem on my 2 test boxes :-(.
Somebody with the problem, could you please try to add:
near the top of /etc/
and then run 'ldconfig'
and try the emerge again ?
Comment 9 Martin Ehmsen (RETIRED) gentoo-dev 2003-08-31 22:46:48 UTC
Adding /usr/lib to didn't change a thing (actually it did, it made 'ldconfig' complain about: "ldconfig: /usr/lib/ is not a symbolic link"... :-(

But the trick with -pdflib worked, mod_php-4.3.3 is now compiling... maybe someone should look into, why that trick works...
Comment 10 Daniel Seyffer 2003-09-01 02:13:01 UTC
adding /usr/lib (regardless of position) leads to ldconfig complaining about "ldconfig: /usr/lib/ is not a symbolic link" here too.

I didn't try "-pdflib" so far. (But maybe you do still need someone for debugging who still has the problem, then I'll leave it as it is for now...? *g*)
Comment 11 FieldySnuts 2003-09-01 08:05:57 UTC
I'm seeing the same problems. Anything I can do to help?
Comment 12 FieldySnuts 2003-09-01 08:48:53 UTC
It built and installed for me with -pdflib .
Comment 13 Andreas Liehr 2003-09-02 02:38:52 UTC
I had the same proplem and solved it a little bit unconventionally.

The Problem is, that the ./configure of mod_php finds the from my jdk (blackdown but i think with suns jdk is the same) first and this one doesn't match the requirements.
so i moved temporarely
/opt/blackdown-jdk-1.4.1/jre/lib/i386/ to

(with sun's jdk:
used emerge -u mod_php

and moved the file back to his old name after that. 
Comment 14 Haroon Rafique 2003-09-02 09:44:13 UTC
Robin, you mentioned in comment 8 that you couldn't reproduce the problem. Do you have a JDK installed? I have a JDK installed and encountered the reported bug exactly as mentioned in the bug report. I ended up using Andreas' solution mentioned in comment 13 (the only difference being that I have IBM's jdk and is located in a different place).
Comment 15 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-09-02 12:17:33 UTC
I have blackdown JDK installed and that is what I usually use, but I put on the same version of sun-jdk (and set java-config to use it) as the original problem report to try and reproduce it. 
Comment 16 Daniel Seyffer 2003-09-02 14:25:42 UTC
FYI: I had blackdown (only) installed on the machine on which I experienced the problem - I'd suppose which JDK probably doesn't matter... (?)
I also successfully used the "move the lib" workaround Andreas described in #13... ;-)
Comment 17 Dan A. Dickey 2003-09-05 08:08:10 UTC
I'm having this problem as well. 
In looking at the files, what is it that generates the environment 
file in /var/tmp/portage/php-4.3.3-r1/temp?  In the environment 
file, you'll find a setting of '--with-jpeg-dir=/usr'.  You'll 
also find a '--with-zlib-dir=/usr/lib' for comparison. 
I'm thinking that whatever sets the jpeg dir to /usr 
(as well as png-dir and tiff-dir) is doing so incorrectly. 
I haven't found out how to change this yet. 
Comment 18 Dan A. Dickey 2003-09-05 08:24:18 UTC
Nope.  I don't think that's it. 
I figured out how to change it, but then whatever 
is setting up the "-Wl,rpath" arguments for configure 
compiling is turning "/usr/lib" into "/usr/lib/lib". 
While when it is left as just "/usr" - it doesn't add 
a "-Wl,rpath /usr/lib", but leaves it off - and then 
the Wl,rpath's start with the blackdown stuff. 
BTW - I'm having this problem just trying to compile php. 
Haven't gotten to mod_php yet. 
Comment 19 Dan A. Dickey 2003-09-05 08:40:26 UTC
Ok, one last comment. 
I put the blame on ld. 
If ld finds a matching library name (-ljpeg ->, 
*but* that library is *stripped* - then why in the world is 
it trying to use it?  It should go onto the next possible 
candidate for matching -ljpeg, which should eventually get to 
I'm not exactly sure how to fix it short of that (hacks 
aren't fixes, and all solutions so far are hacks). 
Perhaps patch the php configure script (and mod_php) to 
prepend a "-Wl,rpath /usr/lib" if adding some directory for 
blackdown?  This *does* seem to be a problem related to blackdown. 
Comment 20 Gunnlaugur Thor Briem 2003-09-05 13:11:29 UTC
I doubt that it is related to blackdown specifically; I got this problem
and I don't have blackdown installed. I had several libjpegs, though:

/usr/lib/ ->
/usr/lib/ ->

I renamed the first three to, emerged php and mod_php
without problems, and then renamed those three back to Clearly
the php build dislikes something about the libjpeg libraries delivered with
(some versions of) JDK, but apparently that dislike is not specific to
Blackdown Linux.
Comment 21 Dan A. Dickey 2003-09-05 13:22:32 UTC
I now agree with you. 
After my last comment, I went ahead and installed sun-j2sdk 
(what an ebuild *that* was!) and just removed the blackdown-sdk. 
And, lo & behold - yup, there now is a file called 
(Stripped, of course). 
So... ok; something is funny with the php configure script. 
And I still think ld should skip stripped DSOs. 
Comment 22 Andy Dustman 2003-09-08 12:42:48 UTC
I can reproduce this problem. There are two workarounds:

1) USE="-jpeg -gd -pdflib" emerge -u php mod_php # obvious, not tested

2) USE="-java" emerge -u php mod_php # less obvious but tested
Comment 23 Alex Moreno 2003-09-10 15:05:39 UTC
Comment 24 Alex Moreno 2003-09-10 15:05:39 UTC
I´ve been having the same problem and solved with -pdflib
Comment 25 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-09-16 01:04:06 UTC
*** Bug 28848 has been marked as a duplicate of this bug. ***
Comment 26 Gertjan Zwartjes 2003-09-16 12:14:56 UTC
The problem actually IS another version of After temporarily 
removing (renaming) these's (and running ldconfig) an emerging 
mod_php, everything is OK. Maybe it has something to do with the search order 
of the library path passed to configure. If you configure it yourself, it 
Comment 27 Shaun Guth 2003-09-23 17:15:03 UTC
USE="-X" emerge mod_php 

works great and doesn't crash into this problem, whereas with +X I was having it.
Comment 28 Andy Dustman 2003-09-23 19:47:10 UTC
My builds were all with USE="-X", but then I haven't tried in a few weeks;
maybe somebody fixed the build.
Comment 29 Warwick Chapman 2003-09-30 04:33:22 UTC
Hi all

I see no resolution in sight here.  I think we have a few questions to ask:

1.  Can ld be configured to search through all the's until it
finds the right one?
2.  I added /usr/lib to my and this did not correct the problem.
 Why? Surely this is the better sort of solution?
3.  If this problem relates to mod_php ONLY, then can we change the configure
script to include --with-jpeg-dir=/usr/lib?

warwick - at -
Comment 30 Joe Kallar (RETIRED) gentoo-dev 2003-10-05 09:08:19 UTC
This happens on SPARC also.
Comment 31 Warwick Chapman 2003-10-07 16:11:30 UTC

It seems the newest configure script includes a --with-jpeg-dir=/usr, which
seems to fix this.

Can I close it?
Comment 32 Andy Dustman 2003-10-15 10:02:41 UTC
It seems to work for me.
Comment 33 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-10-24 01:29:42 UTC
this will be in CVS in a day or two (just waiting for sys-apps/findutils
changes from bug 31794 to be fully resolved as it's needed for the php.eclass
Comment 34 Douglas Russell (RETIRED) gentoo-dev 2003-11-11 14:42:43 UTC
I've just tried the 4.3.3-r3 ebuild as well as the 4.3.4 and they both still
fail. Can't see anything in the changelog about it being fixed yet either?
its been a while ince you said it was going in so just wondering what is

Comment 35 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-11-11 15:35:45 UTC
the change was with a bunch of other changes in the php eclass.

mind re-attaching the new config.log from mod_php-4.3.4 ?
Comment 36 Douglas Russell (RETIRED) gentoo-dev 2003-11-14 08:20:36 UTC
Created attachment 20734 [details]

As requested, the config.log for 4.3.4

Comment 37 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-11-16 04:05:04 UTC
*** Bug 32464 has been marked as a duplicate of this bug. ***
Comment 38 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-11-16 04:27:54 UTC
should be fixed properly as of the 4.3.4-r1 series, please test.
if it fails still, attached updated config.log
Comment 39 Douglas Russell (RETIRED) gentoo-dev 2003-11-26 02:02:44 UTC
Created attachment 21305 [details]

Still didn't work I'm afraid. Same Problem.

Comment 40 Brandy Westcott (RETIRED) gentoo-dev 2003-11-30 19:25:26 UTC
puggy, it looks like there's something going wrong when it tries to check for Berkeley DB support. A successful check adds the 'all-important' -L/usr/lib to LDFLAGS. Line 23096 of the configure script:

Comment 41 Douglas Russell (RETIRED) gentoo-dev 2003-12-01 02:14:49 UTC
It seems that without +berkdb, configuring fails with +jpeg or -jpeg.
LDFLAGS="-L/usr/lib" emerge mod_php works fine.
Thanks Brandy

Comment 42 Daniel Rendall 2004-02-09 08:48:34 UTC
I've just had the same problem with mod_php-4.3.4-r4, using sun-jdk- as the VM.
Setting LDFLAGS="-L/usr/lib" before the emerge fixed it.
Comment 43 Joe Stroller 2004-02-11 04:15:44 UTC
I can reproduce this also, emerging mod_php-4.3.4-r4 
I seem to have Blackdown Java installed.

Why has this bug been marked as resolved, please..?
Comment 44 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-02-11 08:04:22 UTC
Joe Stroller: open a new bug
Comment 45 Joe Stroller 2004-02-11 09:13:00 UTC
Done. See bug 41220