JOGL on PPC Linux?

Is it possible to run JOGL under PPC Linux (Gentoo, to be specific)?

I notice that Blackdown has Java 1.3.1 for PPC, does anyone else make Java for PPC Linux? I assume Blackdown’ll eventually get around to a 1.4.x release.

If the Java end can be satisfied, is it as simple as recompiling the native libraries?

I don’t have a Mac unfortunately, but someone contacted me wanting to try my game under PPC Gentoo Linux (yeesh :slight_smile: ) It just sparked my curiousity really.

If you have a compliant 1.4.x JVM and a compliant OpenGL implementation - then yeah it really should just be a recompile if the Linux stuff all uses X11.

As far as I can tell, no one makes a 1.4.x JDK for PPC Linux yet (why do I get the feeling it’s a pretty isolated OS in general?)

I may be coming into a Mac one of these days, if so I’ll play around with it (assuming Blackdown comes around by then).

Thanks.

Linux on PPC is pretty popular in government circles, but outside of that there are few consumer machines that are Linux/PPC so it truly gets neglected.

I have been trying to get JOGL building under Ubuntu Hedgehog on an old Apple B&W G4. I uninstalled GCJ since it seems to cause more trouble than not, and installed the IBM Java2 1.4 stuff. I tweaked build.xml to target PPC, added a line for ‘linux’ ‘ppc’ to StructMapping or whatever it is called, and am now stuck on the fact that it cannot find the interfaces WGL, GLX, GLC. This is the same situation as seen in http://192.18.37.44/forums/index.php?topic=6240.0.

Might anybody have suggestions about where / how / what to do next? :slight_smile:

many thanks!

It looks like something is wrong in your build process and that GlueGen didn’t get run to autogenerate these interfaces. Check build/gensrc/classes and see if they are present.

Hi Ken, many thanks for the info. Turns out it helps a lot to do “ant clean linux” rather than “ant linux” when trying to get these things going - the “clean” started to hilight other steps that needed work: 1) fixing paths to things e.g.: they weren’t foo/bar/java/lib/linux but just foo/bar/java/lib, 2) ln -s /usr/bin/gcc-4.0 /usr/bin/gcc. That’s what I’ve done so far to (I think) make some small headway. More news as it happens!?

Subsequent things I had to do before I got the “BUILD SUCCESSFUL” message (note that I haven’t actually yet checked to see if I got files that really work, it is just the first time that the ant run has gone to completion w/out errors):

  • install headers for X11 (surprisingly hard to figure out the bloody name of the bloody package for ubuntu).
  • edit build.xml to have the right path to libjawt.so, which for some reason in the IBM Java2 release is in jre/bin rather than jre/lib.

Of course, now I have to figure out how to get my lame Rage 128 card to do anything remotely like 3D. There’s gotta be at least some pathetic software mode I can get via Mesa? These are the kinds of things that make me appreciate DirectX (heaven forbid)!

NULL ------------------------------------------------------------------------
0SECTION TITLE subcomponent dump routine
NULL ===============================
1TISIGINFO signal 11 received
1TIDATETIME Date: 2005/07/21 at 23:24:29
1TIFILENAME Javacore filename: /usr/local/storage/JOGL/Demos/javacore.20050721.232428.6666.txt
NULL ------------------------------------------------------------------------
0SECTION XHPI subcomponent dump routine
NULL ==============================
1HPTIME Thu Jul 21 23:24:29 2005
1HPSIGRECV SIGSEGV received in ?? at 0xea9e9e4 in /usr/X11R6/lib/modules/dri/r128_dri.so. Processing terminated.
1HPFULLVERSION J2RE 1.4.2 IBM build cxppc32142-20050609

Turns out those posts I read that said to put the R128 into 16 bit (rather than ubuntu’s default 24) mode were correct! I was misled for a while by the scary “(WW) Video BIOS not detected in PCI space!” messages in the X log. I finally edited my X configuration to force it into 16 bit mode to see if that would make the errors go away and/or help get 3D not seg-faulting. Well, the errors didn’t go away, but now I can actually run the mesa demos (mostly - there are some issues with some not building because they can’t find the offscreen libs).

Hopefully the JOGL folks can perhaps canonize the things I went through so it can be built more out-of-the-box on PPC hardware? (Actually, if JOGL folks are looking for a space ppc machine, I could probably slap together a lame G3 out of the parts in my garage and send it on a very cheap & slow boat, should that be useful and help the greater good.)

If you do a writeup suitable for addition to the Jogl User’s Guide and/or the HowToBuild.html I’ll be glad to integrate your changes. I’m sorry, but we do not have the resources to support a PPC Linux port of JOGL.

(Hi Ken! If you could put in a little summary along these lines, it might be of help to future PPCers.)

JOGL has been successfully built for a B&W Yosemite G4-upgraded machine, with a stock Apple ATI Rage 128 graphics card, running Ubuntu Linux (Hedgehog). The steps involved were:

  • Download JOGL sources, of course.
  • Uninstall GCJ if you have it, since otherwise everything gets higgledy-piggledy with the next step.
  • Install IBMJava2 for power-pc, availble from IBM after registering with them and also agreeing to some possibly horribly tortuous license agreement.
  • Set up GCC, if need be (e.g.: ls -s /usr/bin/gcc-4.0 /usr/bin/gcc).
  • Install X Windows development header files [e.g.: Xutil.h].
  • Make sure Mesa3D is installed for your X server.
  • Modify build.xml’s “linux” target to refer to “ppc” instead of “i386”. Although, see below regarding paths.
  • Modify StructLayout.java’s createForCurrentPlatform() to have an additional check for (os.startsWith(“linux”) && cpu.equals(“ppc”)). [The “ppc” part presumably needs to match whatever you hacked the build.xml file to use e.g.: was “i386”, modified to "ppc]. The regular StructLayout was returned, it seemed to work.
  • Update the build.xml path to libjawt.so according to wherever it is found under the IBMJava2 installation (for me, it was in jre/bin rather than jre/lib).
  • Update other paths in build.xml whenever you get compilation failures that say they cannot find files. This, of course, requires hunting around for the relevant files so you can determine the right path to them. In some cases the fix was a matter of removing the trailing “/i386” from the path [and not replacing it with ppc or anything].
  • For the Rage 128 card, force X Windows to run in 16 bit depth by editing the relevant X configuration file - look in /var/log/X* for a line telling you what config file was read. Otherwise 3D accelleration will fail.

Note that throughout the process, it appears to be important to do “ant clean linux” rather than simply “ant linux” to make sure the build errors are as accurate as possible.