Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] [sm-discuss] some java questions...

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Sukneet Basuta <sukneet AT gmail.com>
  • To: Javier Vasquez <j.e.vasquez.v AT gmail.com>
  • Cc: "sm, discuss" <sm-discuss AT lists.ibiblio.org>
  • Subject: Re: [SM-Discuss] [sm-discuss] some java questions...
  • Date: Sat, 16 Mar 2013 02:05:49 -0400

On 15/03/13 07:06 PM, Javier Vasquez wrote:
Hi,

Before the question, let me clarify my short term objective: To
compile icedtea-web and JRE using gcj (gcc with java) as starting
point, without the need of initial binary JRE/JDK.
I'll to answer what I can, but as a disclaimer I've never compiled or tried to compile IcedTea.
Now the questions:

1.- When casting gcc with java and JDK Tree emulation, is it still
necessary to cast java-gcj-compat to still get a compatible JDK Tree
emulation?
java-gcj-compat is redhat's version of gcj which is java 1.5 compliant. The one in gcc supports most of 1.4 and some of 1.5. IcedTea requires at a 1.5 compliant JDK.
2.- Is gcc with java on version 4.7.2 cleaner than old 4.6.3 in test?
It happens that on 4.6.3 there's missing stuff that breaks cleanse.
Not sure, but I doubt it. gcj is only being maintained, so there shouldn't be any major changes to it. I'm not sure what the issue is with cleanse.
3.- Can icedtea-web be compiled directly with plain gcj?
Instructions? All I've found is that icedtea-web is tested to compile
under icedtea JDK, but not whether or not gcj can compile it. I'd
guess given icedtea-web is based on gnu classpath it should work, but
haven't found anything confirming this.
From briefly looking at Debian's files, it seems that they compile gcj, use that to compile ecj, and then use that to compile openjdk. Then icedtea is built with openjdk. It seems the gentoo allows for something similar as well, but allows ecj to compile icedtea. Look at the gentoo ebuild (http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-java/icedtea
/icedtea-7.2.3.8.ebuild?view=markup) for an idea of how to do it. You can also look at Debian's sources but they are generally less straight forward to understand IMO.

It's supposed to be possible to compile icedtea with gcj, but I have no idea how practical it is or how easy it is to do. I assume there is issues with it since debian and gentoo seemingly use ecj.
4.- If having icedtea jdk, or any other jdk, non gcj, is a must for
icedtea-web, then which are the steps to get icedtea compiled from
source, and from scratch (no initial binaries) with gcj as starting
point? I found this:

https://evolvis.org/plugins/mediawiki/wiki/jalimo/index.php/CrossCompilingOpenJDK

But, though it makes me understand the main idea, there are minor
details missing. Like if I compile/install (cast) gcj, then PATH will
get polluted with some java stuff (even with the jdk tree emulation
there's some stuff in /usr/bin and the like). So somehow, PATH, and
some other stuff for libraries and headers might need change. Also, I
wouldn't like to dispel gcj, given the time it takes to cast it back.
So some instructions towards coexistence are also required...
If you just need to override certain things in PATH, just set the first elements in PATH to the ones you want to use. (i.e PATH=/override/bin:/usr/bin). It looks like They are just adding the build dir to PATH, after the bootstrap JDK. Also it looks like they are specifying everything in the configure flags, so it shouldn't be an issue. (btw, you may have to disable bootstrapping if you are compiling IcedTea7 - http://icedtea.classpath.org/wiki/CommonIssues#IcedTea7_building_on_systems_with_JDK_5_or_JDK_6).
5.- Are there any SMGL like instructions around there?
Not that I'm aware of.
6.- Is the gcj JRE like, gij, enough, like to eventually use it on
other applications like libreoffice? Or for such endeavours is still
required to have an icedtea JRE?
If your application only requires Java 1.5, then yes (AFAIK most applications require at least 1.6). Even then, it's very possible to run into problems if the application wasn't tested with gcj/classpath. Only the redhat version of gcj is 1.5 compliant FYI.




Archive powered by MHonArc 2.6.24.

Top of Page