Compilation failure on FreeBSD amd64 (eclipse swt packages not installed?)

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Compilation failure on FreeBSD amd64 (eclipse swt packages not installed?)

jerron
Lo, just tried to compile ced1a4c644483ad5bfd28ca2bb6a5ffc030b9f1d (from git://github.com/sgothel/jogl.git)
and got the following:

java.compile.javase:
    [javac] Compiling 109 source files to /storage/home/j/git-ext/jogamp/jogl/build/nativewindow/classes
    [javac] /storage/home/j/git-ext/jogamp/jogl/src/nativewindow/classes/jogamp/nativewindow/swt/SWTAccessor.java:34: package org.eclipse.swt.graphics does not exist
    [javac] import org.eclipse.swt.graphics.GCData;
    [javac]                                ^
    [javac] /storage/home/j/git-ext/jogamp/jogl/src/nativewindow/classes/jogamp/nativewindow/swt/SWTAccessor.java:35: package org.eclipse.swt.widgets does not exist
    [javac] import org.eclipse.swt.widgets.Control;
    [javac]                               ^
    [javac] /storage/home/j/git-ext/jogamp/jogl/src/nativewindow/classes/jogamp/nativewindow/swt/SWTAccessor.java:161: cannot find symbol
    [javac] symbol  : class Control
    [javac] location: class jogamp.nativewindow.swt.SWTAccessor
    [javac]     public static long getHandle(Control swtControl) {
    [javac]                                  ^
    [javac] /storage/home/j/git-ext/jogamp/jogl/src/nativewindow/classes/jogamp/nativewindow/swt/SWTAccessor.java:182: cannot find symbol
    [javac] symbol  : class Control
    [javac] location: class jogamp.nativewindow.swt.SWTAccessor
    [javac]     public static void setRealized(Control swtControl, boolean realize) {
    [javac]                                    ^
    [javac] /storage/home/j/git-ext/jogamp/jogl/src/nativewindow/classes/jogamp/nativewindow/swt/SWTAccessor.java:194: cannot find symbol
    [javac] symbol  : class Control
    [javac] location: class jogamp.nativewindow.swt.SWTAccessor
    [javac]     public static AbstractGraphicsDevice getDevice(Control swtControl) {
    [javac]                                                    ^
    [javac] /storage/home/j/git-ext/jogamp/jogl/src/nativewindow/classes/jogamp/nativewindow/swt/SWTAccessor.java:210: cannot find symbol
    [javac] symbol  : class Control
    [javac] location: class jogamp.nativewindow.swt.SWTAccessor
    [javac]     public static long getWindowHandle(Control swtControl) {
    [javac]                                        ^
    [javac] /storage/home/j/git-ext/jogamp/jogl/src/nativewindow/classes/jogamp/nativewindow/swt/SWTAccessor.java:223: cannot find symbol
    [javac] symbol  : class Control
    [javac] location: class jogamp.nativewindow.swt.SWTAccessor
    [javac]     public static long newGC(Control swtControl, GCData gcData) {
    [javac]                              ^
    [javac] /storage/home/j/git-ext/jogamp/jogl/src/nativewindow/classes/jogamp/nativewindow/swt/SWTAccessor.java:223: cannot find symbol
    [javac] symbol  : class GCData
    [javac] location: class jogamp.nativewindow.swt.SWTAccessor
    [javac]     public static long newGC(Control swtControl, GCData gcData) {
    [javac]                                                  ^
    [javac] /storage/home/j/git-ext/jogamp/jogl/src/nativewindow/classes/jogamp/nativewindow/swt/SWTAccessor.java:232: cannot find symbol
    [javac] symbol  : class Control
    [javac] location: class jogamp.nativewindow.swt.SWTAccessor
    [javac]     public static void disposeGC(Control swtControl, long gc, GCData gcData) {
    [javac]                                  ^
    [javac] /storage/home/j/git-ext/jogamp/jogl/src/nativewindow/classes/jogamp/nativewindow/swt/SWTAccessor.java:232: cannot find symbol
    [javac] symbol  : class GCData
    [javac] location: class jogamp.nativewindow.swt.SWTAccessor
    [javac]     public static void disposeGC(Control swtControl, long gc, GCData gcData) {
    [javac]                                                               ^
    [javac] /storage/home/j/git-ext/jogamp/jogl/src/nativewindow/classes/jogamp/nativewindow/swt/SWTAccessor.java:80: cannot find symbol
    [javac] symbol  : class Control
    [javac] location: class jogamp.nativewindow.swt.SWTAccessor
    [javac]                 f = Control.class.getField(str_handle);
    [javac]                     ^
    [javac] /storage/home/j/git-ext/jogamp/jogl/src/nativewindow/classes/jogamp/nativewindow/swt/SWTAccessor.java:99: cannot find symbol
    [javac] symbol  : class Control
    [javac] location: class jogamp.nativewindow.swt.SWTAccessor
    [javac]             m = ReflectionUtil.getMethod(Control.class, str_internal_new_GC, new Class[] { GCData.class });
    [javac]                                          ^
    [javac] /storage/home/j/git-ext/jogamp/jogl/src/nativewindow/classes/jogamp/nativewindow/swt/SWTAccessor.java:99: cannot find symbol
    [javac] symbol  : class GCData
    [javac] location: class jogamp.nativewindow.swt.SWTAccessor
    [javac]             m = ReflectionUtil.getMethod(Control.class, str_internal_new_GC, new Class[] { GCData.class });
    [javac]                                                                                            ^
    [javac] /storage/home/j/git-ext/jogamp/jogl/src/nativewindow/classes/jogamp/nativewindow/swt/SWTAccessor.java:107: cannot find symbol
    [javac] symbol  : class GCData
    [javac] location: class jogamp.nativewindow.swt.SWTAccessor
    [javac]                 m = Control.class.getDeclaredMethod(str_internal_dispose_GC, new Class[] { long.class, GCData.class });            
    [javac]                                                                                                        ^
    [javac] /storage/home/j/git-ext/jogamp/jogl/src/nativewindow/classes/jogamp/nativewindow/swt/SWTAccessor.java:107: cannot find symbol
    [javac] symbol  : class Control
    [javac] location: class jogamp.nativewindow.swt.SWTAccessor
    [javac]                 m = Control.class.getDeclaredMethod(str_internal_dispose_GC, new Class[] { long.class, GCData.class });            
    [javac]                     ^
    [javac] /storage/home/j/git-ext/jogamp/jogl/src/nativewindow/classes/jogamp/nativewindow/swt/SWTAccessor.java:109: cannot find symbol
    [javac] symbol  : class GCData
    [javac] location: class jogamp.nativewindow.swt.SWTAccessor
    [javac]                 m = Control.class.getDeclaredMethod(str_internal_dispose_GC, new Class[] { int.class, GCData.class });                
    [javac]                                                                                                       ^
    [javac] /storage/home/j/git-ext/jogamp/jogl/src/nativewindow/classes/jogamp/nativewindow/swt/SWTAccessor.java:109: cannot find symbol
    [javac] symbol  : class Control
    [javac] location: class jogamp.nativewindow.swt.SWTAccessor
    [javac]                 m = Control.class.getDeclaredMethod(str_internal_dispose_GC, new Class[] { int.class, GCData.class });                
    [javac]                     ^
    [javac] /storage/home/j/git-ext/jogamp/jogl/src/nativewindow/classes/jogamp/nativewindow/swt/SWTAccessor.java:165: cannot find symbol
    [javac] symbol  : class Control
    [javac] location: class jogamp.nativewindow.swt.SWTAccessor
    [javac]                 Field fView = Control.class.getField(str_view);
    [javac]                               ^
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 18 errors

BUILD FAILED
/storage/home/j/git-ext/jogamp/jogl/make/build.xml:69: The following error occurred while executing this line:
/storage/home/j/git-ext/jogamp/jogl/make/build-nativewindow.xml:319: Compile failed; see the compiler error output for details.

I'm not entirely sure why I'm seeing these errors. Is this eclipse stuff a required dependency now?

--

FreeBSD 8.2-RELEASE amd64 GENERIC
openjdk version "1.6.0"
OpenJDK Runtime Environment (build 1.6.0-b22)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Compilation failure on FreeBSD amd64 (eclipse swt packages not installed?)

Wade Walker
Administrator
Hi Jerron,

The SWT library is required only for some of the unit tests. Since JOGL can be displayed in an SWT app, we have unit tests for those cases. The SWT libraries are in jogl/make/lib/swt. SWT doesn't appear to support FreeBSD directly, but the Linux/GTK version should work on FreeBSD if you have the Linux GTK port installed (see http://forums.freebsd.org/archive/index.php/t-7279.html for info).

But if you just want to compile JOGL and you don't care if the SWT unit test runs, all you need to do is modify the jogl/make/build-common.xml to select the Linux version of SWT if it detects a FreeBSD build. Search for "isFreeBSD" in the XML files and you'll see how other parts of the build sense FreeBSD.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Compilation failure on FreeBSD amd64 (eclipse swt packages not installed?)

jerron
Lo.

Is SWT installed as part of eclipse? If so, I do have eclipse installed so presumably it does work even if they don't actually distribute jar files.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Compilation failure on FreeBSD amd64 (eclipse swt packages not installed?)

jerron
Er, by that I mean I have a native copy of eclipse installed without any Linux compatibility libraries.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Compilation failure on FreeBSD amd64 (eclipse swt packages not installed?)

jerron
In reply to this post by Wade Walker
I should actually mention that anything in the build system that mentions FreeBSD amd64 was actually put there by me. I did some work porting the library to that platform last year but then almost immediately had to stop Java OpenGL work. Now that I'm able to continue again, I'd like to get things back working again. I'm currently looking at getting hold of the necessary swt-debug jar files (suspect I'll be building them myself).
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Compilation failure on FreeBSD amd64 (eclipse swt packages not installed?)

Wade Walker
Administrator
Whichever version of Eclipse you installed, that's the version of the SWT libraries you need. So if you installed Eclipse from http://www.eclipse.org/downloads/, then there should be a version of SWT at http://www.eclipse.org/swt/ that matches it.

If it's an SWT version that we don't already have in jogl/make/lib/swt, just download it from http://www.eclipse.org/swt/ and put it in there. If we already have the version, you just need to change jogl/make/build-common.xml as I mentioned before.

It's slightly more difficult to try to take the SWT from inside an Eclipse installation, because an installation will only contain the SWT libraries for that specific platform. For example, my Windows installation contains:

org.eclipse.swt_3.6.1.v3655c.jar
org.eclipse.swt.win32.win32.x86_64_3.6.1.v3655c.jar

You could copy these into jogl/make/lib/swt, but then you'd still be missing 32-bit Windows. But you can do this if there's no other option (like if your version of Eclipse is some sort of custom build for FreeBSD).
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Compilation failure on FreeBSD amd64 (eclipse swt packages not installed?)

jerron
In reply to this post by jerron
This tiny patch allows the source from sgothel's repos to build:

index aac3849..5e514bf 100644
--- a/make/build-common.xml
+++ b/make/build-common.xml
@@ -120,6 +120,9 @@
           <istrue value="${isWindowsX86}" />
         </condition>
         <condition property="swt.jar" value="${project.root}/make/lib/swt/gtk-linux-x86_64/swt-debug.jar">
+          <istrue value="${isFreeBSDAMD64}" />
+        </condition>
+        <condition property="swt.jar" value="${project.root}/make/lib/swt/gtk-linux-x86_64/swt-debug.jar">
           <istrue value="${isLinuxAMD64}" />
         </condition>
         <condition property="swt.jar" value="${project.root}/make/lib/swt/gtk-linux-x86/swt-debug.jar">

Of course, I've not tried running the unit tests yet.
Loading...