[RFE] LWJGL FreeBSD support

Started by mgp, September 15, 2012, 17:54:15

Previous topic - Next topic


I've created a patch for the build system that allows building LWJGL under FreeBSD.
I'd like to ask you to review it and if you accept the proposed changes apply it to trunk.

I executed:
$ ant clean all

Then I executed:
java -cp bin -Dorg.lwjgl.util.Debug=true -Djava.library.path=libs/linux org.lwjgl.test.SysTest

I got the "Hello World!" window, my browser opened http://lwjgl.org and the contents of my clipboard was "src/java/org/lwjgl/util/Display.java" and I got the following output:
==== Test Alert ====
Opening native alert window
---- Test Alert ----

==== Test Debug ====
[LWJGL] Debug is enabled, you should now see output from LWJGL during the following tests.
[LWJGL] Xrandr extension version 1.3
[LWJGL] Using Xrandr for display mode switching
[LWJGL] XF86VidMode extension version 2.2
[LWJGL] Initial mode: 1280 x 1024 x 24 @50Hz
[LWJGL] Removed 0 duplicate displaymodes
---- Test Debug ----

==== Test Timer ====
Resolution of timer (ticks per second): 1000
Current time: 1347730730203
Sleeping for 2 seconds, using Thread.sleep()
Current time: 1347730732205
Actually slept for: 2.002 seconds
---- Test Timer ----

==== Test URL ====
Opening a browser window to http://www.lwjgl.org
---- Test URL ----

Contents of clipboard: 'src/java/org/lwjgl/util/Display.java'

Thank you.


I've tested the applet loader using the icedtea-web plugin and the JNLP extension using OpenJDK6's javaws.
Everything works just fine.

This is how the gears performed on my machine (which is quite old):
LWJGL: 2.8.4 / linux
GL_VERSION: 3.3.0 NVIDIA 295.71

glLoadTransposeMatrixfARB() supported: true
8365 frames 2 in 5.0 seconds = 1673.0
11533 frames 2 in 5.0 seconds = 2306.6
14167 frames 2 in 5.0 seconds = 2833.4
13486 frames 2 in 5.0 seconds = 2697.2
13797 frames 2 in 5.0 seconds = 2759.4


Hey guys!
Here's my older patch:


It's a bit cleaner, and introduce FreeBSD as a separate case, not as a variant of Linux.
I'll refresh patch soon, and it should came to next version :)


Does anyone have a comment to this patch, specifically the freebsd part - should it be called bsd instead? - since there are also net and open bsd variants?


The patch which discussed is latest version - you can view it here:


I'd recommend use freebsd, as I'm not sure which state other bsd have with jdk/openjdk;
I'd be glad if we introduce FreeBSD full support now, and polish it later (maybe even separate linux_ant into linux_ant ant bsd_ant).
I'll try to find some open/net/dragonfly users and ask him to try find out specifics of system.

Release earyly, release often - come on, accept patch, I'm waiting more than year :-P


hah, I'll add it soon - I just dont like using FreeBSD - I would prefer just using BSD? - since that would imply all BSDs. But I don't know if that would work or not? (I very much assume that).

Or in other words, can these binaries build on a freebsd machine be used and loaded by all other bsds ?


No, binaries and *.so are different on all of *BSD. I'm currently toying with OpenBSD, and seems that best case -
rename platform LINUX to LINUXORBSD :)
And add more platform builds (e.g separate FreeBSD from Linux, and make 3 or 4 additional platforms - FreeBSD, NetBSD, OpenBSD and maybe DragonflyBSD).
I could prepare patch for that.
DO you think it's acceptable?

I need check all native library loads under all systems, and see if it's all there the same.
(For example, OpenBSD still use /usr/X11R6, and there's no libGL.so.1, only libGL.so.12.0)

But Test Game works under OpenBSD too :)


Well Matzon, when you planning add FreeBSD support? :)


[21:37:58] <Mazon> frogs: I'll get your bsd stuff in, during the next few days - just need to get git stuff all settled
[21:44:27] <Mazon> frogs: np, might want to do github pull requests now ;)
[21:44:55] <frogs> Mazon: btw. i am not the author of that, so you should not credit me
[21:45:16] <frogs> that forum person is also not me