Fail to compile gluegen-v2.0-rc2 ...

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

Fail to compile gluegen-v2.0-rc2 ...

jiapei100

Hi,

I failed to compile gluegen-v2.0-rc2 ...


1) Environment:
Windows7 + Eclipse Helios Service Release 2 + JDK 1.6.0_24 .

2) Errors:
...\Eclipse\gluegen\make\build.xml:666: The following error occurred while executing this line:
...\Eclipse\gluegen\make\build-test.xml:91: taskdef A class needed by class com.jogamp.gluegen.ant.GlueGenTask cannot be found: Task
which actually points to around line 90 of file build-test.xml:
       
        <taskdef name="gluegen" classname="com.jogamp.gluegen.ant.GlueGenTask"
                 classpathref="gluegen.classpath" />

It seems to tell that I'm short of the following definitions:
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.DirectoryScanner;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.taskdefs.Execute;
import org.apache.tools.ant.taskdefs.LogStreamHandler;
import org.apache.tools.ant.types.CommandlineJava;
import org.apache.tools.ant.types.DirSet;
import org.apache.tools.ant.types.FileSet;
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.types.PatternSet;
import org.apache.tools.ant.types.Reference;
import org.apache.tools.ant.util.JavaEnvUtils;

Well, I'm using apache-ant-1.8.2. So, besides, ant.jar, anything else I need to added to my project?

Cheers
Pei
Welcome to Vision Open http://www.visionopen.com
Reply | Threaded
Open this post in threaded view
|

Re: Fail to compile gluegen-v2.0-rc2 ...

Wade Walker
Administrator
Hi Pei,

Have you tried the instructions at http://jogamp.org/wiki/index.php/Building_JOGL_on_the_command_line and http://jogamp.org/wiki/index.php/Building_JOGL_in_Eclipse? They should have all the details about how to set up the build and its dependencies. Let me know if you've found an oversight in the instructions and I'll fix it immediately.


Reply | Threaded
Open this post in threaded view
|

Re: Fail to compile gluegen-v2.0-rc2 ...

jiapei100
Hi Walker:

Several questions to ask, please do help !!

1) Sorry, stupid me. How does ant work? Is it possible for me to specify gcc when running ant? I followed your suggestion and I met the following problem at first:
 Could not launch gcc: java.io.IOException: Cannot run program "gcc"
It looks that if jogl is not put under the same folder as gluegen, to build gluegen will always produce the above quoted problem?

2) What if I remove the default antlr in gluegen/make/lib, and specify my own antlr in file gluegen/make/gluegen.properties ? I did this by specifying
antlr.jar=C:/packages/jars/antlr-3.3-complete.jar
, which continuously brought me the following errors:
BUILD FAILED
C:\Users\peij\MyPrograms\Java\Eclipse\gluegen\make\build.xml:535: The following
error occurred while executing this line:
C:\Users\peij\MyPrograms\Java\Eclipse\gluegen\make\build.xml:142: ANTLR returned
: 1
3) Let me put the default antlr back in folder gluegen/make/lib, I can successfully build gluegen under Cygwin. However, jogl continued to be unable to be built successfully.
BUILD FAILED
C:\Users\peij\MyPrograms\Java\Eclipse\jogl\make\build.xml:69: The following error occurred while executing this line:
C:\Users\peij\MyPrograms\Java\Eclipse\jogl\make\build-nativewindow.xml:319: Compile failed; see the compiler error output for details.

By the way, Walker, did u successfully build gluegen and jogl under Windows 7? If so, how, please?
How can I specify my own junit and antlr-3.3, without letting the build fail again and again?

Thank you very much.
Pei
Welcome to Vision Open http://www.visionopen.com
Reply | Threaded
Open this post in threaded view
|

Re: Fail to compile gluegen-v2.0-rc2 ...

Wade Walker
Administrator
jiapei100 wrote
 Could not launch gcc: java.io.IOException: Cannot run program "gcc"
It looks that if jogl is not put under the same folder as gluegen, to build gluegen will always produce the above quoted problem?
Yes, the instructions at http://jogamp.org/wiki/index.php/Building_JOGL_on_the_command_line#Pull_the_JOGL_source_code_from_GitHub say that gluegen and jogl must be side by side in the same folder or it won't work.

jiapei100 wrote
2) What if I remove the default antlr in gluegen/make/lib, and specify my own antlr in file gluegen/make/gluegen.properties ? I did this by specifying
antlr.jar=C:/packages/jars/antlr-3.3-complete.jar
, which continuously brought me the following errors:
BUILD FAILED
C:\Users\peij\MyPrograms\Java\Eclipse\gluegen\make\build.xml:535: The following
error occurred while executing this line:
C:\Users\peij\MyPrograms\Java\Eclipse\gluegen\make\build.xml:142: ANTLR returned
: 1
This won't work because the ANTLR grammar file syntax changed between ANTLR version 2.7.x and 3.0. We would have to change gluegen's ANTLR grammar to the new 3.0 syntax to make this work.

