Jogl won't build on OS X 10.6.4

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Jogl won't build on OS X 10.6.4

Alvaro Perez Shirley
Hello, I followed the instructions for building jogl from this website but the build fails. I installed git, ant 1.8.1 (mine had 1.7.1), antlr, and when I build with ant it fails, I won't post everything that came up in the shell but the last few lines say the following:


c.build.newt.windowlib:
     [echo] Output lib name = newt
     [echo] Compiling newt
       [cc] Starting dependency analysis for 2 files.
       [cc] 1 files are up to date.
       [cc] 1 files to be recompiled from dependency analysis.
       [cc] 2 total files to be compiled.
       [cc] cc1obj: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for ObjC
       [cc] /Users/myusername/jogl/src/newt/native/MacWindow.m: In function ‘setFrameTopLeftPoint’:
       [cc] /Users/myusername/jogl/src/newt/native/MacWindow.m:82: warning: format ‘%d’ expects type ‘int’, but argument 11 has type ‘jint’
       [cc] /Users/myusername/jogl/src/newt/native/MacWindow.m:82: warning: format ‘%d’ expects type ‘int’, but argument 12 has type ‘jint’
       [cc] /Users/myusername/jogl/src/newt/native/MacWindow.m:62: warning: unused variable ‘d_ptx’
       [cc] cc1obj: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for ObjC
       [cc] /Users/myusername/jogl/src/newt/native/MacWindow.m: In function ‘setFrameTopLeftPoint’:
       [cc] /Users/myusername/jogl/src/newt/native/MacWindow.m:62: warning: unused variable ‘d_ptx’
       [cc] cc1obj: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for ObjC
       [cc] /Users/myusername/jogl/src/newt/native/NewtMacWindow.m: In function ‘-[NewtView viewDidHide]’:
       [cc] /Users/myusername/jogl/src/newt/native/NewtMacWindow.m:111: error: ‘visibleChangedID’ undeclared (first use in this function)
       [cc] /Users/myusername/jogl/src/newt/native/NewtMacWindow.m:111: error: (Each undeclared identifier is reported only once
       [cc] /Users/myusername/jogl/src/newt/native/NewtMacWindow.m:111: error: for each function it appears in.)
       [cc] /Users/myusername/jogl/src/newt/native/NewtMacWindow.m: In function ‘-[NewtView viewDidUnhide]’:
       [cc] /Users/myusername/jogl/src/newt/native/NewtMacWindow.m:117: error: ‘visibleChangedID’ undeclared (first use in this function)
       [cc] cc1obj: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for ObjC
       [cc] /Users/myusername/jogl/src/newt/native/NewtMacWindow.m: In function ‘-[NewtView viewDidHide]’:
       [cc] /Users/myusername/jogl/src/newt/native/NewtMacWindow.m:111: error: ‘visibleChangedID’ undeclared (first use in this function)
       [cc] /Users/myusername/jogl/src/newt/native/NewtMacWindow.m:111: error: (Each undeclared identifier is reported only once
       [cc] /Users/myusername/jogl/src/newt/native/NewtMacWindow.m:111: error: for each function it appears in.)
       [cc] /Users/myusername/jogl/src/newt/native/NewtMacWindow.m: In function ‘-[NewtView viewDidUnhide]’:
       [cc] /Users/myusername/jogl/src/newt/native/NewtMacWindow.m:117: error: ‘visibleChangedID’ undeclared (first use in this function)
       [cc] lipo: can't figure out the architecture type of: /var/folders/6L/6L1G1DpwFuWvgrS8-qVaRk+++TI/-Tmp-//ccf5IXQI.out


BUILD FAILED
/Users/myusername/jogl/make/build.xml:41: The following error occurred while executing this line:
/Users/myusername/jogl/make/build-newt.xml:554: The following error occurred while executing this line:
/Users/myusername/jogl/make/build-newt.xml:469: gcc failed with return code 1

By the way, I say it fails on 10.6.4 because I've tried it on two separate machines and it fails on both with the same gcc failed with return code 1 error on the same lines of the same xml.
Reply | Threaded
Open this post in threaded view
|

Re: Jogl won't build on OS X 10.6.4

gouessej
Administrator
Hi

Do you succeed in compiling JOGL 2.0 beta without NEWT?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Jogl won't build on OS X 10.6.4

