Skip to main content

Building Wonderland on MacOS

24 replies [Last post]
ruthkusterer
Offline
Joined: 2005-09-16

I checked out the wonderland sources on MacOS as described on https://lg3d-wonderland.dev.java.net/#building
and the build fails. I have JDK 6 installed and I also copied the latest Java3D JARs into all the /lib/ext/ directories I could find (i.e. for JDK1.5 and 1.6).

$ which java
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin//java

After running ant, I get several errors of the following kind:

[javac] ..../Wonderland/lg3d-core/src/classes/org/jdesktop/lg3d/sg/Node.java:190: cannot find symbol
[javac] symbol : variable ALLOW_PARENT_READ
[javac] location: class javax.media.j3d.Node
[javac] ALLOW_PARENT_READ = javax.media.j3d.Node.ALLOW_PARENT_READ;

I am not so certain whether the right version of Java 3D is being used by ant -- how do I find out?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Jonathan Kaplan

I've put together a wiki page on building on the Mac:
http://wiki.java.net/bin/view/Javadesktop/ProjectWonderlandMacOSX

Please look at the instructions there (particularly steps 2 and 4) and
see if that solves your problem.

wonderland@javadesktop.org wrote:
> I'm trying to build wonderland MacOS,
> building fails on lg3d-wonderland: ant run.
> some suggestions?
>
> [javac] Compiling 140 source files to /Users/phh/java6/wonderland/lg3d-wonderland/build/current/debug/classes
> [javac] /Users/phh/java6/wonderland/lg3d-wonderland/src/classes/org/jdesktop/j3d/utils/scenegraph/BranchGroupURL.java:202: cannot find symbol
> [javac] symbol : method close()
> [javac] location: class com.sun.j3d.utils.scenegraph.io.SceneGraphStreamReader
> [javac] reader.close();
> [javac] ^
> [javac] /Users/phh/java6/wonderland/lg3d-wonderland/src/classes/org/jdesktop/lg3d/wonderland/scenemanager/AssetManager.java:905: cannot find symbol
> [javac] symbol : method close()
> [javac] location: class com.sun.j3d.utils.scenegraph.io.SceneGraphStreamReader
> [javac] reader.close();
> [javac] ^
> [javac] /Users/phh/java6/wonderland/lg3d-wonderland/src/classes/org/jdesktop/j3d/utils/scenegraph/io/BranchGroupURLState.java:85: cannot find symbol
> [javac] symbol : method writeString(java.lang.String,java.io.DataOutput)
> [javac] location: class org.jdesktop.j3d.utils.scenegraph.io.BranchGroupURLState
> [javac] writeString(ic.getBaseURL().toExternalForm(), out);
> [javac] ^
> [javac] /Users/phh/java6/wonderland/lg3d-wonderland/src/classes/org/jdesktop/j3d/utils/scenegraph/io/BranchGroupURLState.java:86: cannot find symbol
> [javac] symbol : method writeString(java.lang.String,java.io.DataOutput)
> [javac] location: class org.jdesktop.j3d.utils.scenegraph.io.BranchGroupURLState
> [javac] writeString(ic.getGraphName(), out);
> [javac] ^
> [javac] /Users/phh/java6/wonderland/lg3d-wonderland/src/classes/org/jdesktop/j3d/utils/scenegraph/io/BranchGroupURLState.java:92: cannot find symbol
> [javac] symbol : method readString(java.io.DataInput)
> [javac] location: class org.jdesktop.j3d.utils.scenegraph.io.BranchGroupURLState
> [javac] String urlStr = readString(in);
> [javac] ^
> [javac] /Users/phh/java6/wonderland/lg3d-wonderland/src/classes/org/jdesktop/j3d/utils/scenegraph/io/BranchGroupURLState.java:95: cannot find symbol
> [javac] symbol : method readString(java.io.DataInput)
> [javac] location: class org.jdesktop.j3d.utils.scenegraph.io.BranchGroupURLState
> [javac] graphName = readString(in);
> [Message sent by forum member 'hedpe' (hedpe)]
>
> http://forums.java.net/jive/thread.jspa?messageID=220548
>

nsimpson
Offline
Joined: 2004-06-03

I've made a few changes to the order of the instructions, so the build and run environments are set up before you build and run Wonderland.

funakoshi
Offline
Joined: 2007-05-22

Hi,

I'v just tried Wonderland on Mac OS X.

Thanks to the information here, I could build it successfully on my Mac Mini (Intel Core Duo).
I could also run the server (ant run-sgs).
But when I run the client, org.jdesktop.lg3d.wonderland.Main crashes.
Is this the same symptom?

