All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jon Mason" <jdmason@kudzu.us>
To: meta-arm@lists.yoctoproject.org
Subject: Re: [meta-arm] [PATCH] meta-arm-bsp: Update gem5 and switch to python3
Date: Wed, 6 May 2020 11:56:42 -0400	[thread overview]
Message-ID: <20200506155642.GA22996@kudzu.us> (raw)
In-Reply-To: <20200501134650.3707-1-bertrand.marquis@arm.com>

On Fri, May 01, 2020 at 02:46:50PM +0100, Bertrand Marquis wrote:
> This patch includes several fixes for gem5-aarch64
> - Switch to a new version of gem5 supporting python3 and use python3 to
>  build it.
>  We use a version in develop branch of gem5 for now and we will have to
>  switch to release 20 once it is released mid of may.
> - Remove scons python2 recipes which were used before by gem5 as a
>  workaround until gem5 was updated to support python3
> - make gem5-aarch64-bootloader only compatible with gem5-aarch64
> - remove unnecessary FILESEXTRAPATHS_prepend in gem5-aarch64-bootloader



I'm seeing an error when compiling this, which I wasn't seeing before.



ERROR: gem5-aarch64-native-gitAUTOINC+0c7f131ed2-r0 do_compile: scons build execution failed.
ERROR: gem5-aarch64-native-gitAUTOINC+0c7f131ed2-r0 do_compile: Execution of '/home/jdm/yocto/poky/build/tmp/work/x86_64-linux/gem5-aarch64-native/gitAUTOINC+0c7f131ed2-r0/temp/run.do_compile.5490' failed with exit code 1:
scons: Reading SConscript files ...
TypeError: object of type 'map' has no len():
  File "/home/jdm/yocto/poky/build/tmp/work/x86_64-linux/gem5-aarch64-native/gitAUTOINC+0c7f131ed2-r0/git/SConstruct", line 405:
    compareVersions(gcc_version, '8.1') < 0:
  File "/home/jdm/yocto/poky/build/tmp/work/x86_64-linux/gem5-aarch64-native/gitAUTOINC+0c7f131ed2-r0/git/src/python/m5/util/__init__.py", line 139:
    if len(v1) < len(v2): return -1
WARNING: exit code 1 from a shell command.

ERROR: Logfile of failure stored in: /home/jdm/yocto/poky/build/tmp/work/x86_64-linux/gem5-aarch64-native/gitAUTOINC+0c7f131ed2-r0/temp/log.do_compile.5490
Log data follows:
| DEBUG: Executing shell function do_compile
| scons: Reading SConscript files ...
| TypeError: object of type 'map' has no len():
|   File "/home/jdm/yocto/poky/build/tmp/work/x86_64-linux/gem5-aarch64-native/gitAUTOINC+0c7f131ed2-r0/git/SConstruct", line 405:
|     compareVersions(gcc_version, '8.1') < 0:
|   File "/home/jdm/yocto/poky/build/tmp/work/x86_64-linux/gem5-aarch64-native/gitAUTOINC+0c7f131ed2-r0/git/src/python/m5/util/__init__.py", line 139:
|     if len(v1) < len(v2): return -1
| ERROR: scons build execution failed.
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/home/jdm/yocto/poky/build/tmp/work/x86_64-linux/gem5-aarch64-native/gitAUTOINC+0c7f131ed2-r0/temp/run.do_compile.5490' failed with exit code 1:
| scons: Reading SConscript files ...
| TypeError: object of type 'map' has no len():
|   File "/home/jdm/yocto/poky/build/tmp/work/x86_64-linux/gem5-aarch64-native/gitAUTOINC+0c7f131ed2-r0/git/SConstruct", line 405:
|     compareVersions(gcc_version, '8.1') < 0:
|   File "/home/jdm/yocto/poky/build/tmp/work/x86_64-linux/gem5-aarch64-native/gitAUTOINC+0c7f131ed2-r0/git/src/python/m5/util/__init__.py", line 139:
|     if len(v1) < len(v2): return -1
| WARNING: exit code 1 from a shell command.
|
ERROR: Task (/home/jdm/yocto/meta-arm/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-native_git.bb:do_compile) failed with exit code '1'









