Issue 62350 - IBM JRE and and env. variable JITC_PROCESSOR_TYPE
Summary: IBM JRE and and env. variable JITC_PROCESSOR_TYPE
Status: CONFIRMED
Alias: None
Product: porting
Classification: Code
Component: code (show other issues)
Version: 680m156
Hardware: PowerPC (PPC) Linux, all
: P5 (lowest) Trivial (vote)
Target Milestone: 4.x
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-20 19:16 UTC by pavel
Modified: 2017-05-20 11:31 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description pavel 2006-02-20 19:16:24 UTC
Hi,

this is a followup to #i61961#.

IBM JDK on Linux/PPC (ha, this is so specific environment ;-) needs

    JITC_PROCESSOR_TYPE=6
    export JITC_PROCESSOR_TYPE

This is currently needed on both soffice.sh and soffice_lean.sh.

Please move this to IBM JDK specific detection and also surround it with #ifdef
POWERPC so it doesn't slow all systems with one unneccessary uname call.

Or is there a better way to do it?
Comment 1 joachim.lingner 2006-02-21 10:03:16 UTC
@pjanik: Is there some document that explains this variable? 
Comment 2 eric.bachard 2006-02-21 10:12:47 UTC
ericb->jl

JITC processor type is needed when IBM runtime environment is needed.  This is the case on Linux PPC, 
where *only* IBM J2re is available (no Sun if I'm not wrong), sincce OpenOffice.org uses Java 1.4.x

I'm not sure, but JITC means : J (ava | ust ) In Time Compiler

If this variable is empty, Java does not work. this value is harmless for all other cases.
That's the reason why I proposed (and rene was ok), the use of JITC_PROCESSOR_TYPE for Linux PPC.

If you find a better place, no problem, but please don't remove this value

Thank's in advance






Comment 3 joachim.lingner 2006-02-21 11:34:07 UTC
Ok, I did not notice that this is already integrated. So the question is, if
there is a way to set this variable only if in fact a IBM JRE is selected. I
will think about it. If I come up with a solution how this could be easily
achieved, I'll let you know. Since I do not know when this will be, please add
the code that sets the variable in the scripts unopkg and regcomp. Otherwise,
adding Java -UNO packages with unopkg will not work and also building
instset_native will not work when the IBM JRE is used in the build environment.
Comment 4 pavel 2006-02-21 21:32:40 UTC
jl: see http://www-128.ibm.com/developerworks/java/library/l-pow-apple.html for
more info about this variable.
Comment 5 joachim.lingner 2006-02-22 09:40:10 UTC
Thanks for the link, that was helpful.
After discussing this problem internally we have come to the conclusion that
there is currently no elegant and  non – complex solution. The initial goal was
to set the environment variable only if the IBM JDK is selected and the platform
is Linux on PPC. To find out what JDK is selected one would use our Java
framework API and ideally one would place the code in javaldx. However, there is
no easy solution to parse the output of javaldx, which would then countain the
paths to some particular directories of the JRE installation AND environment
variables. We have to bear in mind, that the script must use a subset of
expressions which is available to the majority of shells, and that starting
additional executables costs startup time.

Another idea would be to have a kind of preloader, like the soffice.exe of the
windows version. That is one would bloat up javaldx to contain all other stuff
which is otherwise contained in the script and have it execute the soffice.bin.
Then javaldx could set environment variables for the child process. However,
this increases complexity of javaldx very much.

So currently I would like to stick to the solution, that you have already
implemented - just setting the environment variable in the script dependent on
the current platform. This does not do any harm in case a different JRE is
selected, adds very little complexity and hardly costs startup performance.

If the demand comes up to do more changes to the environment for particular JREs
then we have to reevaluate this. Until then I would like to set this issue to
wontfix.
Comment 6 pavel 2006-02-26 10:05:26 UTC
After reading more about this, I think it is system issue, not apps issue. This
variable should be set on the system because every application using IBM JDK is
affected.

Is it typical on Linux/PPC to tweak every application using Java to start with
this variable?

I think the best solution would be to ask people to set this variable in
system-wide basis...
Comment 7 joachim.lingner 2006-02-27 09:37:03 UTC
pjanik you are right. If it is an apps issue, then we should not make changes to
the scripts.

I really do not know the JRE from IBM. But it could be that the java executable
sets this environment variable for the actual java child process. A similar
thing happens with the Sun JRE and the LD_LIBRARY_PATH. The java executable sets
the variable and forkes off a child process which uses that variable. 
It would be great if you could investigate this further.
Thanks,
Joachim
Comment 8 joachim.lingner 2006-03-15 11:04:16 UTC
JL->pjanik:Please clarify if setting this environment variable is required for
all applications. In that case the variable should be set globally und should
not be set in the soffice script. The other case is, that OOo needs it because
the way we use  Java. That is we load the runtime directly and do not use the
Java executable.
Comment 9 pavel 2006-03-19 09:19:20 UTC
ericb, rene: Can you confirm that all Java apps using JIT need the variable
JITC_PROCESSOR_TYPE to be set correctly? At least this is what I'm reading at
IBM's site. I can't confirm because I do not use GNU/Linux on PowerPC.
Comment 10 eric.bachard 2006-03-19 10:59:19 UTC
ericb->pjanik

I do confirm that OpenOffice.org using IBM jre 1.4.x or superior  (1.5.0 currently) needs to have this 
variable JITC_PROCESSOR_TYPE correctly set. Else JIT won't work at all.

Most of the time jre is only installed to use all OpenOffice.org features, like base

Comment 11 pavel 2006-03-19 11:04:32 UTC
ericb: and other Java apps? Forget about OOo for the moment.
Comment 12 eric.bachard 2006-05-28 18:25:46 UTC
set target
Comment 13 eric.bachard 2006-07-11 16:17:13 UTC
set target
Comment 14 pavel 2007-05-15 09:47:30 UTC
I tend to remove this hack from soffice.sh scripts... If the environment doesn't contain this variable, the 
JDK was wrongly installed.
Comment 15 pavel 2007-12-21 19:57:31 UTC
ericb: will you do something with this or should I?

Comment 16 pavel 2008-05-22 19:42:44 UTC
Move target.

Comment 17 Martin Hollmichel 2008-08-29 11:15:21 UTC
set target to 3.x
Comment 18 Marcus 2017-05-20 11:31:38 UTC
Reset assigne to the default "issues@openoffice.apache.org".