To compile the Wonderland, I had to modify org/jdesktop/lg3d/media/jmf/audio/joal/JOALSoundOutput.java
because Apple's JDK 1.6 does not include the required constructor PipedInputStream(PipedOutputStream, int). Is this related to my problem?

jslott
Offline
Joined: 2006-01-05

Umm... not to make this thread even longer :), but is Mac OSX Power PC supported? I get the following. Then again, there is a x86 Mac OS X target in platform-setup.xml which doesn't look special, and I can't think of a reason why it should work on x86 but on PowerPC. I looked on the LG3D forums (which is where the problem is) and found nothing. Thanks! Jordan

/Users/jordan/src/wonderland/lg3d-core% ant
Buildfile: build.xml

BUILD FAILED
/Users/jordan/src/wonderland/lg3d-core/build.xml:22: The following error occurred while executing this line:
/Users/jordan/src/wonderland/lg3d-core/build-tools/import/build-setup.xml:50: The following error occurred while executing this line:
/Users/jordan/src/wonderland/lg3d-core/build-tools/import/platform-setup.xml:111: Platform ${system.type} not supported!

Total time: 5 seconds
/Users/jordan/src/wonderland/lg3d-core% uname -a
Darwin 233.207.251.10.in-addr.arpa 8.9.0 Darwin Kernel Version 8.9.0: Thu Feb 22 20:54:07 PST 2007; root:xnu-792.17.14~1/RELEASE_PPC Power Macintosh powerpc
/Users/jordan/src/wonderland/lg3d-core%

Kirk Turner

There are some native libraries on the system that don't have the
power pc (nor 64 bit currently either) builds for them. It should be
possible to do, but I think hasn't been addressed yet.

Attempts to get Lg3d on Mac weren't given priority because Mac release
of Java 5 and 6 were lagging behind the releases from Sun - although
some community members did give it a go, and I believe have had some
success (I'm not a mac user myself so didn't pay close attention).

Kirk

hedpe
Offline
Joined: 2007-06-04

I'm trying to build wonderland MacOS,
building fails on lg3d-wonderland: ant run.
some suggestions?

[javac] Compiling 140 source files to /Users/phh/java6/wonderland/lg3d-wonderland/build/current/debug/classes
[javac] /Users/phh/java6/wonderland/lg3d-wonderland/src/classes/org/jdesktop/j3d/utils/scenegraph/BranchGroupURL.java:202: cannot find symbol
[javac] symbol : method close()
[javac] location: class com.sun.j3d.utils.scenegraph.io.SceneGraphStreamReader
[javac] reader.close();
[javac] ^
[javac] /Users/phh/java6/wonderland/lg3d-wonderland/src/classes/org/jdesktop/lg3d/wonderland/scenemanager/AssetManager.java:905: cannot find symbol
[javac] symbol : method close()
[javac] location: class com.sun.j3d.utils.scenegraph.io.SceneGraphStreamReader
[javac] reader.close();
[javac] ^
[javac] /Users/phh/java6/wonderland/lg3d-wonderland/src/classes/org/jdesktop/j3d/utils/scenegraph/io/BranchGroupURLState.java:85: cannot find symbol
[javac] symbol : method writeString(java.lang.String,java.io.DataOutput)
[javac] location: class org.jdesktop.j3d.utils.scenegraph.io.BranchGroupURLState
[javac] writeString(ic.getBaseURL().toExternalForm(), out);
[javac] ^
[javac] /Users/phh/java6/wonderland/lg3d-wonderland/src/classes/org/jdesktop/j3d/utils/scenegraph/io/BranchGroupURLState.java:86: cannot find symbol
[javac] symbol : method writeString(java.lang.String,java.io.DataOutput)
[javac] location: class org.jdesktop.j3d.utils.scenegraph.io.BranchGroupURLState
[javac] writeString(ic.getGraphName(), out);
[javac] ^
[javac] /Users/phh/java6/wonderland/lg3d-wonderland/src/classes/org/jdesktop/j3d/utils/scenegraph/io/BranchGroupURLState.java:92: cannot find symbol
[javac] symbol : method readString(java.io.DataInput)
[javac] location: class org.jdesktop.j3d.utils.scenegraph.io.BranchGroupURLState
[javac] String urlStr = readString(in);
[javac] ^
[javac] /Users/phh/java6/wonderland/lg3d-wonderland/src/classes/org/jdesktop/j3d/utils/scenegraph/io/BranchGroupURLState.java:95: cannot find symbol
[javac] symbol : method readString(java.io.DataInput)
[javac] location: class org.jdesktop.j3d.utils.scenegraph.io.BranchGroupURLState
[javac] graphName = readString(in);

