I tried to build kmscube but the build fails with a duplicate definition of the symbol gl. I probably miss something, but I have no idea what.
Code
rd@h370-wlan:~/tmp.nobackup/git/LibreELEC.tv$ cat ~/.libreelec/options
ADDITIONAL_PACKAGES="$ADDITIONAL_PACKAGES kmscube"
rd@h370-wlan:~/tmp.nobackup/git/LibreELEC.tv$ PROJECT=NXP DEVICE=iMX6 ARCH=arm UBOOT_SYSTEM=cubox-q make image
[...]
<<< kmscube:target seq 193 <<<
UNPACK kmscube
BUILD kmscube (target)
TOOLCHAIN autotools
AUTORECONF kmscube
autoreconf: Entering directory `/home/rd/tmp.nobackup/git/LibreELEC.tv/build.LibreELEC-iMX6.arm-9.80-devel/build/kmscube-98f31bf'
autoreconf: configure.ac: not using Gettext
autoreconf: running: /home/rd/tmp.nobackup/git/LibreELEC.tv/build.LibreELEC-iMX6.arm-9.80-devel/toolchain/bin/aclocal -I /home/rd/tmp.nobackup/git/LibreELEC.tv/build.LibreELEC-iMX6.arm-9.80-devel/toolchain/armv7a-libreelec-linux-gnueabihf/sysroot/usr/share/aclocal -I /home/rd/tmp.nobackup/git/LibreELEC.tv/build.LibreELEC-iMX6.arm-9.80-devel/toolchain/armv7a-libreelec-linux-gnueabihf/sysroot/usr/share/aclocal --force
autoreconf: configure.ac: tracing
autoreconf: configure.ac: creating directory build-aux
autoreconf: configure.ac: not using Libtool
autoreconf: running: /home/rd/tmp.nobackup/git/LibreELEC.tv/build.LibreELEC-iMX6.arm-9.80-devel/toolchain/bin/autoconf --include=/home/rd/tmp.nobackup/git/LibreELEC.tv/build.LibreELEC-iMX6.arm-9.80-devel/toolchain/armv7a-libreelec-linux-gnueabihf/sysroot/usr/share/aclocal --force
autoreconf: configure.ac: not using Autoheader
autoreconf: running: /home/rd/tmp.nobackup/git/LibreELEC.tv/build.LibreELEC-iMX6.arm-9.80-devel/toolchain/bin/automake --add-missing --copy --force-missing
configure.ac:32: installing 'build-aux/compile'
configure.ac:30: installing 'build-aux/install-sh'
configure.ac:30: installing 'build-aux/missing'
Makefile.am: installing 'build-aux/depcomp'
autoreconf: Leaving directory `/home/rd/tmp.nobackup/git/LibreELEC.tv/build.LibreELEC-iMX6.arm-9.80-devel/build/kmscube-98f31bf'
Executing (target): /home/rd/tmp.nobackup/git/LibreELEC.tv/build.LibreELEC-iMX6.arm-9.80-devel/build/kmscube-98f31bf/configure --host=armv7a-libreelec-linux-gnueabihf --build=x86_64-linux-gnu --prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib --localstatedir=/var --disable-static --enable-shared
configure: WARNING: unrecognized options: --disable-static, --enable-shared
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for armv7a-libreelec-linux-gnueabihf-strip... /home/rd/tmp.nobackup/git/LibreELEC.tv/build.LibreELEC-iMX6.arm-9.80-devel/toolchain/bin/armv7a-libreelec-linux-gnueabihf-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for armv7a-libreelec-linux-gnueabihf-gcc... /home/rd/tmp.nobackup/git/LibreELEC.tv/build.LibreELEC-iMX6.arm-9.80-devel/toolchain/bin/armv7a-libreelec-linux-gnueabihf-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /home/rd/tmp.nobackup/git/LibreELEC.tv/build.LibreELEC-iMX6.arm-9.80-devel/toolchain/bin/armv7a-libreelec-linux-gnueabihf-gcc accepts -g... yes
checking for /home/rd/tmp.nobackup/git/LibreELEC.tv/build.LibreELEC-iMX6.arm-9.80-devel/toolchain/bin/armv7a-libreelec-linux-gnueabihf-gcc option to accept ISO C89... none needed
checking whether /home/rd/tmp.nobackup/git/LibreELEC.tv/build.LibreELEC-iMX6.arm-9.80-devel/toolchain/bin/armv7a-libreelec-linux-gnueabihf-gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of /home/rd/tmp.nobackup/git/LibreELEC.tv/build.LibreELEC-iMX6.arm-9.80-devel/toolchain/bin/armv7a-libreelec-linux-gnueabihf-gcc... gcc3
checking whether make supports nested variables... (cached) yes
checking pkg-config is at least version 0.9.0... yes
checking for libdrm >= 2.4.71... yes
checking for gbm >= 13.0... yes
checking for egl... yes
checking for glesv2... yes
checking for gstreamer-1.0 >= 1.6.0 gstreamer-plugins-base-1.0 >= 1.6.0 gstreamer-app-1.0 >= 1.6.0 gstreamer-allocators-1.0 >= 1.6.0 gstreamer-video-1.0 >= 1.6.0 glib-2.0... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: executing depfiles commands
configure: WARNING: unrecognized options: --disable-static, --enable-shared
Executing (target): make
make[1]: Entering directory '/home/rd/tmp.nobackup/git/LibreELEC.tv/build.LibreELEC-iMX6.arm-9.80-devel/build/kmscube-98f31bf/.armv7a-libreelec-linux-gnueabihf'
CC kmscube-common.o
CC kmscube-drm-legacy.o
CC kmscube-esTransform.o
CC kmscube-frame-512x512-NV12.o
CC kmscube-frame-512x512-RGBA.o
CC kmscube-kmscube.o
CC kmscube-drm-common.o
CC kmscube-drm-atomic.o
CC kmscube-cube-tex.o
CC kmscube-cube-smooth.o
CCLD kmscube
/home/rd/tmp.nobackup/git/LibreELEC.tv/build.LibreELEC-iMX6.arm-9.80-devel/toolchain/lib/gcc/armv7a-libreelec-linux-gnueabihf/10.2.0/../../../../armv7a-libreelec-linux-gnueabihf/bin/ld.gold: error: kmscube-cube-tex.o: multiple definition of 'gl'
/home/rd/tmp.nobackup/git/LibreELEC.tv/build.LibreELEC-iMX6.arm-9.80-devel/toolchain/lib/gcc/armv7a-libreelec-linux-gnueabihf/10.2.0/../../../../armv7a-libreelec-linux-gnueabihf/bin/ld.gold: kmscube-cube-smooth.o: previous definition here
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:423: kmscube] Error 1
make[1]: Leaving directory '/home/rd/tmp.nobackup/git/LibreELEC.tv/build.LibreELEC-iMX6.arm-9.80-devel/build/kmscube-98f31bf/.armv7a-libreelec-linux-gnueabihf'
FAILURE: scripts/build kmscube:target during make_target (default)
*********** FAILED COMMAND ***********
make ${PKG_MAKE_OPTS_TARGET}
**************************************
*********** FAILED COMMAND ***********
${SCRIPTS}/build "${1}" "${PARENT_PKG}"
**************************************
FAILURE: scripts/install kmscube:target has failed!
The following log for this failure is available:
/home/rd/tmp.nobackup/git/LibreELEC.tv/build.LibreELEC-iMX6.arm-9.80-devel/.threads/logs/193.log
>>> kmscube:target seq 193 >>>
[188/269] [FAIL] install kmscube:target
The following log for this failure is available:
/home/rd/tmp.nobackup/git/LibreELEC.tv/build.LibreELEC-iMX6.arm-9.80-devel/.threads/logs/193.log
Parallel build failure - see log for details. Time of failure: Fri Aug 21 17:25:03 CEST 2020
Display More
Output of objdump for the two object files:
Code
rd@h370-wlan:~/tmp.nobackup/git/LibreELEC.tv/build.LibreELEC-iMX6.arm-9.80-devel/build/kmscube-98f31bf/.armv7a-libreelec-linux-gnueabihf$ objdump -t kmscube-cube-tex.o
kmscube-cube-tex.o: file format elf32-little
SYMBOL TABLE:
00000000 l df *ABS* 00000000 cube-tex.c
00000000 l d .text 00000000 .text
00000000 l d .data 00000000 .data
00000000 l d .bss 00000000 .bss
00000000 l .text 00000000 $a
00000000 l F .text 0000022c draw_cube_tex
00000000 l .bss 00000000 .LANCHOR0
00000218 l .text 00000000 $d
0000022c l .text 00000000 $a
0000022c l F .text 00000104 get_fd_y
00000330 l F .text 00000100 get_fd_uv
0000042c l .text 00000000 $d
00000000 l d .rodata.str1.4 00000000 .rodata.str1.4
00000000 l .rodata.str1.4 00000000 $d
00000000 l .rodata.str1.4 00000000 .LC0
00000424 l .rodata.str1.4 00000000 .LC1
000005fc l .rodata.str1.4 00000000 .LC2
00000610 l .rodata.str1.4 00000000 .LC3
00000618 l .rodata.str1.4 00000000 .LC4
00000638 l .rodata.str1.4 00000000 .LC5
0000064c l .rodata.str1.4 00000000 .LC6
00000a38 l .rodata.str1.4 00000000 .LC7
00000a44 l .rodata.str1.4 00000000 .LC8
00000a50 l .rodata.str1.4 00000000 .LC9
00000a5c l .rodata.str1.4 00000000 .LC10
00000a6c l .rodata.str1.4 00000000 .LC11
00000a88 l .rodata.str1.4 00000000 .LC12
00000a98 l .rodata.str1.4 00000000 .LC13
00000aa0 l .rodata.str1.4 00000000 .LC14
00000aa8 l .rodata.str1.4 00000000 .LC15
00000ab0 l .rodata.str1.4 00000000 .LC16
00000b1c l .rodata.str1.4 00000000 .LC17
00000b20 l .rodata.str1.4 00000000 .LC18
00000b28 l .rodata.str1.4 00000000 .LC19
00000b30 l .rodata.str1.4 00000000 .LC20
00000b40 l .rodata.str1.4 00000000 .LC21
00000430 l .text 00000000 $a
00000000 l .rodata 00000000 .LANCHOR1
00000000 l .data 00000000 .LANCHOR2
0000069c l .text 00000000 $d
000006b0 l .text 00000000 $a
00000de8 l .text 00000000 $d
00000000 l d .rodata 00000000 .rodata
00000000 l .rodata 00000000 $d
00000000 l O .rodata 00000120 vVertices
00000120 l O .rodata 00000120 vNormals
00000240 l O .rodata 0000000e __PRETTY_FUNCTION__.2
00000250 l O .rodata 00000013 __PRETTY_FUNCTION__.1
00000264 l O .rodata 00000013 __PRETTY_FUNCTION__.0
00000278 l O .rodata 00000009 __PRETTY_FUNCTION__.3
00000000 l .data 00000000 $d
00000000 l .bss 00000000 $d
00000000 l d .debug_info 00000000 .debug_info
00000000 l d .debug_abbrev 00000000 .debug_abbrev
00000000 l d .debug_loc 00000000 .debug_loc
00000000 l d .debug_aranges 00000000 .debug_aranges
00000000 l d .debug_ranges 00000000 .debug_ranges
00000000 l d .debug_line 00000000 .debug_line
00000000 l d .debug_str 00000000 .debug_str
00000000 l d .note.GNU-stack 00000000 .note.GNU-stack
00000000 l d .debug_frame 00000000 .debug_frame
00000000 l d .comment 00000000 .comment
00000000 l d .ARM.attributes 00000000 .ARM.attributes
00000000 *UND* 00000000 glClearColor
00000000 *UND* 00000000 glClear
00000000 *UND* 00000000 esMatrixLoadIdentity
00000000 *UND* 00000000 esTranslate
00000000 *UND* 00000000 esRotate
00000000 *UND* 00000000 esFrustum
00000000 *UND* 00000000 esMatrixMultiply
00000000 *UND* 00000000 glUniformMatrix4fv
00000000 *UND* 00000000 glUniformMatrix3fv
00000000 *UND* 00000000 glUniform1i
00000000 *UND* 00000000 glDrawArrays
00000000 *UND* 00000000 raw_512x512_nv12
00000000 *UND* 00000000 gbm_bo_create
00000000 *UND* 00000000 gbm_bo_map
00000000 *UND* 00000000 memcpy
00000000 *UND* 00000000 gbm_bo_unmap
00000000 *UND* 00000000 gbm_bo_get_fd
00000000 w *UND* 00000000 gbm_bo_get_modifier
00000000 *UND* 00000000 gbm_bo_destroy
00000430 g F .text 000009d4 init_cube_tex
00000000 *UND* 00000000 init_egl
00000000 *UND* 00000000 create_program
00000000 *UND* 00000000 glBindAttribLocation
00000000 *UND* 00000000 link_program
00000000 *UND* 00000000 glUseProgram
00000000 *UND* 00000000 glGetUniformLocation
00000000 *UND* 00000000 glViewport
00000000 *UND* 00000000 glEnable
00000000 *UND* 00000000 glGenBuffers
00000000 *UND* 00000000 glBindBuffer
00000000 *UND* 00000000 glBufferData
00000000 *UND* 00000000 glBufferSubData
00000000 *UND* 00000000 glVertexAttribPointer
00000000 *UND* 00000000 glEnableVertexAttribArray
00000000 *UND* 00000000 puts
00000000 *UND* 00000000 glGenTextures
00000000 *UND* 00000000 __assert_fail
00000000 *UND* 00000000 glActiveTexture
00000000 *UND* 00000000 glBindTexture
00000000 *UND* 00000000 glTexParameteri
00000000 *UND* 00000000 raw_512x512_rgba
00000000 *UND* 00000000 printf
00000000 g O .data 000000c0 vTexCoords
000000c0 g O .data 00000004 egl
00000000 g O .bss 00000078 gl
rd@h370-wlan:~/tmp.nobackup/git/LibreELEC.tv/build.LibreELEC-iMX6.arm-9.80-devel/build/kmscube-98f31bf/.armv7a-libreelec-linux-gnueabihf$ objdump -t kmscube-cube-smooth.o
kmscube-cube-smooth.o: file format elf32-little
SYMBOL TABLE:
00000000 l df *ABS* 00000000 cube-smooth.c
00000000 l d .text 00000000 .text
00000000 l d .data 00000000 .data
00000000 l d .bss 00000000 .bss
00000000 l .text 00000000 $a
00000000 l F .text 0000020c draw_cube_smooth
00000000 l .bss 00000000 .LANCHOR0
000001f8 l .text 00000000 $d
00000000 l d .rodata.str1.4 00000000 .rodata.str1.4
00000000 l .rodata.str1.4 00000000 $d
00000000 l .rodata.str1.4 00000000 .LC0
00000124 l .rodata.str1.4 00000000 .LC1
000004ac l .rodata.str1.4 00000000 .LC2
000004b8 l .rodata.str1.4 00000000 .LC3
000004c4 l .rodata.str1.4 00000000 .LC4
000004d0 l .rodata.str1.4 00000000 .LC5
000004e0 l .rodata.str1.4 00000000 .LC6
000004fc l .rodata.str1.4 00000000 .LC7
0000020c l .text 00000000 $a
00000000 l .rodata 00000000 .LANCHOR1
0000042c l .text 00000000 $d
00000000 l d .rodata 00000000 .rodata
00000000 l .rodata 00000000 $d
00000000 l O .rodata 00000120 vVertices
00000120 l O .rodata 00000120 vColors
00000240 l O .rodata 00000120 vNormals
00000000 l .bss 00000000 $d
00000000 l d .debug_info 00000000 .debug_info
00000000 l d .debug_abbrev 00000000 .debug_abbrev
00000000 l d .debug_loc 00000000 .debug_loc
00000000 l d .debug_aranges 00000000 .debug_aranges
00000000 l d .debug_line 00000000 .debug_line
00000000 l d .debug_str 00000000 .debug_str
00000000 l d .note.GNU-stack 00000000 .note.GNU-stack
00000000 l d .debug_frame 00000000 .debug_frame
00000000 l d .comment 00000000 .comment
00000000 l d .ARM.attributes 00000000 .ARM.attributes
00000000 *UND* 00000000 glClearColor
00000000 *UND* 00000000 glClear
00000000 *UND* 00000000 esMatrixLoadIdentity
00000000 *UND* 00000000 esTranslate
00000000 *UND* 00000000 esRotate
00000000 *UND* 00000000 esFrustum
00000000 *UND* 00000000 esMatrixMultiply
00000000 *UND* 00000000 glUniformMatrix4fv
00000000 *UND* 00000000 glUniformMatrix3fv
00000000 *UND* 00000000 glDrawArrays
0000020c g F .text 00000228 init_cube_smooth
00000000 *UND* 00000000 init_egl
00000000 *UND* 00000000 create_program
00000000 *UND* 00000000 glBindAttribLocation
00000000 *UND* 00000000 link_program
00000000 *UND* 00000000 glUseProgram
00000000 *UND* 00000000 glGetUniformLocation
00000000 *UND* 00000000 glViewport
00000000 *UND* 00000000 glEnable
00000000 *UND* 00000000 glGenBuffers
00000000 *UND* 00000000 glBindBuffer
00000000 *UND* 00000000 glBufferData
00000000 *UND* 00000000 glBufferSubData
00000000 *UND* 00000000 glVertexAttribPointer
00000000 *UND* 00000000 glEnableVertexAttribArray
00000000 g O .bss 00000060 gl
rd@h370-wlan:~/tmp.nobackup/git/LibreELEC.tv/build.LibreELEC-iMX6.arm-9.80-devel/build/kmscube-98f31bf/.armv7a-libreelec-linux-gnueabihf$
Display More
Please let me know if anything further information is needed.
Thanks
Rainer