JeffyCN / meta-rockchip

Yocto BSP layer for the Rockchip SOC boards
Other
121 stars 93 forks source link

fails to build on scarthgap glibc #124

Closed asac closed 2 months ago

asac commented 2 months ago

Hello Jeffy,

on scarthgap i get error of glibc complaining about too old kernel headers when i build rockchip-rk3328-evb machine during configure:

| checking for libgd... no
| checking for maximum supported _FORTIFY_SOURCE level... 2
| checking whether the assembler requires one version per symbol... no
| checking for __builtin_trap with no external dependencies... yes
| checking whether the C++ compiler supports thread_local... no
| running configure fragment for sysdeps/unix/sysv/linux/aarch64
| running configure fragment for sysdeps/unix/sysv/linux
| checking installed Linux kernel header files... 3.2.0 or later
| checking for kernel header at least 5.15... too old!
| configure: error: *** The available kernel headers are older than the requested
| *** compatible kernel version
| NOTE: The following config.log files may provide further information.
| NOTE: /home/panta/yocto/panta/meta/meta-pantavisor/build/tmp-scarthgap/work/armv8a-poky-linux/glibc/2.39+git/build-aarch64-poky-linux/config.log
| ERROR: configure failed
| WARNING: exit code 1 from a shell command.

With this patch it seems to at least not fail early:

diff --git a/conf/machine/include/rockchip-common.inc b/conf/machine/include/rockchip-common.inc
index bff0612..130fafd 100644
--- a/conf/machine/include/rockchip-common.inc
+++ b/conf/machine/include/rockchip-common.inc
@@ -24,9 +24,9 @@ ROCKCHIP_KERNEL_COMPRESSED ?= "1"
 ROCKCHIP_KERNEL_IMAGES ?= "1"

 # Prefer using Rockchip BSP kernel 5.10
-PREFERRED_VERSION_linux-rockchip ?= "5.10%"
-LINUXLIBCVERSION ?= "5.10-custom%"
-OLDEST_KERNEL ?= "5.10"
+PREFERRED_VERSION_linux-rockchip ?= "6.1%"
+LINUXLIBCVERSION ?= "6.1-custom%"
+OLDEST_KERNEL ?= "6.1"

 # Custom kernel might not support newest python
 PACKAGECONFIG:remove:pn-perf = "scripting"
JeffyCN commented 2 months ago

i've uploaded a patch for it, please try it

asac commented 2 months ago

Thanks, with latest meta-rockchip i now get:


NOTE: Reconnecting to bitbake server...
WARNING: You have included the meta-virtualization layer, but 'virtualization' has not been enabled in your DISTRO_FEATURES. Some bbappend files may not take effect. See the meta-virtualization README for details on enabling virtualization support.
Loading cache: 100% |                                                                                                                                                                        | ETA:  --:--:--
Loaded 0 entries from dependency cache.
ERROR: /home/panta/yocto/panta/meta/meta-pantavisor/build/../poky/meta/recipes-core/glibc/glibc-testsuite_2.39.bb: Error during parse shell code, the last 5 lines are:                       | ETA:  0:00:44
        fi
    else
        bbfatal "no configure script found at $cfgscript"
    fi

WARNING: /home/panta/yocto/panta/meta/meta-pantavisor/build/../poky/meta/recipes-core/glibc/glibc-testsuite_2.39.bb: Exception during build_dependencies for oe_runconf
WARNING: /home/panta/yocto/panta/meta/meta-pantavisor/build/../poky/meta/recipes-core/glibc/glibc-testsuite_2.39.bb: Error during finalise of /home/panta/yocto/panta/meta/meta-pantavisor/build/../poky/meta/recipes-core/glibc/glibc-testsuite_2.39.bb
ERROR: /home/panta/yocto/panta/meta/meta-pantavisor/build/../poky/meta/recipes-core/glibc/glibc_2.39.bb: Error during parse shell code, the last 5 lines are:                                 | ETA:  0:00:36
        fi
    else
        bbfatal "no configure script found at $cfgscript"
    fi