jiapei100 wrote
3) Let me put the default antlr back in folder gluegen/make/lib, I can successfully build gluegen under Cygwin. However, jogl continued to be unable to be built successfully.
BUILD FAILED
C:\Users\peij\MyPrograms\Java\Eclipse\jogl\make\build.xml:69: The following error occurred while executing this line:
C:\Users\peij\MyPrograms\Java\Eclipse\jogl\make\build-nativewindow.xml:319: Compile failed; see the compiler error output for details.
This is probably due to some error in your environment setup. Are you following the instructions at http://jogamp.org/wiki/index.php/Building_JOGL_on_the_command_line exactly, in every detail? You can build with "ant -v" to get more information on this failure.

jiapei100 wrote
By the way, Walker, did u successfully build gluegen and jogl under Windows 7? If so, how, please?
I do what's in the instructions at http://jogamp.org/wiki/index.php/Building_JOGL_on_the_command_line, and it works fine. It sounds like you're trying to change the build in unusual ways. I would advise trying it according to the instructions at least once  Then, once you're sure it works, try altering the build.

jiapei100 wrote
How can I specify my own junit and antlr-3.3, without letting the build fail again and again?
As mentioned above, you can't use ANTLR 3.0+ unless you upgrade the syntax of gluegen's grammar.
Reply | Threaded
Open this post in threaded view
|

Re: Fail to compile gluegen-v2.0-rc2 ...

jiapei100

Hi, Walker:

Thank you very much for your kind assists.
I can successfully build gluegen and jogl from a command Windows now.
However, there are always two red-crosses on the project gluegen, within Eclipse 3.6.2 IDE.
The two red-crosses seem to point to gluegen-cpptasks-base.xml and gluegen-cpptasks-custom.xml . Why is it so? How can I correctly specify cpptasks directories?

I noticed the last line of file gluegen.properties is:
gluegen-cpptasks.file="${user.home}/gluegen-cpptasks-linux-32bit.xml"
, how to modify it to ensure the two red-crosses just disappear from within Eclipse IDE?



By the way, there seems to be some simple errors for jogl-demos, such as
1) change  
input.init(gl);
 to
input.init();
.
2)
ImmModeSink vbo = ImmModeSink.createFixed(GL.GL_STATIC_DRAW, 10,
                3, GL.GL_FLOAT,  // vertex
                4, GL.GL_FLOAT,  // color
                0, GL.GL_FLOAT,  // normal
                0, GL.GL_FLOAT); // texture
to
ImmModeSink vbo = ImmModeSink.createFixed(gl, GL.GL_STATIC_DRAW, 10,
                3, GL.GL_FLOAT,  // vertex
                4, GL.GL_FLOAT,  // color
                0, GL.GL_FLOAT,  // normal
                0, GL.GL_FLOAT); // texture
etc.

But, I still have a lot of error messages in
jogl-demos/javabullet.demos.opengl ...
None of the four files under jogl-demos/javabullet.demos.opengl can be compiled till now.

Can you please help to update jogl-demos at your convenience?

Best Regards
Pei
Welcome to Vision Open http://www.visionopen.com
Reply | Threaded
Open this post in threaded view
|

Re: Fail to compile gluegen-v2.0-rc2 ...

Wade Walker
Administrator
Hi Pei,

I'm glad to hear that gluegen and jogl are building for you now

jiapei100 wrote
However, there are always two red-crosses on the project gluegen, within Eclipse 3.6.2 IDE.
The two red-crosses seem to point to gluegen-cpptasks-base.xml and gluegen-cpptasks-custom.xml . Why is it so? How can I correctly specify cpptasks directories?
I think these are due to the fact that Eclipse assumes that build XML files are in the project root, so it doesn't know how to find JOGL's XML files, which are all down in the make directory. There may be some way to fix this, but I haven't looked for one yet.

Right now, I just close the XML build files in Eclipse, then delete those errors from the Problems view. As long as you don't open the XML build files in an Eclipse editor, the errors won't reappear.

jiapei100 wrote
By the way, there seems to be some simple errors for jogl-demos, such as
...
But, I still have a lot of error messages in
jogl-demos/javabullet.demos.opengl ...
None of the four files under jogl-demos/javabullet.demos.opengl can be compiled till now.

Can you please help to update jogl-demos at your convenience?
Those, I'm not sure about. I haven't tried building the JOGL demos yet.
Reply | Threaded
Open this post in threaded view
|

Re: Fail to compile gluegen-v2.0-rc2 ...

jiapei100

Problem again....
I'm using today's git clone, say, git clone of May 26, 2011.
I successfully built gluegen and jogl under Ubuntu 11.04 . But now I'm using Windows7. Things might be a little bit different.