> 
> Change-Id: Iad9af4f2e6073ef63a51c2c33a05ed3855dd8f08
> Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
> ---
>  .../gem5/gem5-aarch64-bootloader.inc          |  3 +--
>  .../gem5/gem5-aarch64-bootloader_git.bb       |  9 ++++----
>  .../recipes-devtools/gem5/gem5-aarch64-dtb.bb |  5 -----
>  .../gem5/gem5-aarch64-native_git.bb           |  6 ++++--
>  .../recipes-devtools/gem5/gem5-native.inc     | 21 +++++++++----------
>  meta-arm-bsp/recipes-devtools/python/README   |  4 ----
>  .../python/python-scons-native_3.0.1.bb       |  8 -------
>  .../python/python-scons_3.0.1.bb              | 21 -------------------
>  8 files changed, 20 insertions(+), 57 deletions(-)
>  delete mode 100644 meta-arm-bsp/recipes-devtools/python/README
>  delete mode 100644 meta-arm-bsp/recipes-devtools/python/python-scons-native_3.0.1.bb
>  delete mode 100644 meta-arm-bsp/recipes-devtools/python/python-scons_3.0.1.bb
> 
> diff --git a/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-bootloader.inc b/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-bootloader.inc
> index 72069ad..4c479f5 100644
> --- a/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-bootloader.inc
> +++ b/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-bootloader.inc
> @@ -7,8 +7,7 @@ inherit deploy
>  
>  PROVIDES = "virtual/gem5-bootloader"
>  
> -COMPATIBLE_MACHINE ?= ""
> -COMPATIBLE_MACHINE_gem5_arm64 = "gem5-arm64"
> +COMPATIBLE_MACHINE = "gem5-arm64"
>  
>  # no configure step
>  do_configure[noexec] = "1"
> diff --git a/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-bootloader_git.bb b/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-bootloader_git.bb
> index ffbc2da..dcf45fb 100644
> --- a/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-bootloader_git.bb
> +++ b/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-bootloader_git.bb
> @@ -1,16 +1,17 @@
>  # gem5 custom bootloader
>  
> -FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
> -SRC_URI = "git://gem5.googlesource.com/public/gem5;protocol=https"
> -
>  LIC_FILES_CHKSUM = "file://COPYING;md5=2d9514d69d8abf88b6e9125e759bf0ab \
>                      file://LICENSE;md5=a585e2893cee63d16a1d8bc16c6297ec"
>  
> +# The recipe is currently using a version in the development branch of gem5
> +# until version 20 with python3 support is released
> +SRC_URI = "git://gem5.googlesource.com/public/gem5;protocol=https;branch=develop"
> +
>  PV = "git${SRCPV}"
>  
>  S = "${WORKDIR}/git"
>  
> -SRCREV = "bcf041f257623e5c9e77d35b7531bae59edc0423"
> +SRCREV = "0c7f131ed2ce008e8d17aa8530f790f934242713"
>  
>  BPN = "gem5-aarch64-bootloader"
>  
> diff --git a/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-dtb.bb b/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-dtb.bb
> index 362a8e0..b97a1b2 100644
> --- a/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-dtb.bb
> +++ b/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-dtb.bb
> @@ -9,14 +9,9 @@ DEPENDS = "gem5-aarch64-native"
>  do_configure[noexec] = "1"
>  
>  do_compile() {
> -    # Gem5 is requiring a non zero size disk even though it is not required to
> -    # generate the dtb. Use /proc/version as disk file.
> -
>      # generate a dtb using gem5
>      gem5.opt \
>          ${STAGING_DATADIR_NATIVE}/gem5/configs/example/arm/baremetal.py \
> -        --disk-image /proc/version \
> -        --kernel "" \
>          --dtb-gen
>  
>      if [ ! -f m5out/system.dtb ]; then
> diff --git a/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-native_git.bb b/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-native_git.bb
> index 9c77121..1dc91ab 100644
> --- a/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-native_git.bb
> +++ b/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-native_git.bb
> @@ -3,13 +3,15 @@
>  LIC_FILES_CHKSUM = "file://COPYING;md5=2d9514d69d8abf88b6e9125e759bf0ab \
>                      file://LICENSE;md5=a585e2893cee63d16a1d8bc16c6297ec"
>  
> -SRC_URI = "git://gem5.googlesource.com/public/gem5;protocol=https"
> +# The recipe is currently using a version in the development branch of gem5
> +# until version 20 with python3 support is released
> +SRC_URI = "git://gem5.googlesource.com/public/gem5;protocol=https;branch=develop"
>  
>  PV = "git${SRCPV}"
>  
>  S = "${WORKDIR}/git"
>  
> -SRCREV = "bcf041f257623e5c9e77d35b7531bae59edc0423"
> +SRCREV = "0c7f131ed2ce008e8d17aa8530f790f934242713"
>  
>  BPN = "gem5-aarch64-native"
>  
> diff --git a/meta-arm-bsp/recipes-devtools/gem5/gem5-native.inc b/meta-arm-bsp/recipes-devtools/gem5/gem5-native.inc
> index 4b02d13..429e18c 100644
> --- a/meta-arm-bsp/recipes-devtools/gem5/gem5-native.inc
> +++ b/meta-arm-bsp/recipes-devtools/gem5/gem5-native.inc
> @@ -11,30 +11,29 @@ GEM5_BUILD_CONFIGS ?= "build/X86/gem5.opt"
>  
>  # Scons build arguments
>  GEM5_SCONS_ARGS ?= "-j ${BB_NUMBER_THREADS} CC=${BUILD_CC} CXX=${BUILD_CXX} \
> -    AS=${BUILD_AS} AR=${BUILD_AR} ${GEM5_BUILD_CONFIGS}"
> +    AS=${BUILD_AS} AR=${BUILD_AR} ${GEM5_BUILD_CONFIGS} \
> +    PYTHON_CONFIG=python3-config"
>  
>  # Default profile to run
>  GEM5_RUN_PROFILE ?= "configs/example/fs.py"
>  
> -# We are building a native package and we need to use python
> -inherit native pythonnative
> +# We are building a native package and we need to use scons
> +inherit native scons
>  
>  # the build is using several tools:
> -# python: scons and six
> +# python3: scons and six
>  # google protobuf
>  # pkgconfig
>  # hdf5
> -DEPENDS += "python-native python-scons-native python-six-native \
> -    protobuf-native hdf5-native pkgconfig-native boost-native libpng-native"
> +DEPENDS += "python3-six-native protobuf-native hdf5-native pkgconfig-native \
> +    boost-native libpng-native"
>  
> -do_configure[noexec] = "1"
> +EXTRA_OESCONS = "${GEM5_SCONS_ARGS}"
>  
> -do_compile() {
> +do_compile_prepend() {
>      # We need to use the proper native libraries when executing
>      # compiled applications
>      export LD_LIBRARY_PATH="${STAGING_LIBDIR_NATIVE}"
> -
> -    scons ${GEM5_SCONS_ARGS}
>  }
>  
>  do_install() {
> @@ -58,5 +57,5 @@ EOF
>  
>  FILES_${PN} = "${datadir}/gem5/* ${bindir}/*"
>  INSANE_SKIP_${PN} += "already-stripped"
> -RDEPENDS_${PN} += "python-native hdf5-native protobuf-native libpng-native"
> +RDEPENDS_${PN} += "python3-native hdf5-native protobuf-native libpng-native"
>  
> diff --git a/meta-arm-bsp/recipes-devtools/python/README b/meta-arm-bsp/recipes-devtools/python/README
> deleted file mode 100644
> index b80c757..0000000
> --- a/meta-arm-bsp/recipes-devtools/python/README
> +++ /dev/null
> @@ -1,4 +0,0 @@
> -This is added for Gem5 compilation with Zeus as it has been removed from
> -OpenEmbedded (and Gem5 needs scons to be compiled).
> -
> -This should be removed once Gem5 supports properly python3.
> diff --git a/meta-arm-bsp/recipes-devtools/python/python-scons-native_3.0.1.bb b/meta-arm-bsp/recipes-devtools/python/python-scons-native_3.0.1.bb
> deleted file mode 100644
> index 68b63c9..0000000
> --- a/meta-arm-bsp/recipes-devtools/python/python-scons-native_3.0.1.bb
> +++ /dev/null
> @@ -1,8 +0,0 @@
> -require python-scons_${PV}.bb
> -inherit native pythonnative
> -DEPENDS = "python-native"
> -RDEPENDS_${PN} = ""
> -
> -do_install_append() {
> -    create_wrapper ${D}${bindir}/scons SCONS_LIB_DIR='${STAGING_DIR_HOST}/${PYTHON_SITEPACKAGES_DIR}' PYTHONNOUSERSITE='1'
> -}
> diff --git a/meta-arm-bsp/recipes-devtools/python/python-scons_3.0.1.bb b/meta-arm-bsp/recipes-devtools/python/python-scons_3.0.1.bb
> deleted file mode 100644
> index d5084b2..0000000
> --- a/meta-arm-bsp/recipes-devtools/python/python-scons_3.0.1.bb
> +++ /dev/null
> @@ -1,21 +0,0 @@
> -SUMMARY = "Software Construction tool (make/autotools replacement)"
> -SECTION = "devel/python"
> -LICENSE = "MIT"
> -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=46ddf66004e5be5566367cb525a66fc6"
> -
> -SRC_URI[md5sum] = "b6a292e251b34b82c203b56cfa3968b3"
> -SRC_URI[sha256sum] = "24475e38d39c19683bc88054524df018fe6949d70fbd4c69e298d39a0269f173"
> -
> -UPSTREAM_CHECK_URI = "http://scons.org/pages/download.html"
> -UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
> -
> -inherit pypi setuptools
> -
> -RDEPENDS_${PN} = "\
> -  python-fcntl \
> -  python-io \
> -  python-json \
> -  python-subprocess \
> -  python-shell \
> -  python-pprint \
> -  "
> -- 
> 2.17.1
> 

> 


  reply	other threads:[~2020-05-06 15:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-01 13:46 [PATCH] meta-arm-bsp: Update gem5 and switch to python3 Bertrand Marquis
2020-05-06 15:56 ` Jon Mason [this message]
2020-05-06 16:02   ` [meta-arm] " Bertrand Marquis
2020-05-06 16:38     ` Bertrand Marquis
2020-05-07 19:33       ` Jon Mason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200506155642.GA22996@kudzu.us \
    --to=jdmason@kudzu.us \
    --cc=meta-arm@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.