WARNING: /home/panta/yocto/panta/meta/meta-pantavisor/build/../poky/meta/recipes-core/glibc/glibc_2.39.bb: Exception during build_dependencies for oe_runconf
WARNING: /home/panta/yocto/panta/meta/meta-pantavisor/build/../poky/meta/recipes-core/glibc/glibc_2.39.bb: Error during finalise of /home/panta/yocto/panta/meta/meta-pantavisor/build/../poky/meta/recipes-core/glibc/glibc_2.39.bb
ERROR: Unable to parse /home/panta/yocto/panta/meta/meta-pantavisor/build/../poky/meta/recipes-core/glibc/glibc_2.39.bb                                                                       | ETA:  0:00:21
Traceback (most recent call last):
  File "/home/panta/yocto/panta/meta/meta-pantavisor/poky/bitbake/lib/bb/codeparser.py", line 421, in ShellParser._parse_shell(value='\t# Use relative path to avoid buildpaths in files\n\tcfgscript_name="`basename //git/configure`"\n\tcfgscript=`python3 -c "import os; print(os.path.relpath(os.path.dirname(\'//git/configure\'), \'.\'))"`/$cfgscript_name\n\tif [ -x "$cfgscript" ] ; then\n\t\tbbnote "Running $cfgscript  --build=x86_64-linux \t\t  --host=aarch64-poky-linux \t\t  --target=aarch64-poky-linux \t\t  --prefix=/usr \t\t  --exec_prefix=/usr \t\t  --bindir=/usr/bin \t\t  --sbindir=/usr/sbin \t\t  --libexecdir=/usr/libexec \t\t  --datadir=/usr/share \t\t  --sysconfdir=/etc \t\t  --sharedstatedir=/com \t\t  --localstatedir=/var \t\t  --libdir=/usr/lib \t\t  --includedir=/usr/include \t\t  --oldincludedir=/usr/include \t\t  --infodir=/usr/share/info \t\t  --mandir=/usr/share/man \t\t  --disable-silent-rules \t\t  --disable-dependency-tracking \t\t  --with-libtool-sysroot=//recipe-sysroot --enable-kernel=d.getVar(\'LINUXLIBCVERSION\').split(\'-\')[0]                 --disable-profile                 --disable-debug --without-gd                 --enable-clocale=gnu                 --with-headers=//recipe-sysroot/usr/include                 --without-selinux                 --enable-bind-now                 --enable-stack-protector=strong                 --disable-crypt                 --with-default-link                 --disable-werror                 --enable-fortify-source                                                     --disable-static  --enable-memory-tagging --enable-nscd $@"\n\t\tif ! CONFIG_SHELL=${CONFIG_SHELL-/bin/bash}     ac_cv_path_BASH_SHELL=/bin/bash   ac_cv_prog_MSGFMT=   libc_cv_slibdir=/lib   libc_cv_rootsbindir=/sbin   libc_cv_localedir=/usr/lib/locale   libc_cv_ssp_strong=no   libc_cv_ssp_all=no   libc_cv_ssp=no   libc_cv_include_x86_isa_level=no  $cfgscript  --build=x86_64-linux \t\t  --host=aarch64-poky-linux \t\t  --target=aarch64-poky-linux \t\t  --prefix=/usr \t\t  --exec_prefix=/usr \t\t  --bindir=/usr/bin \t\t  --sbindir=/usr/sbin \t\t  --libexecdir=/usr/libexec \t\t  --datadir=/usr/share \t\t  --sysconfdir=/etc \t\t  --sharedstatedir=/com \t\t  --localstatedir=/var \t\t  --libdir=/usr/lib \t\t  --includedir=/usr/include \t\t  --oldincludedir=/usr/include \t\t  --infodir=/usr/share/info \t\t  --mandir=/usr/share/man \t\t  --disable-silent-rules \t\t  --disable-dependency-tracking \t\t  --with-libtool-sysroot=//recipe-sysroot --enable-kernel=d.getVar(\'LINUXLIBCVERSION\').split(\'-\')[0]                 --disable-profile                 --disable-debug --without-gd                 --enable-clocale=gnu                 --with-headers=//recipe-sysroot/usr/include                 --without-selinux                 --enable-bind-now                 --enable-stack-protector=strong                 --disable-crypt                 --with-default-link                 --disable-werror                 --enable-fortify-source                                                     --disable-static  --enable-memory-tagging --enable-nscd "$@"; then\n\t\t\tbbnote "The following config.log files may provide further information."\n\t\t\tbbnote `find //build-aarch64-poky-linux -ignore_readdir_race -type f -name config.log`\n\t\t\tbbfatal_log "configure failed"\n\t\tfi\n\telse\n\t\tbbfatal "no configure script found at $cfgscript"\n\tfi\n'):
             try:
    >            tokens, _ = pyshyacc.parse(value, eof=True, debug=False)
             except Exception:
  File "/home/panta/yocto/panta/meta/meta-pantavisor/poky/bitbake/lib/bb/pysh/pyshyacc.py", line 677, in parse(input='\t# Use relative path to avoid buildpaths in files\n\tcfgscript_name="`basename //git/configure`"\n\tcfgscript=`python3 -c "import os; print(os.path.relpath(os.path.dirname(\'//git/configure\'), \'.\'))"`/$cfgscript_name\n\tif [ -x "$cfgscript" ] ; then\n\t\tbbnote "Running $cfgscript  --build=x86_64-linux \t\t  --host=aarch64-poky-linux \t\t  --target=aarch64-poky-linux \t\t  --prefix=/usr \t\t  --exec_prefix=/usr \t\t  --bindir=/usr/bin \t\t  --sbindir=/usr/sbin \t\t  --libexecdir=/usr/libexec \t\t  --datadir=/usr/share \t\t  --sysconfdir=/etc \t\t  --sharedstatedir=/com \t\t  --localstatedir=/var \t\t  --libdir=/usr/lib \t\t  --includedir=/usr/include \t\t  --oldincludedir=/usr/include \t\t  --infodir=/usr/share/info \t\t  --mandir=/usr/share/man \t\t  --disable-silent-rules \t\t  --disable-dependency-tracking \t\t  --with-libtool-sysroot=//recipe-sysroot --enable-kernel=d.getVar(\'LINUXLIBCVERSION\').split(\'-\')[0]                 --disable-profile                 --disable-debug --without-gd                 --enable-clocale=gnu                 --with-headers=//recipe-sysroot/usr/include                 --without-selinux                 --enable-bind-now                 --enable-stack-protector=strong                 --disable-crypt                 --with-default-link                 --disable-werror                 --enable-fortify-source                                                     --disable-static  --enable-memory-tagging --enable-nscd $@"\n\t\tif ! CONFIG_SHELL=${CONFIG_SHELL-/bin/bash}     ac_cv_path_BASH_SHELL=/bin/bash   ac_cv_prog_MSGFMT=   libc_cv_slibdir=/lib   libc_cv_rootsbindir=/sbin   libc_cv_localedir=/usr/lib/locale   libc_cv_ssp_strong=no   libc_cv_ssp_all=no   libc_cv_ssp=no   libc_cv_include_x86_isa_level=no  $cfgscript  --build=x86_64-linux \t\t  --host=aarch64-poky-linux \t\t  --target=aarch64-poky-linux \t\t  --prefix=/usr \t\t  --exec_prefix=/usr \t\t  --bindir=/usr/bin \t\t  --sbindir=/usr/sbin \t\t  --libexecdir=/usr/libexec \t\t  --datadir=/usr/share \t\t  --sysconfdir=/etc \t\t  --sharedstatedir=/com \t\t  --localstatedir=/var \t\t  --libdir=/usr/lib \t\t  --includedir=/usr/include \t\t  --oldincludedir=/usr/include \t\t  --infodir=/usr/share/info \t\t  --mandir=/usr/share/man \t\t  --disable-silent-rules \t\t  --disable-dependency-tracking \t\t  --with-libtool-sysroot=//recipe-sysroot --enable-kernel=d.getVar(\'LINUXLIBCVERSION\').split(\'-\')[0]                 --disable-profile                 --disable-debug --without-gd                 --enable-clocale=gnu                 --with-headers=//recipe-sysroot/usr/include                 --without-selinux                 --enable-bind-now                 --enable-stack-protector=strong                 --disable-crypt                 --with-default-link                 --disable-werror                 --enable-fortify-source                                                     --disable-static  --enable-memory-tagging --enable-nscd "$@"; then\n\t\t\tbbnote "The following config.log files may provide further information."\n\t\t\tbbnote `find //build-aarch64-poky-linux -ignore_readdir_race -type f -name config.log`\n\t\t\tbbfatal_log "configure failed"\n\t\tfi\n\telse\n\t\tbbfatal "no configure script found at $cfgscript"\n\tfi\n', eof=True, debug=False):
             debug = 2
    >    return yacc.parse(lexer=lexer, debug=debug), remaining

  File "/home/panta/yocto/panta/meta/meta-pantavisor/poky/bitbake/lib/ply/yacc.py", line 267, in LRParser.parse(input=None, lexer=<bb.pysh.pyshlex.PLYLexer object at 0x7f0156064910>, debug=False, tracking=0, tokenfunc=None):
             else:
    >            return self.parseopt_notrack(input,lexer,debug,tracking,tokenfunc)

  File "/home/panta/yocto/panta/meta/meta-pantavisor/poky/bitbake/lib/ply/yacc.py", line 1049, in LRParser.parseopt_notrack(input=None, lexer=<bb.pysh.pyshlex.PLYLexer object at 0x7f0156064910>, debug=False, tracking=0, tokenfunc=None):
                                 errtoken.lexer = lexer
    >                        tok = self.errorfunc(errtoken)
                             del errok, token, restart   # Delete special functions
  File "/home/panta/yocto/panta/meta/meta-pantavisor/poky/bitbake/lib/bb/pysh/pyshyacc.py", line 650, in p_error(p=LexToken(LPARENS,'(',0,0)):
             w('Unexpected EOF')
    >    raise sherrors.ShellSyntaxError(''.join(msg))

bb.pysh.sherrors.ShellSyntaxError: LexToken(LPARENS,'(',0,0)
followed by:
  LexToken(TOKEN,"'LINUXLIBCVERSION'",0,0)
  LexToken(RPARENS,')',0,0)
  LexToken(TOKEN,'.split',0,0)
  LexToken(LPARENS,'(',0,0)
  LexToken(TOKEN,"'-'",0,0)

ERROR: Parsing halted due to errors, see error messages above```
JeffyCN commented 2 months ago

sorry, there's a typo, re-uploaded.