1)
If using DOS Prompt, I got the following errors:
BUILD FAILED
...\Java\Eclipse\gluegen\make\build.xml:623: The following
error occurred while executing this line:
...\Java\Eclipse\gluegen\make\build.xml:404: Could not laun
ch gcc: java.io.IOException: Cannot run program "gcc" (in directory "
...\Java\Eclipse\gluegen\build\obj"): CreateProcess error=5, Access is
 denied
2) If build from within Cygwin, in order to use "gcc", I got errors like:
BUILD FAILED
...\Java\Eclipse\gluegen\make\build.xml:679: The following
error occurred while executing this line:
...\Java\Eclipse\gluegen\make\build-test.xml:203: The follo
wing error occurred while executing this line:
...\Java\Eclipse\gluegen\make\build-test.xml:323: The follo
wing error occurred while executing this line:
...\Java\Eclipse\gluegen\make\build-test.xml:164: Could not
 launch gcc: java.io.IOException: Cannot run program "gcc" (in directory
"...\Java\Eclipse\gluegen\build\test\build\obj"): CreateProcess er
ror=5, Access is denied
I'm pretty sure that I put gluegen and jogl under the same folder. What should I do to successfully build jogl and gluegen under Windows7?

Rgds
Pei
Welcome to Vision Open http://www.visionopen.com
Reply | Threaded
Open this post in threaded view
|

Re: Fail to compile gluegen-v2.0-rc2 ...

Michael Bien
  On 05/26/2011 09:14 PM, jiapei100 [via jogamp] wrote:
>
>> ...\Java\Eclipse\gluegen\make\build.xml:404: Could not laun
>> ch gcc: java.io.IOException: Cannot run program "gcc" (in directory "
>> ...\Java\Eclipse\gluegen\build\obj"): CreateProcess error=5, Access is
>>   denied
looks like a user/access rights issue to me.

-michael

--
http://michael-bien.com/

Reply | Threaded
Open this post in threaded view
|

Re: Fail to compile gluegen-v2.0-rc2 ...

jiapei100

Thanks Michael, but I guess it's because of this:
http://forum.visionopen.com/viewtopic.php?f=27&t=5826

Cygwin's symbolic link, instead of the .exe file .

Is it possible that I don't use gcc to compile the native and specify my own C compiler?

Best Regards
Pei

Welcome to Vision Open http://www.visionopen.com
Reply | Threaded
Open this post in threaded view
|

Re: Fail to compile gluegen-v2.0-rc2 ...

elect
Hi,

I also cant build jogl. Im stuck on building gluegen. I successfully built it but I still get some errors on ant imports such as

import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.DirectoryScanner;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.taskdefs.Execute;
import org.apache.tools.ant.taskdefs.LogStreamHandler;
import org.apache.tools.ant.types.AbstractFileSet;
import org.apache.tools.ant.types.CommandlineJava;
import org.apache.tools.ant.types.DirSet;
import org.apache.tools.ant.types.FileSet;
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.types.PatternSet;
import org.apache.tools.ant.types.Reference;
import org.apache.tools.ant.util.JavaEnvUtils;

My conf is win 7 64b, Netbeans 8, Jdk 7 x64

If I have Netbeans I should have Ant as well... but I am not sure I can locate it

This is where I think is ant inside Netbeans



I added
- C:\Program Files\NetBeans 8.0\extide\ant to ANT_HOME
- C:\Program Files\NetBeans 8.0\extide\ant\bin to PATH

But as I said, all the ant import inside gluegen are still missing
Reply | Threaded
Open this post in threaded view
|

Re: Fail to compile gluegen-v2.0-rc2 ...

gouessej
Administrator
You might need to add ant/lib/ant.jar to your classpath to remove the errors on Ant imports.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Fail to compile gluegen-v2.0-rc2 ...

elect
gouessej wrote
You might need to add ant/lib/ant.jar to your classpath to remove the errors on Ant imports.
Thanks, it helped.

I still have some errors, especially in the class

cannot find symbol
  symbol:   variable UnsafeAccess
  location: class com.jogamp.gluegen.runtime.BufferFactoryInternal

I see I have an

import sun.misc.Unsafe;

Although it says "Unsafe is internal proprietary API and may be removed in a future release", if I substitute

UnsafeAccess.getUnsafe().objectFieldOffset(f);

with

Unsafe.getUnsafe().objectFieldOffset(f);

I dont get the error anymore..

Anyway I had a lot of errors also in ActivityLauncher, package jogamp.android.launcher;

I downloaded and added this http://www.java2s.com/Code/Jar/a/Downloadandroid231jar.htm


However, still tons of errors in test/junit, build/test and src/junit... I am gonna give up, it doesnt really matter since the build goes fine..
Reply | Threaded
Open this post in threaded view
|

Re: Fail to compile gluegen-v2.0-rc2 ...

gouessej
Administrator
You have to go to Tools -> Options -> Editors -> Hints but I don't remember which warning I had to disable.

You have to install the Android SDK properly too.
Julien Gouesse | Personal blog | Website