apache / nuttx

Apache NuttX is a mature, real-time embedded operating system (RTOS)
https://nuttx.apache.org/
Apache License 2.0
2.81k stars 1.16k forks source link

[BUG] ci output "/usr/bin/bash: line 1: p32-g++: command not found" #14374

Open xiaoxiang781216 opened 2 weeks ago

xiaoxiang781216 commented 2 weeks ago

Description / Steps to reproduce the issue

here is one of output: https://github.com/apache/nuttx/actions/runs/11365260351/job/31613141510?pr=14364

On which OS does this issue occur?

[OS: Linux]

What is the version of your OS?

Ubuntu

NuttX Version

master

Issue Architecture

[Arch: avr]

Issue Area

[Area: Build System]

Verification

xiaoxiang781216 commented 2 weeks ago

@lupyuen could you look at this problem?

lupyuen commented 2 weeks ago

Seems to be caused by tools/refresh.sh. The same kind of messages appear when we run tools/refresh.sh in our CI. Will track down some more.

./tools/refresh.sh --silent c5471evm/httpd
  Normalize c5471evm/httpd
/usr/bin/bash: line 1: arm-nuttx-eabi-g++: command not found

https://github.com/lupyuen5/label-nuttx/actions/runs/11343543363/job/31546412794

lupyuen commented 4 days ago

Sorry @simbit18: Would you have any idea why tools/refresh.sh is showing this message? Thanks!

simbit18 commented 4 days ago

@lupyuen if I'm not mistaken it seems to be solved here is not present [Linux (other)] https://github.com/apache/nuttx/actions/runs/11549938848/job/32143990355?pr=14528

====================================================================================
Configuration/Tool: flipnclick-pic32mz/nsh,CONFIG_MIPS32_TOOLCHAIN_PINGUINOL
2024-10-28 08:33:57
------------------------------------------------------------------------------------
  Cleaning...
  Configuring...
  Disabling CONFIG_MIPS32_TOOLCHAIN_GNU_ELF
  Enabling CONFIG_MIPS32_TOOLCHAIN_PINGUINOL
  Building NuttX...
  Normalize flipnclick-pic32mz/nsh
====================================================================================
Configuration/Tool: flipnclick-pic32mz/nxlines,CONFIG_MIPS32_TOOLCHAIN_PINGUINOL
2024-10-28 08:34:33
------------------------------------------------------------------------------------
  Cleaning...
  Configuring...
  Disabling CONFIG_MIPS32_TOOLCHAIN_GNU_ELF
  Enabling CONFIG_MIPS32_TOOLCHAIN_PINGUINOL
  Building NuttX...
  Normalize flipnclick-pic32mz/nxlines
====================================================================================
lupyuen commented 4 days ago

Thanks @simbit18! Wonder if this message could be caused by the same issue?

Configuration/Tool: c5471evm/nsh,CONFIG_ARM_TOOLCHAIN_GNU_EABI
/usr/bin/bash: line 1: arm-nuttx-eabi-gcc: command not found

https://github.com/NuttX/nuttx/actions/runs/11535897153/job/32116015943#step:7:242

simbit18 commented 4 days ago

I need to understand better but this warning seems related to the TOOLCHAIN change

Disabling CONFIG_ARM_TOOLCHAIN_BUILDROOT Enabling CONFIG_ARM_TOOLCHAIN_GNU_EABI

https://nuttx.apache.org/docs/latest/platforms/arm/c5471/boards/c5471evm/index.html

  1. By default, all configurations assume the NuttX Buildroot toolchain under Linux (should work under Windows with Cygwin as well). This is easily reconfigured:

    CONFIG_HOST_LINUX=y
    CONFIG_ARM_TOOLCHAIN_BUILDROOT=y
simbit18 commented 2 days ago

@lupyuen This warning appears in board-configs that have defconfig with enabled

CONFIG_ARM_TOOLCHAIN_BUILDROOT=y or CONFIG_ARM_TOOLCHAIN_BUILDROOT_OABI=y

attach list boards.txt.

The warning occurs when in refresh.sh runs make olddefconfig

make -C /__w/nuttx-testing/nuttx-testing/nuttxspace/apps preconfig
make[2]: Entering directory '/__w/nuttx-testing/nuttx-testing/nuttxspace/apps'
make[2]: Nothing to be done for 'preconfig'.
make[2]: Leaving directory '/__w/nuttx-testing/nuttx-testing/nuttxspace/apps'
make[1]: Leaving directory '/__w/nuttx-testing/nuttx-testing/nuttxspace/nuttx'
APPSDIR=../apps EXTERNALDIR=dummy APPSBINDIR=../apps BINDIR=/__w/nuttx-testing/nuttx-testing/nuttxspace/nuttx olddefconfig 2> >(grep -v "set more than once" | tee kwarning) | cat && if [ -s kwarning ]; then rm kwarning; exit 1; else rm kwarning; fi
Loaded configuration '.config'
Configuration saved to '.config'
/bin/bash: line 1: arm-nuttx-eabi-gcc: command not found
make -C /__w/nuttx-testing/nuttx-testing/nuttxspace/apps preconfig
make[1]: Entering directory '/__w/nuttx-testing/nuttx-testing/nuttxspace/apps'
/bin/bash: line 1: arm-nuttx-eabi-gcc: command not found
make[1]: Nothing to be done for 'preconfig'.
make[1]: Leaving directory '/__w/nuttx-testing/nuttx-testing/nuttxspace/apps'
APPSDIR="../apps" EXTERNALDIR=dummy APPSBINDIR="../apps" BINDIR=/__w/nuttx-testing/nuttx-testing/nuttxspace/nuttx savedefconfig --out defconfig.tmp 2> >(grep -v "set more than once" | tee kwarning) | cat && if [ -s kwarning ]; then rm kwarning; exit 1; else rm kwarning; fi
Loaded configuration '.config'
Minimal configuration saved to 'defconfig.tmp'

here it looks for arm-nuttx-eabi-gcc which of course is not present

NuttX buildroot - arch/arm/src/common/Toolchain.def

see this work by Greg @patacongo Building the Nuttx Toolchain - Buildroot https://bitbucket.org/nuttx/buildroot/src/master/

This warning is harmless !!! Possible solution is to remove CONFIG_ARM_TOOLCHAIN_BUILDROOT=y or CONFIG_ARM_TOOLCHAIN_BUILDROOT_OABI=y from defconfig

then using the default toolchain CONFIG_ARM_TOOLCHAIN_GNU_EABI (as is done in the initial build configuration)

xiaoxiang781216 commented 2 days ago

should we hide this harmless warning from script?

simbit18 commented 2 days ago

@xiaoxiang781216 I don't think so.

xiaoxiang781216 commented 2 days ago

why not? or we add nuttx toolchain to docker image?

simbit18 commented 2 days ago

or we add nuttx toolchain to docker image?

This might be a good alternative to remove the warning. However, being busy with my work, I have little time to test and add in the docker image.