starting pgdbg in gui mode/java issues

I’m trying to run pgdbg in graphical mode, but it instead comes up
in textual mode, with the message:

pgdbg: The PGDBG Graphical User Interface (GUI) requires java JRE 1.5.0_04
pgdbg: or higher. Using Text Interface.

I just installed the Java JRE 1.5.0_07 on my linux box and
set the environmental variable PGI_JAVA to point to that
new version of java, following the advice of another post in this
forum.

Are there any other environmental variables that I have to set?
Is there someway to query pgdbg to find out what version of java
it thinks it’s using?

Catherine

Hi Catherine,

You should not have to set any environment variables to get the GUIs to work on a local system. On a remote system you’ll have to set your DISPLAY variable. If you are using a different Java JRE, you’ll have to set the PGI_JAVA environment variable to the absolute path of the new java executable.

Do you see the PGDBG GUI when you do not set the PGI_JAVA environment variable?

Is the PGI_JAVA environment variable set to the absolute path of the java executable. For example let’s say that you installed the new java on /opt/java,

(under csh/tcsh):

setenv PGI_JAVA /opt/java/jre/bin/java

(or under sh/bash):

export PGI_JAVA=/opt/java/jre/bin/java

Some users have made the mistake of specifying just the directory to the new java, not the full path to the “java” executable.

Finally, please tell us what linux distribution you are using.


-Mark

If I set the PGI_JAVA environmental variable to the java executable
that I find in jre_bin that comes bundled with the Portland Group
installation, then the gui interface comes up for a second, but
then fails with the following errors.

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at splashLoader$1.run(Unknown Source)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.UnsatisfiedLinkError: /export/lv01/sieglind_scr/cmm/Portlan
d2/linux86-64/6.1/lib/libjpgdbg.so: /export/lv01/sieglind_scr/cmm/Portland2/linu
x86-64/6.1/lib/libjpgdbg.so: cannot restore segment prot after reloc: Permission
denied
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1647)
at java.lang.Runtime.load0(Runtime.java:769)
at java.lang.System.load(System.java:967)
at jpgdbg.main(Unknown Source)
… 6 more

This is why I tried to install my own version of java in the first place.

I’m using the Fedora Core 5 linux distribution
(kernel = 2.6.16-1.2096_FC5) with Opteron 64bit 852 processors and
version 6.1-6 of the PGI installation.

Catherine

Hi Catherine,

I was able to reproduce your first problem which gave the following error message:

pgdbg: The PGDBG Graphical User Interface (GUI) requires java JRE 1.5.0_04
pgdbg: or higher. Using Text Interface.


I believe you are getting the above error message because pgdbg is picking up the java that lives in /usr/bin/java which is incompatible. If pgdbg cannot find the java jre that is bundled with PGI compilers/tools, then it tries whatever java is in your path. In this case, the java in your path is incompatible.

Please verify that the directory $PGI/linux86-64/6.1/jre (where $PGI is the root directory to PGI compilers and tools) exists and that there is a “java” executable under that directory. If so, what happens when you try “pgdbg” (under $PGI/linux86-64/6.1/bin) without PGI_JAVA set?

I did a fresh install of PGI 6.1-6 on a Fedora Core 5 box, set my path to $PGI/linux86-64/6.1/bin, and successfully started up pgdbg. I did not have to set PGI_JAVA (or any other environment variable).

-Mark

If I set my PGI_JAVA variable to the java that came bundled with
the PGI distribution, I get the following errors:

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at splashLoader$1.run(Unknown Source)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.UnsatisfiedLinkError: /export/lv01/sieglind_scr/cmm/Portlan
d2/linux86-64/6.1/lib/libjpgdbg.so: /export/lv01/sieglind_scr/cmm/Portland2/linu
x86-64/6.1/lib/libjpgdbg.so: cannot restore segment prot after reloc: Permission
denied
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1647)
at java.lang.Runtime.load0(Runtime.java:769)
at java.lang.System.load(System.java:967)
at jpgdbg.main(Unknown Source)
… 6 more

cmm@sieglind [79]>env | grep JAVA
PGI_JAVA=/export/lv01/sieglind_scr/cmm/Portland2/linux86-64/6.1/jre/bin/java

where all the PGI software is installed under
/export/lv01/sieglind_scr/cmm/Portland2.

Using the “-version” flag on this version of java gives me:

java version “1.5.0_05”
Java™ 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
Java HotSpot™ Server VM (build 1.5.0_05-b05, mixed mode)

Are there any tests I can do with the version of java that came
bundled with the PGI installation to see why it’s not working?

Catherine

Hi Catherine,

It looks like you have SELinux enabled on your system. See http://www.pgroup.com/userforum/viewtopic.php?t=398&postdays=0&postorder=asc&start=0

for some tips on resolving this issue (the resolution comes in the second to last message in the thread).

-Mark

My sysadmin just re-installed the pgi software and performed the
“chcon” commands listed in the other thread, but I’m still having
problems:

System specs: AMD Opteron CPU’s, Processor 852
Fedora Core 5 OS

PGDBG 6.1-6 x86-64 (Workstation, 4 CPU)
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2006, STMicroelectronics, Inc. All Rights Reserved.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at splashLoader$1.run(Unknown Source)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.UnsatisfiedLinkError: /usr/pgi/linux86-64/6.1/lib/libjpgdbg.so: /usr/pgi/linux86-64/6.1/lib/libjpgdbg.so: cannot restore segment prot after reloc: Permission denied
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1647)
at java.lang.Runtime.load0(Runtime.java:769)
at java.lang.System.load(System.java:967)
at jpgdbg.main(Unknown Source)
… 6 more

Help?

Catherine

As an experiment, can you try disabling SELINUX by setting SELINUX=disabled in your system’s /etc/sysconfig/selinux file and rebooting?

That should at least tell us that the problem is with SELinux and not something else.

Thanks,

-Mark