Login  Register

Error building for PPC64 (...optional.ANTLR not found)

Posted by wspear on Oct 05, 2017; 7:12pm
URL: https://forum.jogamp.org/Error-building-for-PPC64-optional-ANTLR-not-found-tp4038226.html

The issue below was fixed by editing stub_includes/platform/glibc-compat-symbols.h to handle PPC64 as currently done for aarch64

---

The below issue was resolved by adding ppc64le as a valid os.arch value where previously only ppc was tested for in gluegen-cpptasks-base.xml, basically duplicated every value with ppc in it using a ppc64le equivalent. Now I'm running into the build error below which seems like it could be the issue reported here: http://forum.jogamp.org/unsolved-memcpy-GLIBC-2-4-No-symbol-version-section-td4033903.html  (Using: gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) )

gluegen.cpptasks.declare.compiler:
     [echo] java.home.dir                /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-3.b12.el7_3.ppc64le/jre/..
     [echo] java.includes.dir            /storage/users/wspear/Code/centaur-jogl/gluegen/make/stub_includes/jni
     [echo] java.includes.dir.platform   /storage/users/wspear/Code/centaur-jogl/gluegen/make/stub_includes/jni/x11
     [echo] java.lib.dir.platform        /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-3.b12.el7_3.ppc64le/jre/../jre/lib/ppc64le

gluegen.cpptasks.setup.compiler:

c.configure:

junit.test1i.c.build:
     [echo] Compiling test1
     [echo]    c.compiler.src.files junit.test1i.c.src.files
     [echo]    compiler.cfg.id compiler.cfg.linux
     [echo]    linker.cfg.id linker.test1.dll.cfg.id
     [echo]    output.lib.name test1
       [cc] 1 total files to be compiled.
       [cc] cc1: warning: command line option ‘-fno-rtti’ is valid for C++/ObjC++ but not for C [enabled by default]
       [cc] In file included from /storage/users/wspear/Code/centaur-jogl/gluegen/src/junit/com/jogamp/gluegen/test/junit/generation/test1.c:2:0:
       [cc] /storage/users/wspear/Code/centaur-jogl/gluegen/src/junit/com/jogamp/gluegen/test/junit/generation/test1.h:319:6: warning: #warning "Hello Native Compiler" [-Wcpp]
       [cc]      #warning "Hello Native Compiler"
       [cc]       ^
       [cc] /storage/users/wspear/Code/centaur-jogl/gluegen/src/junit/com/jogamp/gluegen/test/junit/generation/test1.c: In function ‘createModelMutable’:
       [cc] /storage/users/wspear/Code/centaur-jogl/gluegen/src/junit/com/jogamp/gluegen/test/junit/generation/test1.c:718:5: warning: passing argument 1 of ‘strncpy’ discards ‘const’ qualifier from pointer target type [enabled by default]
       [cc]      strncpy(s->modelNamePointerCString, "Hello CString", 13+1);
       [cc]      ^
       [cc] In file included from /storage/users/wspear/Code/centaur-jogl/gluegen/src/junit/com/jogamp/gluegen/test/junit/generation/test1.c:7:0:
       [cc] /usr/include/string.h:128:14: note: expected ‘char * __restrict__’ but argument is of type ‘const char *’
       [cc]  extern char *strncpy (char *__restrict __dest,
       [cc]               ^
       [cc] /storage/users/wspear/Code/centaur-jogl/gluegen/src/junit/com/jogamp/gluegen/test/junit/generation/test1.c: In function ‘destroyModelMutable’:
       [cc] /storage/users/wspear/Code/centaur-jogl/gluegen/src/junit/com/jogamp/gluegen/test/junit/generation/test1.c:737:5: warning: passing argument 1 of ‘free’ discards ‘const’ qualifier from pointer target type [enabled by default]
       [cc]      free(s->modelNamePointerCString);
       [cc]      ^
       [cc] In file included from /storage/users/wspear/Code/centaur-jogl/gluegen/src/junit/com/jogamp/gluegen/test/junit/generation/test1.c:5:0:
       [cc] /usr/include/stdlib.h:482:13: note: expected ‘void *’ but argument is of type ‘const char *’
       [cc]  extern void free (void *__ptr) __THROW;
       [cc]              ^
       [cc] Starting link
       [cc] /usr/bin/ld: libtest1.so: No symbol version section for versioned symbol `memcpy@GLIBC_2.0'
       [cc] /usr/bin/ld: final link failed: Nonrepresentable section on output
       [cc] collect2: error: ld returned 1 exit status

BUILD FAILED
/storage/users/wspear/Code/centaur-jogl/gluegen/make/build.xml:1066: The following error occurred while executing this line:
/storage/users/wspear/Code/centaur-jogl/gluegen/make/build-test.xml:282: The following error occurred while executing this line:
/storage/users/wspear/Code/centaur-jogl/gluegen/make/build-test.xml:605: The following error occurred while executing this line:
/storage/users/wspear/Code/centaur-jogl/gluegen/make/build-test.xml:250: gcc failed with return code 1

Total time: 16 seconds




---

The below issue was resolved by downloading a whole new ant and setting it in my PATH and ANT_HOME variables. Now I'm running into this

BUILD FAILED
/storage/users/wspear/Code/centaur-jogl/gluegen/make/build.xml:428: The following error occurred while executing this line:
/storage/users/wspear/Code/centaur-jogl/gluegen/make/build.xml:432: Requires '${compiler.cfg.id}'

Total time: 1 second

Enabling
gcc.compat.compiler=gcc
in gluegen.properties doesn't seem to help but I'll try some other fixes and update if I have any success...
---

I need to build gluegen/jogl native libraries for PPC64 but I'm not off to a great start. Everything I have tried so far (downloading various versions of antlr-optional.jar or antlr-complete.jar and dropping them in make/lib or ~/.ant/lib or specifying -lib) has resulted in the build of gluegen from git failing with the output below. Is there information on the specific versions of the ant/antlr/etc jars (or something else I might require) that are needed to successfully run this build? Alternatively, if someone has an existing build for PPC64, or input on creating one, that would be handy. Thanks!

The Error:
generate.java:

BUILD FAILED
/storage/users/wspear/Code/centaur-jogl/gluegen/make/build.xml:945: The following error occurred while executing this line:
/storage/users/wspear/Code/centaur-jogl/gluegen/make/build.xml:682: The following error occurred while executing this line:
/storage/users/wspear/Code/centaur-jogl/gluegen/make/build.xml:641: Problem: failed to create task or type antlr
Cause: the class org.apache.tools.ant.taskdefs.optional.ANTLR was not found.
        This looks like one of Ant's optional components.
Action: Check that the appropriate optional JAR exists in
        -/usr/share/ant/lib
        -/home/users/wspear/.ant/lib
        -a directory added on the command line with the -lib argument

Do not panic, this is a common problem.
The commonest cause is a missing JAR.

This is not a bug; it is a configuration problem


Total time: 3 seconds