Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 2708 - PHP 4.2.0 doesn't compile with java and pdflib support
Summary: PHP 4.2.0 doesn't compile with java and pdflib support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Ryan Phillips (RETIRED)
URL:
Whiteboard:
Keywords:
: 2759 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-05-13 14:34 UTC by Holger Benl
Modified: 2002-08-26 15:20 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Benl 2002-05-13 14:34:28 UTC
To make it compile, I had to do the following: 
- replace "--with-png-dir=/usr/lib" with "--with-png-dir=/usr" 
- turn off the pdflib USE flag since that makes the configure step abort
Comment 1 Holger Benl 2002-05-13 14:56:48 UTC
replacing "--with-png-dir..." doesn't actually help, the problem really is pdflib support (replacing it only made configure spit out a different error message, so I had thought this meant one problem solved). So the ebuild actually seems to be correct w.r.t. PNG support. I have pdflib 4.0.1-r3, btw, so maybe PHP doesn't support 4.x yet...? 
Comment 2 Roman Weber 2002-05-13 15:27:02 UTC
Hi Holger

I've pdflib 4.0.1-r3 installed too....

Is it possible that you send me your config.log from php to track down this bug?

Roman
Comment 3 Holger Benl 2002-05-13 16:18:06 UTC
I just had a look at the config.log and apparently when you compile 
PHP with both java and pdflib support, the test for pdflib for some 
reason involves java and that's where it fails. 
Just turned off my java USE flag and it compiled. 
I have blackdown-jdk-1.3.1-r5. 
 
Here's the error message from the config.log: 
configure:53825: checking for PDF_show_boxed in -lpdf 
configure:53852: i586-pc-linux-gnu-gcc -o conftest -march=i586 -O3 -pipe  
-DHARD_SERVER_LIMIT=512 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BI 
TS=64 -DLINUX=22 -DTARGET="apache" -DDEV_RANDOM=/dev/random -DUSE_HSREGEX 
-DEAPI -DEAPI_MM  -Wl,-rpath,/usr/X11R6/lib -L/usr/X11R6/lib 
-Wl,-rpath,/opt/blackdown-jdk-1.3.1/./jre/lib/i386/classic 
-L/opt/blackdown-jdk-1.3.1/./jre/lib/i386/classic -Wl,-rpath,/opt/blackdown- 
jdk-1.3.1/./jre/lib/i386/server 
-L/opt/blackdown-jdk-1.3.1/./jre/lib/i386/server 
-Wl,-rpath,/opt/blackdown-jdk-1.3.1/./jre/lib/i386/nat 
ive_threads -L/opt/blackdown-jdk-1.3.1/./jre/lib/i386/native_threads 
-Wl,-rpath,/opt/blackdown-jdk-1.3.1/./jre/lib/i386 -L/opt/blackdow 
n-jdk-1.3.1/./jre/lib/i386 -Wl,-rpath,/usr/lib/lib -L/usr/lib/lib conftest.c 
-lpdf  -lz -ltiff -lpng -ljpeg -lmysqlclient -lmhash -lmcr 
ypt -lltdl -lgmp -lgd -lt1 -lttf -lX11 -lXpm -lpng -lz -ljpeg -lz -lm -lz 
-lxml2 -ldb-3 -lgdbm -lz -lcrypt -lresolv -lm -ldl -lnsl  -lr 
esolv -lcrypt >&5 
/opt/blackdown-jdk-1.3.1/./jre/lib/i386/libjava.so: undefined reference to 
`jdk_sem_post' 
/opt/blackdown-jdk-1.3.1/./jre/lib/i386/libjava.so: undefined reference to 
`jdk_waitpid' 
/opt/blackdown-jdk-1.3.1/./jre/lib/i386/libjava.so: undefined reference to 
`jdk_pthread_sigmask' 
/opt/blackdown-jdk-1.3.1/./jre/lib/i386/libjava.so: undefined reference to 
`fork1' 
/opt/blackdown-jdk-1.3.1/./jre/lib/i386/libjava.so: undefined reference to 
`jdk_sem_wait' 
/opt/blackdown-jdk-1.3.1/./jre/lib/i386/libjava.so: undefined reference to 
`jdk_sem_init' 
collect2: ld returned 1 exit status 
configure:53855: $? = 1 
configure: failed program was: 
#line 53833 "configure" 
#include "confdefs.h" 
 