rbrumby
Offline
Joined: 2007-05-25

I have the same issue on Windoze XP.
ant run-sgs is running fine but the client has exactly the same compilation errors. I'll hopefully try it on my Linux box later today and see if I can figure out what the difference is.

null

paulby
Offline
Joined: 2003-06-13

The compilation error where reader.close is not found is because you have an old version of Java 3D somewhere. We ship the latest version with Wonderland, but if you have an older version installed in your VM it will take precedence, remove the old Java 3D jars and .dll (on windows you can do this from the 'add remove programs...' tool in Control Panel and you should be good to go.

bblfish
Offline
Joined: 2003-11-26

I have checked out the latest CVS. Running ant run-sgs seems to work .
Running ant run crashes the VM:

[java] May 31, 2007 9:15:55 PM org.jdesktop.lg3d.wonderland.config.common.WonderlandConfigUtil getInputStream
[java] INFO: Loading wonderland configuration file: /Users/hjs/Programming/Wonderland/lg3d-wonderland/src/config/WonderlandClientConfig.xml
[java] Java HotSpot(TM) Client VM warning: Java HotSpot(TM) Client VM warning: Untested: Atomic::add_ptr - void in /SourceCache/HotSpot16/HotSpot16-17/src/os_cpu/macosx_i486/vm/atomic_macosx_i486.inline.hpp: 53
[java]
[java] Untested: Atomic::add_ptr - void in /SourceCache/HotSpot16/HotSpot16-17/src/os_cpu/macosx_i486/vm/atomic_macosx_i486.inline.hpp: 53
[java]

bblfish
Offline
Joined: 2003-11-26

Oops. This was the issue of commenting out the lg3d-wonderland/build.xml section

I had read the above thread too quickly and mistakenly added another one.

paulby
Offline
Joined: 2003-06-13

The system is finding the wrong version of Java3D. I think Apple ships the old version of Java 3D in a strange location. I'm not a Mac expert :-(

ruthkusterer
Offline
Joined: 2005-09-16

OK, thought so too.

The JDK6 is in /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/
I searched for the Java3D 1.5 JARs (j3dcore.jar, etc) on my harddrive, but didn't see any old copies in any other directory -- could it be the names are different? I think not?

There is also a directory
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext
containing several JARs. I added the three Java3D 1.5.1 JARs (j3dcore.jar etc) there, but no change.

There is a copy of the same three files (j3dcore.jar etc) in lg3d-wonderland/ext/macosx/ (Was it unpacked by the ant script? It's not in CVS), but they do not seem to be used. Do you know of a way to force ant (or netbeans) to prefer this library over any other older one? I tried adding the JARs' paths to the classpath, but that didn't help either. Hmm... :(

Jonathan Kaplan

The outdated Java3D libraries are in /System/Library/Java/Extensions.
If you just move or remove j3dcore.jar, j3dutils.jar, j3daudio.jar and
vecmath.jar, you will get past this build problem (you don't need to
install anything, Wonderland will use the ones in lg3d-wonderland).

Unfortunately, there are a couple of other issues on Mac OS X getting
lg3d-core to build with the proper AWT support for the Mac. I have a
fix for these issues in my workspace, which I can try to check in later
today.

While I have gotten things to build on my MacBook Pro, when I try to run
them, the JVM crashes. I'd love to know if this is just my machine, or
a Mac problem in general. In the meanwhile, I've been running under
Ubuntu Feisty on my MacBook Pro with great luck.

wonderland@javadesktop.org wrote:
> OK, thought so too.
>
> The JDK6 is in /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/
> I searched for the Java3D 1.5 JARs (j3dcore.jar, etc) on my harddrive, but didn't see any old copies in any other directory -- could it be the names are different? I think not?
>
> There is also a directory
> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext
> containing several JARs. I added the three Java3D 1.5.1 JARs (j3dcore.jar etc) there, but no change.
>
> There is a copy of the same three files (j3dcore.jar etc) in lg3d-wonderland/ext/macosx/ (Was it unpacked by the ant script? It's not in CVS), but they do not seem to be used. Do you know of a way to force ant (or netbeans) to prefer this library over any other older one? I tried adding the JARs' paths to the classpath, but that didn't help either. Hmm... :(
> [Message sent by forum member 'ruthkusterer' (ruthkusterer)]
>
> http://forums.java.net/jive/thread.jspa?messageID=217681
>

ruthkusterer
Offline
Joined: 2005-09-16

> The outdated Java3D libraries are in
> /System/Library/Java/Extensions.
> If you just move or remove j3dcore.jar, j3dutils.jar,

You are right! Strange I didn't find them when searching the harddrive (Does Spotlight skip the System folder?)

OK now this is solved and core compiles. On to the next error...
When I now run wonderland with ant run-sgs, it says that in voicelib.jar the ManagedCallStatusListener.class's version should be 49 and not 50...?

> fix for these issues in my workspace, which I can try
> to check in later today.

OK. Did you already?

> While I have gotten things to build on my MacBook
> Pro, when I try to run
> them, the JVM crashes. I'd love to know if this is
> just my machine, or a Mac problem in general.

We can try to reproduce it on my machine (MacBook Pro, too), I might also be able to try it on an Intel iMac.

> In the meanwhile, I've been running under
> Ubuntu Feisty on my MacBook Pro with great luck.

I've got Ubuntu in a virtual machine, I could try that too if I find time.

Thanks for your help! Please get back to me if you are intersted on crashtesting your ideas on another Mac (hopefully minus the crashing part). ;-)

Jonathan Kaplan

wonderland@javadesktop.org wrote:
>> The outdated Java3D libraries are in
>> /System/Library/Java/Extensions.
>> If you just move or remove j3dcore.jar, j3dutils.jar,
>>
>
> You are right! Strange I didn't find them when searching the harddrive (Does Spotlight skip the System folder?)
>
> OK now this is solved and core compiles. On to the next error...
> When I now run wonderland with ant run-sgs, it says that in voicelib.jar the ManagedCallStatusListener.class's version should be 49 and not 50...?
>
>
I think this means you are building with Java 1.5 and not Java 6. Make
sure that JAVA_HOME is set to
/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home.

>> fix for these issues in my workspace, which I can try
>> to check in later today.
>>
>
> OK. Did you already?
>
>
Checked in now -- a couple of changes in lg3d-core and lg3d-wonderland.
Try it out and let me know if you can build.

ruthkusterer
Offline
Joined: 2005-09-16

> I think this means you are building with Java 1.5 and not Java 6. Make
> sure that JAVA_HOME is set to
> /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home.

Jonathan: Aaarrrgh, thanks, yes, that was it. (I had closed the Terminal and forgot to export the paths again.)
It builds now (with warnings) and JARs are created -- but as both of you noted, it crashes when running. So it could be a general Mac problem. If you find out more, I'd be interested.
(PS: If you had replied directly to my question, I could have marked yours explicitly as helpful+correct answer.)

Funakoshi: Hm, I didn't modify JOALSoundOutput to get it to compile now, so it doesn't seem necessary.

Added a PS:
Message was edited by: ruthkusterer

paulby
Offline
Joined: 2003-06-13

The JOALSoundOutput is not used at the moment, so I'd hope thats not the cause of the crash. Did the VM log file provide any clues to where the crash occurred ?

Jonathan Kaplan

The problem seems to be with the VM using incremental GC. If you turn
it off things actually work!

To turn it off, in lg3d-wonderland/build.xml, find line 149:

And remove it or comment it out.

On my MacBook Pro, performance was quite good (it ran up to 60fps). The
only problem is that some of the textures flash or are banded looking.
Someone suggested this might be due to a lack of texture memory --
although it works fine in Linux, so I guess it isn't a hardware thing.
Thoughts?

wonderland@javadesktop.org wrote:
> The JOALSoundOutput is not used at the moment, so I'd hope thats not the cause of the crash. Did the VM log file provide any clues to where the crash occurred ?
> [Message sent by forum member 'paulby' (paulby)]
>
> http://forums.java.net/jive/thread.jspa?messageID=218593
>

ruthkusterer
Offline
Joined: 2005-09-16

When I comment out the "Xincgc" line (in both build.xmls), the running application stops (before opening any window) with the following severe messages:

$ ant run-sgs
...
Could not setup service
[java] java.lang.reflect.InvocationTargetException
[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
...
[java] Caused by: java.lang.UnsatisfiedLinkError: no db_java-4.5 in java.library.path
[java] at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1724) ...
[java] at com.sleepycat.db.internal.db_javaJNI.(db_javaJNI.java:49)

$ ant run
...
[java] INFO: Loading wonderland configuration file: /Users/yyyyy/Wonderland/lg3d-wonderland/src/config/AvatarClientConfig.xml
[java] Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: javax/media/opengl/GLException

What is this sleepycat? I know its a database, but, is it included? I don't think I have it.

Jonathan Kaplan

Sleepycat is the company behind BerkeleyDB, an embedded database used by
Darkstar.

Update lg3d-core -- I just checked in a fix to platform-setup.xml in
lg3d-core to fix a bad library path.

wonderland@javadesktop.org wrote:
> When I comment out the "Xincgc" line (in both build.xmls), the running application stops (before opening any window) with the following severe messages:
>
> $ ant run-sgs
> ...
> Could not setup service
> [java] java.lang.reflect.InvocationTargetException
> [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> ...
> [java] Caused by: java.lang.UnsatisfiedLinkError: no db_java-4.5 in java.library.path
> [java] at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1724) ...
> [java] at com.sleepycat.db.internal.db_javaJNI.(db_javaJNI.java:49)
>
> $ ant run
> ...
> [java] INFO: Loading wonderland configuration file: /Users/yyyyy/Wonderland/lg3d-wonderland/src/config/AvatarClientConfig.xml
> [java] Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: javax/media/opengl/GLException
>
> What is this sleepycat? I know its a database, but, is it included? I don't think I have it.
> [Message sent by forum member 'ruthkusterer' (ruthkusterer)]
>
> http://forums.java.net/jive/thread.jspa?messageID=218700
>

ruthkusterer
Offline
Joined: 2005-09-16

Thanks Jonathan, after the cvs update, "ant run-sgs" now succeeds and loads "children". Should it open a window or something?
When I continue with "ant run", I get a stalled java process, and:

...
[java] INFO: Loading wonderland configuration file: /Users/yyyyy/Wonderland/lg3d-wonderland/src/config/AvatarClientConfig.xml
[java] Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: javax/media/opengl/GLException
[java] at java.lang.Class.forName0(Native Method)
[java] at java.lang.Class.forName(Class.java:169)
[java] at javax.media.j3d.Pipeline$2.run(Pipeline.java:165)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at javax.media.j3d.Pipeline.createPipeline(Pipeline.java:160)
[java] at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:918)
[java] at javax.media.j3d.VirtualUniverse.(VirtualUniverse.java:280)
[java] at javax.media.j3d.NodeRetained.dirtyBoundsCache(NodeRetained.java:959)
[java] at javax.media.j3d.GroupRetained.addChild(GroupRetained.java:482)
[java] at javax.media.j3d.Group.addChild(Group.java:271)
[java] at org.jdesktop.j3d.util.collision.PhysicalSphere.(PhysicalSphere.java:93)
[java] at org.jdesktop.j3d.util.collision.PhysicalBody.createSphereSet(PhysicalBody.java:62)
[java] at org.jdesktop.lg3d.wonderland.scenemanager.AvatarControlBehavior.initPhysics(AvatarControlBehavior.java:199)
[java] at org.jdesktop.lg3d.wonderland.scenemanager.AvatarControlBehavior.(AvatarControlBehavior.java:96)
[java] at org.jdesktop.lg3d.wonderland.scenemanager.AvatarControlBehavior.getAvatarControlBehavior(AvatarControlBehavior.java:136)
[java] at org.jdesktop.lg3d.wonderland.Main.(Main.java:270)
[java] at org.jdesktop.lg3d.wonderland.Main$27.run(Main.java:825)
[java] at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
[java] at java.awt.EventQueue.dispatchEvent(EventQueue.java:598)
[java] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:300)
[java] at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:210)
[java] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:200)
[java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:195)
[java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:187)
[java] at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

