Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (494)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Compiling JOGL on OSX  (Read 3268 times)
0 Members and 1 Guest are viewing this topic.
Offline abegel

Senior Newbie




Java games rock!


« Posted 2003-08-09 05:35:16 »

I've tried to compile JOGL on OSX (10.3) and I've run into big problems. I've got ant and antlr installed, but when I do
ant macosx
It runs through all the build steps but fails java.generate:
java.generate.check:

java.generate:
 [gluegen] Exception in thread "main" java.lang.NoClassDefFoundError: antlr/TokenStreamException

BUILD FAILED
file:/Volumes/Tsimmes/Users/abegel/Developer/eandl/jogl/make/build.xml:524: GlueGen returned: 1

I've set antlr.jar variable in host.properties to the antlrall.jar from the antlr-2.7.2 download (antlr.jar didn't work) and antlr successfully ran on a few things, but then fails here. I've verified that antlrall.jar does have antlr.TokenStreamException.class in it.
I'm using ant 1.5.3 that I built from source.

What can I do? I've tried using the prebuilt jogl.jar file from july 17, but that doesn't work on my system (gives the following error on the first paint call:

java.lang.IndexOutOfBoundsException: 0
       at java.nio.DirectIntBufferU.get(DirectIntBufferU.java:196)
       at net.java.games.gluegen.runtime.StructAccessor.getIntAt(StructAccessor.java:118)
       at net.java.games.jogl.impl.macosx.JAWT_MacOSXDrawingSurfaceInfo.cocoaWindowRef(JAWT_MacOSXDrawingSurfaceInfo.java:63)
       at net.java.games.jogl.impl.macosx.MacOSXOnscreenGLContext.lockSurface(MacOSXOnscreenGLContext.java:233)
       at net.java.games.jogl.impl.macosx.MacOSXOnscreenGLContext.makeCurrent(MacOSXOnscreenGLContext.java:134)
       at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:153)
       at net.java.games.jogl.impl.macosx.MacOSXOnscreenGLContext.invokeGL(MacOSXOnscreenGLContext.java:73)
       at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:179)
       at net.java.games.jogl.GLCanvas.paint(GLCanvas.java:92)
       at sun.awt.RepaintArea.paint(RepaintArea.java:177)
       at apple.awt.ContainerModel.paintDamagedArea(ContainerModel.java:105)
       at apple.awt.PeerPaintEvent.dispatch(PeerPaintEvent.java:172)
       at apple.awt.CocoaEvent$1.run(CocoaEvent.java:86)
       at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
       at apple.awt.CocoaEvent.dispatch(CocoaEvent.java:45)
       at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
       at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:230)
       at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:183)
       at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
       at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
       at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)

Thanks

Andy
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #1 - Posted 2003-08-09 06:28:32 »

The first error is similar to ones I've seen where antlr.jar was placed in the Extensions directory instead of having the property antlr.jar point to it. There is another thread on OS X build problems which discusses this in detail. Basically if you have ANTLR in your Extensions directory, remove it.

I can't think of why you would be getting that exception with the binaries that have been posted. I am pretty sure the binaries work fine for others on 10.3 DP1. My installation isn't exactly identical to that but should be close enough and things work OK here. Make sure you have cleaned out any old versions, etc. For example, I have had no problems building with the antlr.jar from the 2.7.2 distribution as opposed to antlrall.jar.
Offline abegel

Senior Newbie




Java games rock!


« Reply #2 - Posted 2003-08-09 06:38:51 »

Nope, it's not in my /Library/Java/Extensions folder. It's in /usr/local/pkg/antlr-2.7.2/share/antlr-2.7.2/antlr.jar.

I did try downloading the JOGL build from July 2 and that works for me. I think the telltale sign here is the reference to cocoaWindowRef() which doesn't exist in OSX 10.3's jawt_md.h file (replaced by cocoaViewRef()). Maybe the july 17th build was a half-hearted attempt at OSX 10.2 compatiblity?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline gregorypierce

Senior Member




I come upon thee like the blue screen of death....


« Reply #3 - Posted 2003-08-09 14:26:04 »

There has been as of yet no real attempt at 10.2 compatibility.

http://www.gregorypierce.com

She builds, she builds oh man
When she links, she links I go crazy
Cause she looks like good code but she's really a hack
I think I'll run upstairs and grab a snack!
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #4 - Posted 2003-08-09 14:35:35 »

