Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 155

Summary: php fails to compile due to java problems
Product: Gentoo Linux Reporter: Chris Arndt <arndtc>
Component: [OLD] DevelopmentAssignee: Karl Trygve Kalleberg (RETIRED) <karltk>
Status: RESOLVED FIXED    
Severity: normal Keywords: EBUILD
Priority: High    
Version: 1.0 RC6 r14   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 154    
Bug Blocks:    
Attachments: php ebuild

Description Chris Arndt 2002-01-13 23:45:46 UTC
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 .
Comment 1 Chris Arndt 2002-01-13 23:46:54 UTC
Created attachment 54 [details]
php ebuild
Comment 2 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2002-01-14 04:09:25 UTC
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).
Comment 3 Chris Arndt 2002-01-18 00:22:25 UTC
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?
Comment 4 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2002-01-25 10:42:36 UTC
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 ?
Comment 5 CFuga 2002-01-27 23:38:43 UTC
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.
Comment 6 Geert Bevin 2002-02-04 10:50:27 UTC
reassigning to karltk since he's been busy with all java related stuff
Comment 7 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2002-02-12 11:45:19 UTC
Now uses JDK_HOME