Issue 63446 - configuration of SDK for running with gcj and ant
Summary: configuration of SDK for running with gcj and ant
Status: ACCEPTED
Alias: None
Product: porting
Classification: Code
Component: code (show other issues)
Version: OOo 2.0.2
Hardware: All Linux, all
: P3 Trivial (vote)
Target Milestone: AOO Later
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-21 22:25 UTC by sparcmoz
Modified: 2017-05-20 11:31 UTC (History)
1 user (show)

See Also:
Issue Type: TASK
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description sparcmoz 2006-03-21 22:25:52 UTC
This issue is to request configuration of SDK for running with gcj and ant. I
will reproduce these notes on the jdk@tools list in case others like to comment. 

For gcj there are 2 main flavours to be considered:

(1) where fake java commands exist, such as /usr/bin/java, these are provided by
the various linux distributions, using java-gcj-compat or jpackage
infrastructure. This is useful for most users but please see comments at issue
62265 and cws_src680_maho1

(2) the vanilla gcj installation which provides corresponding commands such as
gij, gcj, gjdoc, fastjar, this is useful for experimenting with different
compiler versions and gives visibility to bugs such as hardcoded java commands
or failing to obey the configured environment

Based on the comments by cmc and maho at issue 62265 the strategy should be like
this:

(a) --with-java=gij: this is only to make a flag that can be used to bypass
non-working code, or find special workarounds for gcj

(b) --with-jdk-home=/path/to/java/home: this should allow choosing between
alternative installed compilers. The configuration should look for java at the
specified location, and not rely on searching the PATH. If javac command is not
found, then search for the corresponding gcj command. Note that gjdoc is not
part of the gcj installation. For example in my system there are:
(i) /usr/bin/java - provided by debian
(ii)/usr/local/bin/gcj - my vanilla gcj 4.0
(iii)/usr/local/4.1/bin/gcj - my vanilla gcj 4.1
(iv) /usr/local/bin/gjdoc

(c) --with-ant-home=/path/to/ant/home: similar issues as gcj for alternative
installations.  For ant to launch directly (simply using "ant" command) with gcj
4.1 it is necessary to set JAVACMD. But gcj 4.0 will not launch ant the direct
way, so it necesssary to use this method: 
 gij -classpath $ANT_LIB/ant.jar:$ANT_LIB/ant-launcher.jar -Dant.home=$ANT_HOME
org.apache.tools.ant.Main

Corresponding issues affect the includes and link paths. These are revealed most
easily in examples/DevelopersGuide/OfficeDev/DesktopEnvironment. There it
appears it may also be necessary to explicitly include jni.h when using gcj?
Comment 1 jsc 2006-05-18 08:51:43 UTC
accepted

Low prio for me because i don't use gcj and don't work normally in such an
environment. But patches and fixes are welcome and can speed up the fix.
ANT support is totally new feature and should be addressed as in a separate issue
Comment 2 sparcmoz 2006-05-20 10:40:29 UTC
jsc: I agree this is low priority. I have today conducted some tests with sdk
built from m165 on GNU/Linux SPARC and it is running fine, so that work can
proceed to identify gcj issues with individual tests.

The first requirement for success with gcj is integration of sb49 in m164 that
fixed issue 63812.

On debian/unstable gcj is invoked using package java-gcj-compat where the
/usr/bin/java and such commands behave as expected in the configuration,
although they are just links to wrappers around gcj etc. The SDK configures and
examples are run OK.

To invoke gcj commands directly such as my own build of /usr/local/4.1/bin/gij
it is only necessary to replace javac, java, jar by gcj, gij, fastjar in these
files: configure.pl, settings/std.mk, settings/settings.mk and also set
JAVAC_FLAGS=-C in settings.mk.

Eventually I can develop some patches but not sure which is the better way to
proceed:

(a) by default search for gcj etc if javac is not found, or
(b) use a configure flag such as --enable-gcj-commands
Comment 3 jsc 2006-05-23 14:20:21 UTC
it shouldn't be to difficult and patches are welcome ;-)
Comment 4 Marcus 2017-05-20 11:31:17 UTC
Reset assigne to the default "issues@openoffice.apache.org".