Quote
I did try downloading the JOGL build from July 2 and that works for me. I think the telltale sign here is the reference to cocoaWindowRef() which doesn't exist in OSX 10.3's jawt_md.h file (replaced by cocoaViewRef()). Maybe the july 17th build was a half-hearted attempt at OSX 10.2 compatiblity?


No, there is not and has never been a reference to the cocoaWindowRef member of that structure in the JOGL code. Some of the line numbers in that stack trace are also wrong. It looks like it was typed in manually rather than cut-and-pasted in. Is is possible that this is the case?
Offline abegel

Senior Newbie




Java games rock!


« Reply #5 - Posted 2003-08-11 05:33:27 »

The stack trace was cut and pasted in, no alterations were made.

If you download the July 17th build from the File Sharing section of this website and run javap -c on net.java.games.jogl.impl.macosx.JAWT_MacOSXDrawingSurfaceInfo, you'll see a cocoaWindowRef() method.

Compiled from JAWT_MacOSXDrawingSurfaceInfo.java
public class net.java.games.jogl.impl.macosx.JAWT_MacOSXDrawingSurfaceInfo extends java.lang.Object {
   public static int size();
   public net.java.games.jogl.impl.macosx.JAWT_MacOSXDrawingSurfaceInfo();
   public net.java.games.jogl.impl.macosx.JAWT_MacOSXDrawingSurfaceInfo(java.nio.ByteBuffer);
   public java.nio.ByteBuffer getBuffer();
   public net.java.games.jogl.impl.macosx.JAWT_MacOSXDrawingSurfaceInfo cocoaViewRef(long);
   public long cocoaViewRef();
   public net.java.games.jogl.impl.macosx.JAWT_MacOSXDrawingSurfaceInfo cocoaWindowRef(long);
   public long cocoaWindowRef();
   public net.java.games.jogl.impl.macosx.JAWT_MacOSXDrawingSurfaceInfo cgContextRef(long);
   public long cgContextRef();
}

Granted, there's also a cocoaViewRef() method.
And, if you disassemble the net.java.games.jogl.impl.macosx.MacOSXOnscreenGLContext class, the lockSurface() method calls cocoaViewRef(), not cocoaWindowRef(). So, I can't explain what's going on. All I know is that my error is quite repeatable.

There's no other jogl in my CLASSPATH and none in /Library/Java/Extensions.

Perhaps someone could post a more up-to-date build, and perhaps this problem might go away?

Thanks.

Andy
Offline gregorypierce

Senior Member




I come upon thee like the blue screen of death....


« Reply #6 - Posted 2003-08-11 20:09:56 »

I can build mine again and post it later, but there have been no relevant CVS changes to the precompiled OSX binaries that are already on the site. If you're using 10.3 (what release are you using?), it builds right from the source - with all its antlr madness.

http://www.gregorypierce.com

She builds, she builds oh man
When she links, she links I go crazy
Cause she looks like good code but she's really a hack
I think I'll run upstairs and grab a snack!
Offline abegel

Senior Newbie




Java games rock!


« Reply #7 - Posted 2003-08-11 20:16:18 »

Thanks for posting a new build, even if there's no real changes.
I tried compiling JOGL myself, but ran into the problem listed in my first message in this thread (that was unresolved by the helpful suggestions of the other replies). I'm less than amazed by ant, esp. re: classloaders and separating different java programs in the same JVM image (which is obviously where I'm having problems).
Offline gregorypierce

Senior Member




I come upon thee like the blue screen of death....


« Reply #8 - Posted 2003-08-11 23:21:46 »

Well the problem you're describing doesn't sound like it has anything do do with ant per say, as others seem to be able to check out of CVS and run everything just fine. What build of 10.3 are you using? Also let me know if your email address is correct and I will email you there as I don't want to put a non official jogl build on the jogl site since no new features are going in or anything.

http://www.gregorypierce.com

She builds, she builds oh man
When she links, she links I go crazy
Cause she looks like good code but she's really a hack
I think I'll run upstairs and grab a snack!
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #9 - Posted 2003-08-24 05:28:28 »

FYI, the JOGL source tree has been updated to work with the most recent 10.3 build. I have heard that there is a plan to release that Java (and current JAWT) on 10.2; if that happens then JOGL will work on 10.2 after you run Software Update. It turns out your antlr.TokenStreamException problem was happening because you didn't modify host.properties. I keep forgetting to do that myself so I've changed how the build process finds that file; see doc/HowToBuild.html for the revised info on jogl.properties.

At this point I should be able to produce new binaries on all platforms soon, possibly by tomorrow night.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #10 - Posted 2003-08-24 15:26:18 »