Is that the AWT problem on MacOS you were referring to? How did you solve it? (I have an intel macbook pro too).

paulby
Offline
Joined: 2003-06-13

It looks like the system can't find jogl, which is used as the render pipeline on the Mac.

Jonathan Kaplan

It looks like the run-sgs target is working fine (it starts the server,
no Windows expected). The "ant run" target should launch the client. If
you do "ant -v run", it will print out the classpath information.
Somewhere in the long printout, you should find something like:

/Users/jkaplan/proj/wonderland/lg3d-wonderland/ext/macosx/jars/jogl.jar

Make sure that file is in the classpath and that it exists in the right
location. You might try "ant scrub" followed by "ant run-sgs" and then
"ant-run" to re-expand all the included files. Also make sure you don't
have jogl installed anywhere else (like in the extensions directory).

wonderland@javadesktop.org wrote:
> It looks like the system can't find jogl, which is used as the render pipeline on the Mac.
> [Message sent by forum member 'paulby' (paulby)]
>
> http://forums.java.net/jive/thread.jspa?messageID=218777
>

ruthkusterer
Offline
Joined: 2005-09-16

(Seems I didn't hit send on my reply.)

I used find / -name "jogl.jar" -print but didn't see any other jogl.jar.

I just noticed the following:
[java] CoreGraphics server version 258.61 not compatible with client version 258.75; log out or reboot needed

I will do that and try again...