Linux/PPC support

Started by dobbs, August 17, 2011, 23:59:28

Previous topic - Next topic

dobbs

It would be nice for us PPC Linux users if we could build LWJGL for our systems. ;)

Matzon

I think you'd need to build it yourself and supply patch. We dont have the hardware for it.

dobbs

Hmm.  I've been trying that, but the ant script refuses to accept that a PPC is running anything but OSX, even when told explicitly to build for Linux.  I have gone so far as to edit the script by hand, but I am not at all familiar with ant scripts.

Do you not test PowerPC Mac OS X either?  I use my Apple laptop for both operating systems; I could provide testing by proxy if necessary.

kappa

PowerPC Mac's were pretty common before (especially when lwjgl was written) so that area has been well tested. However these days its just another compiler target. Since there's no new JRE's or OS X's for PPC, (Java 1.5 and OS X 1.5 were the last ones) not much testing has been required lately.

Besides Apple have dropped all support for PPC (and now even begun phasing out the 32bit arch). So the PPC market share will get smaller and smaller. I guess LWJGL will support it for as long as possible but at the rate Apple is changing stuff I assume at some point the PPC builds will have to be dropped.

What you probably want to do to get Linux/PPC working is change the linux ant build file to get the compiler to create PPC natives (should be similar to how 32bit and 64bit arch's are targeted), then you'll also have to change LWJGL's Sys class to load PPC linux natives when it detects that arch. Other than that don't think there is much else you need to do to LWJGL to get it to work on PPC/Linux.

dobbs

QuoteBesides Apple have dropped all support for PPC (and now even begun phasing out the 32bit arch). So the PPC market share will get smaller and smaller. I guess LWJGL will support it for as long as possible but at the rate Apple is changing stuff I assume at some point the PPC builds will have to be dropped.

Yeah, that's why I keep Linux on my laptop as well.  It's a perfectly good laptop, and I don't have enough reason to buy a new one.  I like to think Linux/PPC will become more popular as programs start requiring OSX 10.6 and leave PPC users with no alternative but to find a new system, but that's really not based in reality.

Quote from: kappaWhat you probably want to do to get Linux/PPC working is change the linux ant build file to get the compiler to create PPC natives (should be similar to how 32bit and 64bit arch's are targeted), then you'll also have to change LWJGL's Sys class to load PPC linux natives when it detects that arch. Other than that don't think there is much else you need to do to LWJGL to get it to work on PPC/Linux.

Actually, I was wrong about the Ant system detection.  It is detecting and trying to build for 32 bit linux, but the build fails to find jinput and the AppleJavaExtensions.  The Apple extensions contain symbols with OSX-like names -- I'm easily confused. ;)

After specifying where to find the missing jars with ant -lib, it now fails with:
    [apply] unknown-linux-gnu/4.4.5/../../../../powerpc-unknown-linux-gnu/bin/ld: cannot find -ljawt
    [apply] collect2: ld returned 1 exit status

I have libjawt.so (in a few places; I have more than one JDK on here), but specifying LDPATH (or LD_LIBRARY_PATH) doesn't help.  Symbolic linking the preferred JDK's libjawt.so into /usr/lib lets it find the jawt library, but then ld fails to find libXxf86vm.so, which is already in /usr/lib.

Does this even have a possibility of producing a viable library, or would endian differences completely bork it?