Quote
I have heard that there is a plan to release that Java (and current JAWT) on 10.2; if that happens then JOGL will work on 10.2 after you run Software Update.

That would be great!  More for the consumer than the developer. Since most developers keep up to date with the latest OS releases, but consumers can often lag behind considerably  (There are still Mac users using OS 9 !! And some of them prefer it!)

Offline gregorypierce

Senior Member




I come upon thee like the blue screen of death....


« Reply #11 - Posted 2003-08-24 18:26:38 »

Yeah, but they all have machines slower than my cellphone so it doesn't matter all that much Smiley

http://www.gregorypierce.com

She builds, she builds oh man
When she links, she links I go crazy
Cause she looks like good code but she's really a hack
I think I'll run upstairs and grab a snack!
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #12 - Posted 2003-08-25 02:30:24 »

Maybe so.. but I recall that I first played Quake 1 on a 90 MHz Pentium I, with a software renderer.

Of course Java running on a machine over 20 times faster still can't handle that... sigh.. (software per-pixel rendering and Java will never be friends with the bounds checking overhead when accessing bitmaps pixel by pixel)

but with hardware 3D... even a lowly 350MHz machine should be decent for very many games done with Java..

I think of the old Amigas running at around 4MHz.. it was the fancy hardware that made the games so impressive (e.g. Shadow of the Beast)..

So Java + OpenGL should yield some pretty fun stuff, but somehow computing power seems to disappear these days..  The machines are hundreds of times faster than some old box like an Amiga.. yet the games are nowhere near 100 times more impressive.  Wherever all that computing power is going is sort of a mystery Smiley.

Maybe that cell phone needs a video out jack.. then it can serve as the next console too Wink

Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #13 - Posted 2003-08-25 03:57:05 »

Quote
Wherever all that computing power is going is sort of a mystery

Abstraction layers, Eyecandy and last but not least: smaller time to market which yields unoptimized code.

Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #14 - Posted 2003-08-25 11:37:53 »

yeah yeah... I sort of know where it's going.. yet all those layers still seem to be taking more than their fair share of CPU power.

I think we need  a new law to counter Moore's law...  actual CPU speed may double every X months, but perceived CPU power moves at a much slower rate Smiley

Now if games these days actually played like this:
http://www.vividimage.co.uk/ActorDemo.htm
Then I would be impressed Smiley.

Offline gregorypierce

Senior Member




I come upon thee like the blue screen of death....


« Reply #15 - Posted 2003-08-25 22:41:00 »

Quote
Maybe so.. but I recall that I first played Quake 1 on a 90 MHz Pentium I, with a software renderer.

Of course Java running on a machine over 20 times faster still can't handle that... sigh.. (software per-pixel rendering and Java will never be friends with the bounds checking overhead when accessing bitmaps pixel by pixel)

but with hardware 3D... even a lowly 350MHz machine should be decent for very many games done with Java..

I think of the old Amigas running at around 4MHz.. it was the fancy hardware that made the games so impressive (e.g. Shadow of the Beast)..

So Java + OpenGL should yield some pretty fun stuff, but somehow computing power seems to disappear these days..  The machines are hundreds of times faster than some old box like an Amiga.. yet the games are nowhere near 100 times more impressive.  Wherever all that computing power is going is sort of a mystery Smiley.

Maybe that cell phone needs a video out jack.. then it can serve as the next console too Wink


Be careful what you ask for - it may end up in the PSP Smiley

In terms of games being 100 times more impressive, its like saying that movies aren't 100 times more impressive. Games don't get more impressive with technology IMO and I feel that the reliance on technology to make games impressive is what has game development in the rut its in now. I've played games with nasty graphics that are more fun that the more impressive wonders out there. Knights of the old republic for all its graphical coolness is actually not at the height of graphics rendering - but damn if it isn't more fun that other games that look a lot bette Smiley

http://www.gregorypierce.com

She builds, she builds oh man
When she links, she links I go crazy
Cause she looks like good code but she's really a hack
I think I'll run upstairs and grab a snack!
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Dwinin (22 views)
2014-09-12 09:08:26

Norakomi (55 views)
2014-09-10 13:57:51

TehJavaDev (68 views)
2014-09-10 06:39:09

Tekkerue (33 views)
2014-09-09 02:24:56

mitcheeb (55 views)
2014-09-08 06:06:29

BurntPizza (39 views)
2014-09-07 01:13:42

Longarmx (24 views)
2014-09-07 01:12:14

Longarmx (30 views)
2014-09-07 01:11:22

Longarmx (30 views)
2014-09-07 01:10:19

mitcheeb (37 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!