Alvaro Perez Shirley
No, I don't even know how I would go about doing that.

The thing is, I'm entirely new to this, I don't know what NEWT is, or how to tell ant not to compile NEWT or anything, any help would be much appreciated.
Reply | Threaded
Open this post in threaded view
|

Re: Jogl won't build on OS X 10.6.4

gouessej
Administrator
Sven have just fixed your compilation bugs and warnings on Mac OS X, you should only have to update to head JOGL 2.0 beta and to recompile it.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Jogl won't build on OS X 10.6.4

Alvaro Perez Shirley
Thank you. I'll give that a go.
Reply | Threaded
Open this post in threaded view
|

Re: Jogl won't build on OS X 10.6.4

BrickFarmer
I have the same error after updating OSX from ant1.7 to 1.8.

warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for ObjC

I took the latest source (I'm not sure how to reference the version from git, is it the sha number?) but the date is 25th Nov.
Reply | Threaded
Open this post in threaded view
|

Re: Jogl won't build on OS X 10.6.4

Sven Gothel
Administrator
On Thursday, November 25, 2010 18:45:36 Cork [via jogamp] wrote:
>
> I have the same error after updating OSX from ant1.7 to 1.8.
>
> warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for ObjC

this is what it says it is: a warning

sorry to say, we are not warning clean 'yet' ..

but this won't be the culprit in case your JOGL build fails.

looks at our hudson build outputs (console log),
it's all the same.

>
> I took the latest source (I'm not sure how to reference the version from git, is it the sha number?) but the date is 25th Nov.

sha number, yes sir!

~Sven
Reply | Threaded
Open this post in threaded view
|

Re: Jogl won't build on OS X 10.6.4

Cork
cb83142365ddfc59fb2e494c207cba5c5a1cf3c6

here is more of the console log:

c.build:
     [echo] Output lib name = gluegen-rt
    [mkdir] Created dir: /Users/peter/jogamp/gluegen/build/obj
     [echo] Compiling src/native/macosx/*.c src/native/common/*.c
     [echo] user.dir=/Users/peter/jogamp/jogl/make
       [cc] 4 total files to be compiled.
       [cc] cc1obj: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for ObjC
       [cc] /Users/peter/jogamp/gluegen/src/native/common/Platform.c:2:17: error: jni.h: No such file or directory
       [cc] /Users/peter/jogamp/gluegen/src/native/common/Platform.c:6: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘jint’
       [cc] cc1obj: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for ObjC
       [cc] /Users/peter/jogamp/gluegen/src/native/common/Platform.c:2:17: error: jni.h: No such file or directory
       [cc] /Users/peter/jogamp/gluegen/src/native/common/Platform.c:6: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘jint’
       [cc] cc1obj: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for ObjC
       [cc] /Users/peter/jogamp/gluegen/src/native/macosx/MacOSXDynamicLinkerImpl_JNI.c:3:17: error: jni.h: No such file or directory
       [cc] /Users/peter/jogamp/gluegen/src/native/macosx/MacOSXDynamicLinkerImpl_JNI.c:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘jint’
       [cc] /Users/peter/jogamp/gluegen/src/native/macosx/MacOSXDynamicLinkerImpl_JNI.c:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘jstring’
       [cc] /Users/peter/jogamp/gluegen/src/native/macosx/MacOSXDynamicLinkerImpl_JNI.c:41: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘jlong’
       [cc] /Users/peter/jogamp/gluegen/src/native/macosx/MacOSXDynamicLinkerImpl_JNI.c:68: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘jlong’
       [cc] cc1obj: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for ObjC
       [cc] /Users/peter/jogamp/gluegen/src/native/macosx/MacOSXDynamicLinkerImpl_JNI.c:3:17: error: jni.h: No such file or directory
       [cc] /Users/peter/jogamp/gluegen/src/native/macosx/MacOSXDynamicLinkerImpl_JNI.c:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘jint’
       [cc] /Users/peter/jogamp/gluegen/src/native/macosx/MacOSXDynamicLinkerImpl_JNI.c:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘jstring’
       [cc] /Users/peter/jogamp/gluegen/src/native/macosx/MacOSXDynamicLinkerImpl_JNI.c:41: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘jlong’
       [cc] /Users/peter/jogamp/gluegen/src/native/macosx/MacOSXDynamicLinkerImpl_JNI.c:68: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘jlong’
       [cc] cc1obj: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for ObjC
       [cc] /Users/peter/jogamp/gluegen/src/native/common/PointerBuffer.c:2:17: error: jni.h: No such file or directory
       [cc] /Users/peter/jogamp/gluegen/src/native/common/PointerBuffer.c:6: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘jlong’
       [cc] cc1obj: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for ObjC
       [cc] /Users/peter/jogamp/gluegen/src/native/common/PointerBuffer.c:2:17: error: jni.h: No such file or directory
       [cc] /Users/peter/jogamp/gluegen/src/native/common/PointerBuffer.c:6: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘jlong’
       [cc] cc1obj: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for ObjC
       [cc] /Users/peter/jogamp/gluegen/src/native/common/JVM_Tool.c:40:17: error: jni.h: No such file or directory
       [cc] /Users/peter/jogamp/gluegen/src/native/common/JVM_Tool.c:42: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘jboolean’
       [cc] cc1obj: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for ObjC
       [cc] /Users/peter/jogamp/gluegen/src/native/common/JVM_Tool.c:40:17: error: jni.h: No such file or directory
       [cc] /Users/peter/jogamp/gluegen/src/native/common/JVM_Tool.c:42: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘jboolean’
       [cc] lipo: can't figure out the architecture type of: /var/folders/0f/0fc7RTvaE1yPRFlFATSQ9E+++TI/-Tmp-//ccozjue6.out
       [cc] lipo: can't figure out the architecture type of: /var/folders/0f/0fc7RTvaE1yPRFlFATSQ9E+++TI/-Tmp-//ccaWIT4w.out
       [cc] lipo: can't figure out the architecture type of: /var/folders/0f/0fc7RTvaE1yPRFlFATSQ9E+++TI/-Tmp-//cc3KZjG5.out
       [cc] lipo: can't figure out the architecture type of: /var/folders/0f/0fc7RTvaE1yPRFlFATSQ9E+++TI/-Tmp-//ccpRzXkE.out

BUILD FAILED
/Users/peter/jogamp/jogl/make/build.xml:52: The following error occurred while executing this line:
/Users/peter/jogamp/jogl/make/build-common.xml:359: The following error occurred while executing this line:
/Users/peter/jogamp/gluegen/make/build.xml:652: The following error occurred while executing this line:
/Users/peter/jogamp/gluegen/make/build.xml:397: gcc failed with return code 1
Reply | Threaded
Open this post in threaded view
|

Re: Jogl won't build on OS X 10.6.4

Sven Gothel
Administrator
On Friday, November 26, 2010 11:55:52 Cork [via jogamp] wrote:
>
> here is more of the console log:
>

and tomorrow I get the commandline, showing how you invoked it ? :)

funny guy.
however, I may give you a riddle too,
  - it can't be fat
  - was supposed to be so universal
  - in the end almost abandoned
  - only 1 arch home


the secret can be found in gluegen props.

~Sven

--
health & wealth
mailto:[hidden email] ; http://jausoft.com
land : +49 (471) 4707742 ; cell: +49 (151) 28145941
Timezone CET: PST+9, EST+6, UTC+1
Reply | Threaded
Open this post in threaded view
|

Re: Jogl won't build on OS X 10.6.4

Cork
command line: yes it was strange, 'mvn package' just didn't work until I tried 'ant' ;)

But may I suggest updating the following page:

http://jogamp.org/jogl/doc/HowToBuild.html

from:
Optional Copy and edit gluegen.properties:
to :
Copy gluegen.properties (and optionally edit):


And inside the properties file:
This file shall be copied into your home directory
to:
This file must be copied into your home directory

It wasn't clear from the console log that this might be the problem... instead of the false loading messsage, maybe a check if the file exists:

http://stackoverflow.com/questions/520546/ant-task-to-check-if-a-file-exists

Well at least I'm down to the next errors now :)

    [javac] /Users/peter/jogamp/jogl/build/nativewindow/gensrc/classes/com/jogamp/nativewindow/impl/windows/BITMAPINFOHEADER.java:9: package com.jogamp.common.os does not exist
    [javac] import com.jogamp.common.os.*;
    [javac] ^
    [javac] 100 errors

Reply | Threaded
Open this post in threaded view
|

Re: Jogl won't build on OS X 10.6.4

Sven Gothel
Administrator
On Friday, November 26, 2010 13:01:23 Cork [via jogamp] wrote:
>
> command line: yes it was strange, 'mvn package' just didn't work until I tried 'ant' ;)

you are smart then and have humor .. good :)

>
> But may I suggest updating the following page:
>
> http://jogamp.org/jogl/doc/HowToBuild.html
>
> from:
> Optional Copy and edit gluegen.properties:
> to :
> Copy gluegen.properties (and optionally edit):
>

well, good point for OSX, true.

we may change this for OSX, so gluegen.properties can stay optional, yup.

> It wasn't clear from the console log that this might be the problem... instead of the false loading messsage, maybe a check if the file exists:
>
> http://stackoverflow.com/questions/520546/ant-task-to-check-if-a-file-exists

well, we check, but it's optional :)

>
> Well at least I'm down to the next errors now :)

hehe

>
>     [javac] /Users/peter/jogamp/jogl/build/nativewindow/gensrc/classes/com/jogamp/nativewindow/impl/windows/BITMAPINFOHEADER.java:9: package com.jogamp.common.os does not exist
>     [javac] import com.jogamp.common.os.*;
>     [javac] ^
>     [javac] 100 errors

http://jogamp.org/chuck/job/jogl/236/label=macosx-10_6-x86_64/

so maybe you should use a proper gluegen build ?

~Sven
Reply | Threaded
Open this post in threaded view
|

Re: Jogl won't build on OS X 10.6.4

Cork
not smart enough it seems... :)
although I'm still trying to find my way around git.  Trying GitX now to see if it helps.

Anyway I think I'm now up-to-date with jogl and gluegen

gluegen: 2d2ae213fa207bcb01abef78cea034b66d2b4184
jogl: cb83142365ddfc59fb2e494c207cba5c5a1cf3c6

is it right to use 'master' or were you saying I should be using another labeled branch? I can see some tags, but no labels

also my jogl dir looks a bit strange, dunno if it's related but I was having a hunt for the missing 'common' package.
src/jogl/classes seems to have source? but there is no src/jogl/java

seen as you like console output so much, here a few more snips :)
...
  [javac] /Users/peter/jogamp/jogl/build/nativewindow/gensrc/classes/com/jogamp/nativewindow/impl/jawt/JAWT_DrawingSurface32.java:9: package com.jogamp.common.os does not exist
    [javac] import com.jogamp.common.os.*;
    [javac] ^
    [javac] /Users/peter/jogamp/jogl/build/nativewindow/gensrc/classes/com/jogamp/nativewindow/impl/jawt/JAWT_DrawingSurface32.java:10: package com.jogamp.common.nio does not exist
    [javac] import com.jogamp.common.nio.*;
    [javac] ^
    [javac] /Users/peter/jogamp/jogl/build/nativewindow/gensrc/classes/com/jogamp/nativewindow/impl/jawt/JAWT_DrawingSurface64.java:8: package com.jogamp.gluegen.runtime does not exist
    [javac] import com.jogamp.gluegen.runtime.*;
...
BUILD FAILED
/Users/peter/jogamp/jogl/make/build.xml:52: The following error occurred while executing this line:
/Users/peter/jogamp/jogl/make/build-nativewindow.xml:341: Compile failed; see the compiler error output for details.
Reply | Threaded
Open this post in threaded view
|

Re: Jogl won't build on OS X 10.6.4

Sven Gothel
Administrator
On Friday, November 26, 2010 15:02:57 Cork [via jogamp] wrote:

>
> not smart enough it seems... :)
> although I'm still trying to find my way around git.  Trying GitX now to see if it helps.
>
> Anyway I think I'm now up-to-date with jogl and gluegen
>
> gluegen: 2d2ae213fa207bcb01abef78cea034b66d2b4184
> jogl: cb83142365ddfc59fb2e494c207cba5c5a1cf3c6
>
> is it right to use 'master'
sure, we autobuild that one too .. besides a manual kick off on base_2_0
until it's finished.

> or were you saying I should be using another labeled branch? I can see some tags, but no labels
git has no labels but tags :)

depends on you .. I always use the latest :)

>
> also my jogl dir looks a bit strange, dunno if it's related but I was having a hunt for the missing 'common' package.
> src/jogl/classes seems to have source? but there is no src/jogl/java

that package is in gluegen Peter :)

~Sven
Reply | Threaded
Open this post in threaded view
|

Re: Jogl won't build on OS X 10.6.4

BrickFarmer
So is this a broken dependency in the jogl build?  something extra that's not mentioned in the build instructions?  I have this sinking feeling that if I can't even get the build to work, there's is not much hope of me contributing.  I've wasted quite a bit of time already :(
Reply | Threaded
Open this post in threaded view
|

Re: Jogl won't build on OS X 10.6.4

Sven Gothel
Administrator
On Saturday, November 27, 2010 17:03:00 Cork [via jogamp] wrote:
>
> So is this a broken dependency in the jogl build?  something extra that's not mentioned in the build instructions?  

If our autobuilds work, and they do follow the instructions (besides your mentioned gluegen properties issue),
it works.

jogl depends on gluegen.

if you follow the instruction, adding this gluegen.properties thingy (no fat builds),
then it should work out of the box.

can't say why your build fails, ie not picking up the gluegen-rt.jar at compile time.
try an 'ant -v' to see what happens and look out for the gluegen-rt.jar,
which actually contains the com.jogamp.common packages.

I will fix the macosx issue you pointed out - thank you.

> I have this sinking feeling that if I can't even get the build to work, there's is not much hope of me contributing.  I've wasted quite a bit of time already :(

Well, that is your opinion and would be your decicion.
You are very welcome and I will try to help you.
However, within a few email I cannot change the world with your troubled build setup.
If you still like, maybe you join us in the jabber chat channel (see contacts at jogamp.org)
and I may be able to figure out your issue.

In the mean time, please send your 'ant -v' from a fresh build attempt,
ie delete the build folder in gluegen and jogl.
Sure I assume you have the following structure:
  something/
  something/gluegen
  something/jogl

cd something/jogl/make
ant -v 2>&1 | tee make.log

and send me that make.log, thank you.

~Sven
Reply | Threaded
Open this post in threaded view
|

Re: Jogl won't build on OS X 10.6.4

BrickFarmer
BUILD SUCCESSFUL
Total time: 3 minutes 30 seconds

So, once I knew which jar was missing, I tracked it back to the gluegen build, which was failing due to the native compile, as per extra console output above... ;)  The clue was jni.h error.  Strange that after the first build this was not stopping the build (ie the gluegen fattiness or properties location made no difference in the end)

So it turns out that the latest and greatest Apple updates try to put another nail in Java's coffin by reorganizing the java install.  Apple Radar #8421130.  Even after installing the recommended 'Java developer package' the jni.h was still not being picked up.  I tracked this down to 2 places in the build scripts where I had to change from:

/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Headers
to:
/System/Library/Frameworks/JavaVM.framework/Headers

I don't know if that is the definitive fix, but at least you can add this to the 'How to build' since you might  have to support both locations for a while and it is probably going to trip more people up when they update OSX / Java.

well it was nice to visit my old friend ant at least :)


Reply | Threaded
Open this post in threaded view
|

Re: Jogl won't build on OS X 10.6.4

Sven Gothel
Administrator
On Sunday, November 28, 2010 10:42:29 Cork [via jogamp] wrote:

>
> BUILD SUCCESSFUL
> Total time: 3 minutes 30 seconds
>
> So, once I knew which jar was missing, I tracked it back to the gluegen build, which was failing due to the native compile, as per extra console output above... ;)  The clue was jni.h error.  Strange that after the first build this was not stopping the build (ie the gluegen fattiness or properties location made no difference in the end)
>
> So it turns out that the latest and greatest Apple updates try to put another nail in Java's coffin by reorganizing the java install.  Apple Radar #8421130.  Even after installing the recommended 'Java developer package' the jni.h was still not being picked up.  I tracked this down to 2 places in the build scripts where I had to change from:
>
> /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Headers
> to:
> /System/Library/Frameworks/JavaVM.framework/Headers
>
> I don't know if that is the definitive fix, but at least you can add this to the 'How to build' since you might  have to support both locations for a while and it is probably going to trip more people up when they update OSX / Java.
>
> well it was nice to visit my old friend ant at least :)

Looks like you just did the OSX upgrade fix for JOGL, thank you.

After rc2 I will update this info on the build server and repos.

Looking forward to continuing the OSX story with you.

Cheers, Sven