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 Haley <aph at redhat dot com>
- To: Andrew John Hughes <gnu_andrew at member dot fsf dot org>
- 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: Sat, 01 Nov 2008 10:36:59 +0000
- Subject: Re: feedback on --enable-java-home
- References: <18692.17172.411022.614084@gargle.gargle.HOWL> <490B3C57.6080606@redhat.com> <17c6771e0810311424m4603ec41je78f1112cd541070@mail.gmail.com>
Andrew John Hughes wrote:
> 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?
I didn't change this.
> * --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.
I can see no reason why not.
> * There is still a broken src.zip symlink:
> -- src.zip -> ../../share/java/src-4.4.0.zip
I didn't change this.
> * 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?
Possibly, yes. The problem is that on distros $prefix/bin/ecj is
owned by Eclipse's ecj package, so it would conflict. I can't see
any purpose to creating ecj in the jvm root dir. It would
be worth fixing the javac symlink, though, to point to a working
javac.
> * In jre/lib/security, we have a broken symlink: java.security ->
> ../../../../../lib/security/classpath.security. This is in lib64
> here.
OK, this needs fixing.
To be clear: as the mail said, I only fixed items b, h, i, and j from
Doko's list. It would be nice to change the configury options, but not
critical.
Andrew.