amd64 build failure / cannot open shared object

Hi everyone.

I am using Gentoo on a amd64, and when I tryed to use jogl [linux libraries] [x86 probably], I get the following error :


Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/blackdown-jdk-1.4.2.01/jre/lib/amd64/libjogl.so: /opt/blackdown-jdk-1.4.2.01/jre/lib/amd64/libjogl.so: cannot open shared object file: No such file or directory 

Thinking it was a problem of libraries not fitted for my architecture, I decided to build my own jogl.

So I went through https://jogl.dev.java.net/nonav/source/browse/checkout/jogl/doc/HowToBuild.html?rev=HEAD&content-type=text/html, and I do as written. Ant is installed, antlr too.

now when I try build the whole stuff, with a magic

ant linux

, i get the following errors :

Buildfile: build.xml

base.init:

load.user.properties:
     [echo] Loaded /root/jogl.properties.
     [echo] antlr.jar=/usr/share/antlr/lib/antlr.jar

setup.java.home.dir.nonmacosx:

load.user.properties.macosx:

setup.java.home.dir.macosx:

setup.java.home.dir:

declare:

init:

antlr.jar.validate:

java.home.dir.validate:

test.for.jogl.jar:

java.class.path.validate:

validate:

declare.x11:

declare.linux:

linux:

base.init:

load.user.properties:

setup.java.home.dir.nonmacosx:

load.user.properties.macosx:

setup.java.home.dir.macosx:

setup.java.home.dir:

declare:

init:

antlr.jar.validate:

java.home.dir.validate:

test.for.jogl.jar:

java.class.path.validate:

validate:

build.gluegen:

declare:

all:

declare:

build.gluegen:

declare:

generate.c.grammar:

declare:

generate.c.grammar.glib:

declare:

generate.c.grammar:

declare:

generate.c.grammar.glib:

declare:

generate.c.grammar.glib:

     [echo] GlueGen has been built successfully.

declare:

build.gluegen.task:

     [echo] GlueGen ANT task has been built successfully.

build.static.gl:

declare:

all:

declare:

build.static.gl:

     [echo] BuildStaticGLInfo has been built successfully.

declare:

build.static.gl.task:

     [echo] StaticGLGen ANT task has been built successfully.

java.generate.check:

java.generate:

java.generate.cg.check:

java.generate.cg:

