i get an install error when running the default install. it can't find the java, below is the error: checking for gdImageColorClosestHWB in -lgd... yes checking for gdImageColorResolve in -lgd... yes checking for gdImageGifCtx in -lgd... no checking whether to include GNU gettext support... no checking for gmp support... yes checking for Hyperwave support... no checking for ICAP support... no checking for iconv support... no checking for IMAP support... no checking for Informix support... no checking for Ingres II support... no checking for InterBase support... no checking for ircg support... no checking for Java support... find: /opt/java/include: No such file or directory find: /opt/java: No such file or directory no configure: error: unable to find Java VM libraries !!! ERROR: The ebuild did not complete successfully. !!! Function src_compile, Line 73, Exitcode 1 !!! (no error message) !!! emerge aborting on /usr/portage/dev-lang/php/php-4.1.1.ebuild . i decided to make a link from /opt/blackdown to /opt/java because that is where the ebuild looks for java if [ "`use java`" ] ; then myconf="$myconf --with-java=/opt/java" fi php still wouldn't install, below is the error: e/php-4.1.1/work/php-4.1.1/main -I/var/tmp/portage/php-4.1.1/work/php-4.1.1 -I/usr/include/apache -I/var/tmp/portage/php-4.1.1/work/php-4.1.1/Zend -I/usr/include/freetype -I/usr/include/mysql -I/usr/include -I/var/tmp/portage/php-4.1.1/work/php-4.1.1/ext/xml/expat -I/opt/java/include -I/opt/java/include/linux -DLINUX=22 -DMOD_SSL=208105 -DUSE_HSREGEX -DEAPI -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/var/tmp/portage/php-4.1.1/work/php-4.1.1/TSRM -mcpu=k6 -march=k6 -O3 -pipe -prefer-pic -D_REENTRANT '-DJAVALIB="/libjava.so"' -c java.c && touch java.slo /var/tmp/portage/php-4.1.1/work/php-4.1.1/build/shtool mkdir -p net/php javac net/php/reflect.java make[3]: javac: Command not found make[3]: *** [php_java.jar] Error 127 make[3]: Leaving directory `/var/tmp/portage/php-4.1.1/work/php-4.1.1/ext/java' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/php-4.1.1/work/php-4.1.1/ext/java' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/php-4.1.1/work/php-4.1.1/ext' make: *** [all-recursive] Error 1 !!! ERROR: The ebuild did not complete successfully. !!! Function src_compile, Line 74, Exitcode 2 !!! (no error message) !!! emerge aborting on /usr/portage/dev-lang/php/php-4.1.1.ebuild .
Created attachment 54 [details] php ebuild
The bug here is that the PHP ebuild relies on the now deprecated use of /opt/java. It should use the environment variable JAVA_HOME instead. I will do a cleanup of the java dependencies as soon as I've finished the java-config script and mechanism (waiting for feedback from Martin Schlemmer).
just thought i'd mention that i tried changing the php ebuild to use ${JAVA_HOME} and that didn't help. i also try using sun java instead of blackdown, but i got the same error during compliation. any word back from martin?
I have fixed this bug, but it only resulted in more nastyness later on in the build process. Has anybody successfully built PHP against the Blackdown JDK ever ?
The bug happens when blackdown-jre is installed after blackdown-jdk. The blackdown-jre clobbers the vars in /etc/env.d/20java. After that, $JAVA_HOME and $PATH points to a directory without javac. Suggested solution: Make blackdown-jre to dump its vars in /etc/env.d/20java and blackdown-jdk in /etc/env.d/21java, and you could have both ebuilds installed.
reassigning to karltk since he's been busy with all java related stuff
Now uses JDK_HOME