This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: feedback on --enable-java-home
- From: "Andrew John Hughes" <gnu_andrew at member dot fsf dot org>
- To: "Andrew Haley" <aph at redhat dot com>
- Cc: "Matthias Klose" <doko at cs dot tu-berlin dot de>, "Joshua Sumali" <jsumali at redhat dot com>, "Java Patch List" <java-patches at gcc dot gnu dot org>
- Date: Fri, 31 Oct 2008 21:24:05 +0000
- Subject: Re: feedback on --enable-java-home
- References: <18692.17172.411022.614084@gargle.gargle.HOWL> <490B3C57.6080606@redhat.com>
2008/10/31 Andrew Haley <aph@redhat.com>:
> Matthias Klose wrote:
>
>> b) The symlinks for the header files are wrong, when installed with
>> DESTDIR set.
>>
>> h) Why are the additional symlinks to the rt.jar required?
>>
>> i) The versioned jar links point to the bin directory, not to the
>> lib directory.
>>
>> j) The versioned jar links are created in the "toplevel" dir, not
>> in the lib directory.
>
> All fixed.
>
> Andrew.
>
>
> 2008-10-31 Andrew Haley <aph@redhat.com>
>
> * Makefile.am (install-data-local): Correct symlink paths for
> SDK-style installed JARs.
> Correct symlinks for headers when DESTDIR is set.
>
> Index: Makefile.am
> ===================================================================
> --- Makefile.am (revision 141430)
> +++ Makefile.am (working copy)
> @@ -612,11 +612,15 @@
> version=$(JAVA_VERSION).$(BUILD_VERSION); \
> working_dir=`pwd`; \
> cd $(DESTDIR)$(JVM_JAR_DIR); \
> + RELATIVE=$$(relative $(DESTDIR)$(JRE_LIB_DIR) \
> + $(DESTDIR)$(JVM_JAR_DIR)); \
> for jarname in jaas jce jdbc-stdext jndi jndi-cos jndi-dns \
> jndi-ldap jndi-rmi jsse sasl; \
> do \
> - ln -s $$RELATIVE/$$jarname.jar $$jarname-$$version.jar; \
> + ln -sf $$RELATIVE/rt.jar $$jarname-$$version.jar; \
> done; \
> + RELATIVE=$$(relative $(DESTDIR)$(jardir) \
> + $(DESTDIR)$(JVM_JAR_DIR)); \
> for jar in *-$$version.jar; \
> do \
> ln -sf $$jar $$(echo $$jar | sed "s|-$$version.jar|-$(JAVA_VERSION).jar|g"); \
> @@ -633,14 +637,7 @@
> $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/client; \
> $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/server; \
> $(mkinstalldirs) $(DESTDIR)$(SDK_LIB_DIR); \
> - cd $(DESTDIR)$(JRE_LIB_DIR); \
> - for jarname in jaas jce jdbc-stdext jndi jndi-cos jndi-dns \
> - jndi-ldap jndi-rmi jsse sasl; \
> - do \
> - ln -s rt.jar $$jarname.jar; \
> - done; \
> - cd $$working_dir; \
> - RELATIVE=$$(relative $(DESTDIR)$(datarootdir)/java \
> + RELATIVE=$$(relative $(DESTDIR)$(datadir)/java \
> $(DESTDIR)$(JRE_LIB_DIR)); \
> ln -sf $$RELATIVE/libgcj-$(gcc_version).jar \
> $(DESTDIR)$(JRE_LIB_DIR)/rt.jar; \
> @@ -656,14 +653,14 @@
> $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/server); \
> ln -sf $$RELATIVE/libjvm.so \
> $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/server/libjvm.so; \
> - RELATIVE=$$(relative $(DESTDIR)$(datarootdir)/java \
> + RELATIVE=$$(relative $(DESTDIR)$(datadir)/java \
> $(DESTDIR)$(SDK_LIB_DIR)); \
> ln -sf $$RELATIVE/libgcj-tools-$(gcc_version).jar \
> $(DESTDIR)$(SDK_LIB_DIR)/tools.jar; \
> for headername in jawt jni; do \
> DIRECTORY=$$(dirname $$($(DESTDIR)$(bindir)/gcj \
> -print-file-name=include/$$headername.h)); \
> - RELATIVE=$$(relative $(DESTDIR)$$DIRECTORY \
> + RELATIVE=$$(relative $$DIRECTORY \
> $(DESTDIR)$(SDK_INCLUDE_DIR)); \
> ln -sf $$RELATIVE/$$headername.h \
> $(DESTDIR)$(SDK_INCLUDE_DIR)/$$headername.h; \
> @@ -671,12 +668,12 @@
> for headername in jawt_md jni_md; do \
> DIRECTORY=$$(dirname $$($(DESTDIR)$(bindir)/gcj \
> -print-file-name=include/$$headername.h)); \
> - RELATIVE=$$(relative $(DESTDIR)$$DIRECTORY \
> + RELATIVE=$$(relative $$DIRECTORY \
> $(DESTDIR)$(SDK_INCLUDE_DIR)/linux); \
> ln -sf $$RELATIVE/$$headername.h \
> $(DESTDIR)$(SDK_INCLUDE_DIR)/linux/$$headername.h; \
> done; \
> - RELATIVE=$$(relative $(DESTDIR)$(datarootdir)/java \
> + RELATIVE=$$(relative $(DESTDIR)$(datadir)/java \
> $(DESTDIR)$(JVM_ROOT_DIR)/$(SDK_DIR)); \
> ln -sf $$RELATIVE/src-$(gcc_version).zip \
> $(DESTDIR)$(JVM_ROOT_DIR)/$(SDK_DIR)/src.zip;
>
Just built and installed trunk with:
$GCC_HOME/configure --prefix=$GCC_INSTALL --disable-multilib
--enable-languages=c,c++,java \
--enable-java-awt=gtk,xlib,qt --enable-gconf-peer
--enable-gstreamer-peer \
--enable-java-maintainer-mode --with-java-home=$GCC_INSTALL
--enable-java-home \
--with-jvm-root-dir=$GCC_INSTALL/jdk
--with-jvm-jar-dir=$GCC_INSTALL/jvm-exports
There still seem to be some issues with the result:
* I'm not sure of the point of specifying --with-java-home. I would
have assumed that would give the root dir but this is done by
--with-jvm-root-dir. What use case am I missing?
* --with-jvm-root-dir does not set the root dir, but instead is a
directory in which a 'java-1.5.0-gcj-1.5.0.0' directory is created.
Can jvm root dir not be used directly so the user gets full choice
over what the directory is called? This naming is Fedora specific.
* There is still a broken src.zip symlink:
-- src.zip -> ../../share/java/src-4.4.0.zip
* There is still a broken javac symlink, though it does make some
sense if ecj will be installed in $prefix/bin later. Given gcj has
ecj.jar and creates ecj1, could it not create $prefix/bin/ecj?
* In jre/lib/security, we have a broken symlink: java.security ->
../../../../../lib/security/classpath.security. This is in lib64
here.
My build includes gjdoc so I don't know if that issue is fixed.
Running make DESTDIR=/tmp/gcj install gave a working include
directory, so that issue seems to be fixed.
--
Andrew :-)
Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net
PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8