java.compile:
    [javac] Compiling 2 source files to /root/jogl/build/classes
    [javac] /root/jogl/build/gensrc/classes/net/java/games/jogl/DebugGL.java:15: net.java.games.jogl.DebugGL is not abstract and does not override abstract method glRenderbufferStorageEXT(int,int,int,int) in net.java.games.jogl.GL
    [javac] public class DebugGL implements GL
    [javac]        ^
    [javac] /root/jogl/build/gensrc/classes/net/java/games/jogl/DebugGL.java:13623: glXGetCurrentReadDrawableSGI() in net.java.games.jogl.DebugGL cannot implement glXGetCurrentReadDrawableSGI() in net.java.games.jogl.GLX; attempting to use incompatible return type
    [javac] found   : int
    [javac] required: long
    [javac]   public  int glXGetCurrentReadDrawableSGI()
    [javac]               ^
    [javac] /root/jogl/build/gensrc/classes/net/java/games/jogl/DebugGL.java:13611: glXGetContextIDEXT(long) in net.java.games.jogl.DebugGL cannot implement glXGetContextIDEXT(long) in net.java.games.jogl.GLX; attempting to use incompatible return type
    [javac] found   : int
    [javac] required: long
    [javac]   public  int glXGetContextIDEXT(long arg0)
    [javac]               ^
    [javac] /root/jogl/build/gensrc/classes/net/java/games/jogl/DebugGL.java:13438: cannot resolve symbol
    [javac] symbol  : method wglQueryFrameTrackingI3D (int[],int[],float[])
    [javac] location: interface net.java.games.jogl.GL
    [javac]     boolean _res = downstreamGL.wglQueryFrameTrackingI3D(arg0,arg1,arg2);
    [javac]                                ^
    [javac] /root/jogl/build/gensrc/classes/net/java/games/jogl/DebugGL.java:13444: cannot resolve symbol
    [javac] symbol  : method wglQueryFrameTrackingI3D (java.nio.IntBuffer,java.nio.IntBuffer,java.nio.FloatBuffer)
    [javac] location: interface net.java.games.jogl.GL
    [javac]     boolean _res = downstreamGL.wglQueryFrameTrackingI3D(arg0,arg1,arg2);
    [javac]                                ^
    [javac] /root/jogl/build/gensrc/classes/net/java/games/jogl/DebugGL.java:13613: possible loss of precision
    [javac] found   : long
    [javac] required: int
    [javac]     int _res = downstreamGL.glXGetContextIDEXT(arg0);
    [javac]                                               ^
    [javac] /root/jogl/build/gensrc/classes/net/java/games/jogl/DebugGL.java:13625: possible loss of precision
    [javac] found   : long
    [javac] required: int
    [javac]     int _res = downstreamGL.glXGetCurrentReadDrawableSGI();
    [javac]                                                         ^
    [javac] /root/jogl/build/gensrc/classes/net/java/games/jogl/DebugGL.java:13637: cannot resolve symbol
    [javac] symbol  : method glXGetTransparentIndexSUN (long,int,int,int[])
    [javac] location: interface net.java.games.jogl.GL
    [javac]     int _res = downstreamGL.glXGetTransparentIndexSUN(arg0,arg1,arg2,arg3);
    [javac]                            ^
    [javac] /root/jogl/build/gensrc/classes/net/java/games/jogl/DebugGL.java:13643: cannot resolve symbol
    [javac] symbol  : method glXGetTransparentIndexSUN (long,int,int,java.nio.IntBuffer)
    [javac] location: interface net.java.games.jogl.GL
    [javac]     int _res = downstreamGL.glXGetTransparentIndexSUN(arg0,arg1,arg2,arg3);
    [javac]                            ^
    [javac] /root/jogl/build/gensrc/classes/net/java/games/jogl/TraceGL.java:14: net.java.games.jogl.TraceGL is not abstract and does not override abstract method glRenderbufferStorageEXT(int,int,int,int) in net.java.games.jogl.GL
    [javac] public class TraceGL implements GL
    [javac]        ^
    [javac] /root/jogl/build/gensrc/classes/net/java/games/jogl/TraceGL.java:19007: glXGetCurrentReadDrawableSGI() in net.java.games.jogl.TraceGL cannot implement glXGetCurrentReadDrawableSGI() in net.java.games.jogl.GLX; attempting to use incompatible return type
    [javac] found   : int
    [javac] required: long
    [javac]   public  int glXGetCurrentReadDrawableSGI()
    [javac]               ^
    [javac] /root/jogl/build/gensrc/classes/net/java/games/jogl/TraceGL.java:18991: glXGetContextIDEXT(long) in net.java.games.jogl.TraceGL cannot implement glXGetContextIDEXT(long) in net.java.games.jogl.GLX; attempting to use incompatible return type
    [javac] found   : int
    [javac] required: long
    [javac]   public  int glXGetContextIDEXT(long arg0)
    [javac]               ^
    [javac] /root/jogl/build/gensrc/classes/net/java/games/jogl/TraceGL.java:18760: cannot resolve symbol
    [javac] symbol  : method wglQueryFrameTrackingI3D (int[],int[],float[])
    [javac] location: interface net.java.games.jogl.GL
    [javac]     boolean _res = downstreamGL.wglQueryFrameTrackingI3D(arg0,arg1,arg2);
    [javac]                                ^
    [javac] /root/jogl/build/gensrc/classes/net/java/games/jogl/TraceGL.java:18768: cannot resolve symbol
    [javac] symbol  : method wglQueryFrameTrackingI3D (java.nio.IntBuffer,java.nio.IntBuffer,java.nio.FloatBuffer)
    [javac] location: interface net.java.games.jogl.GL
    [javac]     boolean _res = downstreamGL.wglQueryFrameTrackingI3D(arg0,arg1,arg2);
    [javac]                                ^
    [javac] /root/jogl/build/gensrc/classes/net/java/games/jogl/TraceGL.java:18995: possible loss of precision
    [javac] found   : long
    [javac] required: int
    [javac]     int _res = downstreamGL.glXGetContextIDEXT(arg0);
    [javac]                                               ^
    [javac] /root/jogl/build/gensrc/classes/net/java/games/jogl/TraceGL.java:19011: possible loss of precision
    [javac] found   : long
    [javac] required: int
    [javac]     int _res = downstreamGL.glXGetCurrentReadDrawableSGI();
    [javac]                                                         ^
    [javac] /root/jogl/build/gensrc/classes/net/java/games/jogl/TraceGL.java:19027: cannot resolve symbol
    [javac] symbol  : method glXGetTransparentIndexSUN (long,int,int,int[])
    [javac] location: interface net.java.games.jogl.GL
    [javac]     int _res = downstreamGL.glXGetTransparentIndexSUN(arg0,arg1,arg2,arg3);
    [javac]                            ^
    [javac] /root/jogl/build/gensrc/classes/net/java/games/jogl/TraceGL.java:19035: cannot resolve symbol
    [javac] symbol  : method glXGetTransparentIndexSUN (long,int,int,java.nio.IntBuffer)
    [javac] location: interface net.java.games.jogl.GL
    [javac]     int _res = downstreamGL.glXGetTransparentIndexSUN(arg0,arg1,arg2,arg3);
    [javac]                            ^
    [javac] 18 errors

This occurs with different versions of the source code, the latest as well as older ones.

I am using blackdown jdk, maybe that is one cause of the problem. Any ideas welcome. :slight_smile:

You currently need to use the linux.amd64 target when building JOGL for a 64-bit Linux distribution. This has been tested with the Sun JDK. There is some restructuring that is necessary in order to ship a 64-bit build of JOGL along with the existing 32-bit builds which has lower priority than other work, so for now you’ll need to either build the library yourself or use a 32-bit x86 Java distribution on your AMD64 machine and use the Linux/x86 JOGL build. I haven’t tested JOGL with the latter configuration but believe it should work.