This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: feedback on --enable-java-home
2008/11/1 Andrew Haley <aph@redhat.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.
>
I know; I just wanted to clarify the remaining issues and also point
out the classpath.security issue which was missed by doko. I think
the broken symlinks need to be fixed at least. I'm happy to look at
this later this week when I'm back from Munich.
--
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