PHP 4.0 Bug #7091 Updated: Failure to compile using --with-java and kaffe 1.0.6
| From: | sniper@php.net | Date: | Tue, 30 Jan 2001 08:59:38 +0000 |
| Subject: | PHP 4.0 Bug #7091 Updated: Failure to compile using --with-java and kaffe 1.0.6 | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-45321@lists.php.net to get a copy of this message | ||
ID: 7091
Updated by: sniper
Reported By: mnerone@idworld.net
Old-Status: Feedback
Status: Closed
Bug Type: Compile Failure
Assigned To:
Comments:
If problem persists with latest CVS snapshot please
reopen this bug report.
--Jani
Previous Comments:
---------------------------------------------------------------------------
[2000-12-18 10:41:53] sniper@php.net
Is this still happening with latest snapshot from http://snaps.php.net/ ??
--Jani
---------------------------------------------------------------------------
[2000-10-09 11:59:06] mnerone@idworld.net
Ok, got an update for ya:
javac is still not working correctly. I don't have the time to explore whether it is a problem
with kaffe itself or RedHat has introduced a bug in their dist, but here it is:
The *old* javac "bug" (which ext/java/Makefile was attempting to work around) seems like
it was probably that it would ignore the directory path given in the argument (at least if it found
a file of the same name in the CWD). Well, now it seems to put in the CWD *twice* in the output
file. Specifically, "javac net/php/reflect.java" created
"net/php/net/php/reflect.class". (Perhaps RH had a patch to fix the original problem, and
then kaffe fixed it, but RH's patch is still applied to, thereby fixing the bug *twice* -
I'm just guessing). It seems to me that the simplest reliable way now is to get rid of the path
issue completely by making javac always work in the CWD. I.e. remove these two lines from
ext/java/Makefile:
javac net/php/reflect.java
@test ! -f reflect.class || mv reflect.class net/php # bug in KJC javac
and replace them simply with:
(cd net/php; javac reflect.java)
I think this will work no matter what buggy or non-buggy javac is being used.
---------------------------------------------------------------------------
[2000-10-08 16:03:55] mnerone@idworld.net
Using --with-java and kaffe 1.0.6, as provided on disc 2 with RedHat 7.0, here are the last few
lines of my failed compile:
=========================================================
make[2]: Entering directory `/home/mnerone/work/php-4.0.2/ext/java'
make[3]: Entering directory `/home/mnerone/work/php-4.0.2/ext/java'
/bin/sh /home/mnerone/work/php-4.0.2/libtool --silent --mode=compile gcc -I.
-I/home/mnerone/work/php-4.0.2/ext/java -I/home/mnerone/work/php-4.0.2
-I/home/mnerone/work/php-4.0.2/main -I/usr/local/apache/include -I/home/mnerone/work/php-4.0.2/Zend
-I/home/mnerone/work/php-4.0.2 -I/usr/include/mysql
-I/home/mnerone/work/php-4.0.2/ext/xml/expat/xmltok
-I/home/mnerone/work/php-4.0.2/ext/xml/expat/xmlparse -I/usr/include/kaffe -DXML_BYTE_ORDER=12 -g
-O2 -DKAFFE '-DJAVALIB="/libkaffevm.so"' -c java.c && touch java.slo
/home/mnerone/work/php-4.0.2/build/shtool mkdir -p net/php
javac net/php/reflect.java
/usr/bin/jar cf php_java.jar net/php/*.class net/php/*.properties
net/php/*.class: no such file or directory
make[3]: *** [php_java.jar] Error 2
make[3]: Leaving directory `/home/mnerone/work/php-4.0.2/ext/java'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/mnerone/work/php-4.0.2/ext/java'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/mnerone/work/php-4.0.2/ext'
make: *** [all-recursive] Error 1
=======================================================
The compilation bug is easily rectified by editing ext/java/Makefile and removing the line that
reads:
@test ! -f reflect.class || mv reflect.class net/php # bug in KJC javac
Apparently, this was a work around for a bug in kaffe, but the bug in kaffe (at least in RedHat
7.0's dist) seems to be gone, and the workaround, in fact, BREAKS the compilation. A version
check for kaffe may be needed to determine whether the workaround needs to be applied or not.
Hope this helps. I love PHP (but also Perl and Python, to be honest - I pretty much a big fan of any
language beginning with a "P" :D).
Mike Nerone
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=7091