Apache OpenOffice (AOO) Bugzilla – Issue 62350
IBM JRE and and env. variable JITC_PROCESSOR_TYPE
Last modified: 2017-05-20 11:31:38 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?
@pjanik: Is there some document that explains this variable?
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
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.
jl: see http://www-128.ibm.com/developerworks/java/library/l-pow-apple.html for more info about this variable.
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.
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...
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
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.
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.
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
ericb: and other Java apps? Forget about OOo for the moment.
set target
I tend to remove this hack from soffice.sh scripts... If the environment doesn't contain this variable, the JDK was wrongly installed.
ericb: will you do something with this or should I?
Move target.
set target to 3.x
Reset assigne to the default "issues@openoffice.apache.org".