Bug 1190

Summary: 'memcpy@GLIBC_2.4' error while jogl compilation
Product: [JogAmp] General Reporter: iNik <iv.an.nik>
Component: buildsAssignee: Sven Gothel <sgothel>
Status: RESOLVED FIXED    
Severity: major    
Priority: P2    
Version: 2.4.0   
Hardware: All   
OS: all   
Type: DEFECT SCM Refs:
jogamp-scripting e6692024687685d3af725555d9bb5490d85ecc8d gluegen 12047cae51b5a594b38c9e162f135352452c46fd gluegen 117565b7d8771b6c9c2144b2d1ef5a131446e058 gluegen 7bbb0822608fa9c832588c35874ead558a479322 gluegen 0bd5136c2df8407cea7b0dcc7fb1e62432ba18bb gluegen b846476786a776296a5c5ab6cbfb370a4c5497ae
Workaround: ---
Bug Depends on:    
Bug Blocks: 1376    
Attachments: glibc gcc info

Description iNik 2015-08-11 09:12:01 CEST
Created attachment 717 [details]
glibc gcc info

Attempt to build JOGL project with the newer toolchain (toolchain info attached) causes the ' No symbol version section for versioned symbol `memcpy@GLIBC_2.4 ' error.

Full message:
c.build.nativewindow.windowlib.x11:
     [echo] Output lib name = nativewindow_x11
     [echo] c.compiler.use-jawt false
     [echo] nativewindow_x11.useLibJAWT ${nativewindow_x11.useLibJAWT}
     [echo] Compiling nativewindow_x11
     [echo] java.lib.dir.platform: /usr/java/jdk1.8.0_51/jre/../jre/lib/arm
       [cc] 4 total files to be compiled.
       [cc] cc1: warning: command line option '-fno-rtti' is valid for C++/ObjC++ but not for C
       [cc] cc1: warning: command line option '-fno-rtti' is valid for C++/ObjC++ but not for C
       [cc] cc1: warning: command line option '-fno-rtti' is valid for C++/ObjC++ but not for C
       [cc] /home/root/jogl/build-linux-armv6hf/nativewindow/gensrc/native/X11/X11Lib_JNI.c: In function 'Java_jogamp_nativewindow_x11_X11Lib_XSynchronize__JZ':
       [cc] /home/root/jogl/build-linux-armv6hf/nativewindow/gensrc/native/X11/X11Lib_JNI.c:254:8: warning: assignment makes integer from pointer without a cast
       [cc]    _res = XSynchronize((Display *) (intptr_t) display, (Bool) onoff);
       [cc]         ^
       [cc] cc1: warning: command line option '-fno-rtti' is valid for C++/ObjC++ but not for C
       [cc] Starting link
       [cc] /usr/lib/gcc/arm-poky-linux-gnueabi/4.9.2/../../../../arm-poky-linux-gnueabi/bin/ld: libnativewindow_x11.so: No symbol version section for versioned symbol `memcpy@GLIBC_2.4'
       [cc] /usr/lib/gcc/arm-poky-linux-gnueabi/4.9.2/../../../../arm-poky-linux-gnueabi/bin/ld: final link failed: Nonrepresentable section on output
       [cc] collect2: error: ld returned 1 exit status

BUILD FAILED
/home/root/jogl/make/build.xml:71: The following error occurred while executing this line:
/home/root/jogl/make/build-nativewindow.xml:749: The following error occurred while executing this line:
/home/root/jogl/make/build-nativewindow.xml:681: gcc failed with return code 1
Comment 1 Sven Gothel 2019-04-06 06:19:02 CEST
Reproduced here and will fix for 2.4.0
Comment 2 Sven Gothel 2019-04-07 03:30:24 CEST
jogamp-scripting e6692024687685d3af725555d9bb5490d85ecc8d

    Bug 1190: Updating crosstools
    
    Building updated crosscompiling toolchains for
    - armv7-unknown-linux-gnueabihf
    - aarch64-unknown-linux-gnu
    
    using gcc 8.3, glibc 2.29, binutils 2.32 .. etc
Comment 3 Sven Gothel 2019-04-07 05:16:38 CEST
GlueGen: Updating crosstools and enabling aarch64 + armv6hf 'ontarget'
    
Default is to crosscompile w/o testing, i.e. property 'isCrosscompilation' is set to 'true'.
'ontarget' includes testing, no crosscompilation.
    
Updated crosstools links to new build of jogamp-scripting commit e6692024687685d3af725555d9bb5490d85ecc8d
Comment 4 Sven Gothel 2019-04-07 05:53:43 CEST
(In reply to Sven Gothel from comment #3)
> GlueGen: Updating crosstools and enabling aarch64 + armv6hf 'ontarget'
>     
> Default is to crosscompile w/o testing, i.e. property 'isCrosscompilation'
> is set to 'true'.
> 'ontarget' includes testing, no crosscompilation.
>     
> Updated crosstools links to new build of jogamp-scripting commit
> e6692024687685d3af725555d9bb5490d85ecc8d

The toolchain dropped here: x-tools and the user libs from Debian

https://jogamp.org/files/toolchain/20190407-linux-toolchain/
Comment 5 Sven Gothel 2019-04-07 22:35:54 CEST
(In reply to Sven Gothel from comment #4)
> (In reply to Sven Gothel from comment #3)
> > GlueGen: Updating crosstools and enabling aarch64 + armv6hf 'ontarget'
> >     
> > Default is to crosscompile w/o testing, i.e. property 'isCrosscompilation'
> > is set to 'true'.
> > 'ontarget' includes testing, no crosscompilation.
> >     
> > Updated crosstools links to new build of jogamp-scripting commit
> > e6692024687685d3af725555d9bb5490d85ecc8d
> 
> The toolchain dropped here: x-tools and the user libs from Debian
> 
> https://jogamp.org/files/toolchain/20190407-linux-toolchain/

gluegen 117565b7d8771b6c9c2144b2d1ef5a131446e058
Fix arm6hf + aarch64 gcc options, adapt glibc-compat-symbols.h
- arm6hf needs the fpu to be specified, we still use the lowest armv6 hard float denominator
- aarch64 shall have the -march compiler argument as well
- glibc-compat-symbols.h Finally drop the glibc versioning on memcpy for both
Comment 6 Sven Gothel 2019-04-08 04:45:21 CEST
Toolchain now located at:
<https://jogamp.org/files/toolchain/20190408-linux-toolchain/>

- Added sha256sums and gpg signatures
- the opt-linux* user lib tars include ALSA and PULSE for openal-soft now
Comment 7 Sven Gothel 2019-04-08 04:47:22 CEST
commit b846476786a776296a5c5ab6cbfb370a4c5497ae
    Complete jogamp-env.xml TARGET_* readout; Use parsed env in cpptasks-base as well

commit 0bd5136c2df8407cea7b0dcc7fb1e62432ba18bb
    Bug 1190: Define TARGET_PLATFORM_SYSROOT TARGET_PLATFORM_USRROOT TARGET_PLATFORM_USRLIBS for crosscompilation
    
    Android Crosscompilation Usage:
    - TARGET_PLATFORM_ROOT -> TARGET_PLATFORM_SYSROOT
    
    General
    - TARGET_PLATFORM_SYSROOT Crosscompiler and system specified 'sysroot' (as in gcc --print-sysroot)
    - TARGET_PLATFORM_USRROOT Additional optional user headers and libraries for target
    - TARGET_PLATFORM_USRLIBS Actual location of target user libraries within TARGET_PLATFORM_USRROOT
    - TARGET_JAVA_LIBS Actual location of the Java libraries within TARGET_PLATFORM_USRROOT

commit 7bbb0822608fa9c832588c35874ead558a479322
    Bug 1190: aarch64 + armhf ld symbolic link to actual x-tool binary of ld.bfd