/* Override any gcc2 internal prototype to avoid an error.  */ 
#ifdef __cplusplus 
extern "C" 
#endif 
/* We use char because int might match the return type of a gcc2 
   builtin and then its argument prototype would still apply.  */ 
char PDF_show_boxed (); 
int 
main () 
{ 
PDF_show_boxed (); 
  ; 
  return 0; 
} 
configure:53872: result: no 
configure:53906: error: 
PDFlib extension requires at least pdflib 3.x. You may also need libtiff, 
libjpeg, libpng and libz. 
Use the options --with-tiff-dir=<DIR>, --with-jpeg-dir=<DIR>, 
--with-png-dir=<DIR> and --with-zlib-dir=<DIR> 
 
Comment 4 Ryan Phillips (RETIRED) gentoo-dev 2002-05-16 19:42:42 UTC
*** Bug 2759 has been marked as a duplicate of this bug. ***
Comment 5 Roman Weber 2002-05-17 07:21:24 UTC
The only way I've fount @time is to remove java from php. 

What do you mean Holger and Keith, should I remove java from the ebuild?

Perhaps it works with an extra ebuild only for the java extension.
(It will compiled so or so as extension which must be loaded thru php.ini or dl() )

Roman 
Comment 6 Holger Benl 2002-05-17 08:44:49 UTC
Well, java support works as long as pdflib support is turned off
(and vice versa). So, I think you should still offer those options
to users. I'd suggest the ebuild should either fail (with some
explanatory message) when the user's trying to compile it with both,
or drop one of these options (but *only* when the user is trying to
compile with both) and inform the user of this decision after the install.
The second solution is probably less obtrusive - imagine you're doing
an automatic update: I'd want PHP to not include everything it could
include rather than the update process failing.
Comment 7 SpanKY gentoo-dev 2002-05-17 09:40:55 UTC
I had the same exact problems but i fixed them both:
BEFORE:
  --with-png-dir=/usr/lib \
  use pdflib && myconf="${myconf} --with-pdflib"
AFTER:
  --with-png-dir=/usr \
  use pdflib && myconf="${myconf} --with-pdflib=/usr"

Also, perhaps unrelated, when you emerge blackdown jdk/jre, /etc/env.d/20java 
does not get created all by itself.  they create /etc/env.d/java/20blackdown-
{jdk,jre} files ... i fixed this by:
  ln -s /etc/env.d/java/20blackdown-jdk-1.3.1 /etc/env.d/20java-jdk
  ln -s /etc/env.d/java/20blackdown-jre-1.3.1 /etc/env.d/20java-jre
then i issued an env-update before emerging php ...

see how this works for you guys
Comment 8 Roman Weber 2002-05-17 10:43:27 UTC
The fix isn't really sane.

In combination with java (Blackdown) it will kill the Dynamic Library Support
from PHP.

Sometimes it will make me crazy....
Comment 9 SpanKY gentoo-dev 2002-05-17 13:45:31 UTC
my previous comments about the java are not needed ...
it would seem when you emerge a java jdk it sets up the proper env java 
variables needed by this ebuild in /etc/profile.env
as for killing Dynamic Library Support when using blackdown, perhaps that 
should be logged as another bug report ?
Comment 10 Ryan Phillips (RETIRED) gentoo-dev 2002-05-19 18:05:19 UTC
Fixed in #2820
Comment 11 Ryan Shaw 2002-08-15 03:36:55 UTC
Disabling Java hardly "resolves" this bug. The problem is that this ebuild is
using obsolete configure options. See:

http://bugs.php.net/bug.php?id=11840

for more details.
Comment 12 Ryan Phillips (RETIRED) gentoo-dev 2002-08-16 13:15:46 UTC
Ryan: If I change the use flags to include pdflib if the 'jpeg' use var is set,
this will solve the problem right?
Comment 13 Ryan Shaw 2002-08-16 23:22:37 UTC
as i understand it, php pdflib support includes both jpeg and 
tiff support. thus if pdflib use flag is set, the jpeg and tiff 
use flags should be ignored.

i have pdflib turned on so i just deleted the following lines:

use jpeg && myconf="${myconf} --with-jpeg-dir=/usr/lib"
use tiff && myconf="${myconf} --with-tiff-dir=/usr"

and compile with java support went fine.
Comment 14 Ryan Phillips (RETIRED) gentoo-dev 2002-08-18 19:03:59 UTC
committed the changes... testing...
Comment 15 Ryan Phillips (RETIRED) gentoo-dev 2002-08-26 15:20:51 UTC
have been told it works... closing bug