PlatformIO Community

Building problem in github action vm

Hi all,

I’m looking for a build a project with github action when push a version on github.
my script is working fine on a VM I clone all my repository need for building the project I create en environnement var PLATFORMIO_LIB_EXTRA_DIRS to use local repository.
untl now no problem, I run plateformio download all library that it need and use repositroy as expected.

Pb is that I have a building problem platformio could not find some file and create an error.

Lets me explain that I do the same thing on my laptop and there is no building problem

this is the log on github after creating my vm clone my repositry and run platformio

********************************************************************************
If you like PlatformIO, please:
- follow us on Twitter to stay up-to-date on the latest project news > https://twitter.com/PlatformIO_Org
- star it on GitHub > https://github.com/platformio/platformio
- try PlatformIO IDE for embedded development > https://platformio.org/platformio-ide
********************************************************************************

Processing l0 (platform: ststm32; board: l0; framework: stm32cube; build_flags: -I inc -Og, -D MAX_CONTAINER_NUMBER=1, -D MAX_MSG_NB=5; lib_extra_dirs: ../../Drivers/, /home/runner/work/Luos/Luos; lib_deps: Luos@>0.6.6; debug_tool: stlink)
--------------------------------------------------------------------------------
Platform Manager: Installing ststm32
Downloading...
Unpacking...
Platform Manager: ststm32 @ 9.0.0 has been installed!
The platform 'ststm32' has been successfully installed!
The rest of the packages will be installed later depending on your build environment.
Tool Manager: Installing platformio/toolchain-gccarmnoneeabi @ >=1.60301.0,<1.80000.0
Downloading...
Unpacking...
Tool Manager: toolchain-gccarmnoneeabi @ 1.70201.0 has been installed!
Tool Manager: Installing platformio/framework-stm32cube @ ~2.0.181130
Downloading...
Unpacking...
Tool Manager: framework-stm32cube @ 2.0.200813 has been installed!
Tool Manager: Installing platformio/tool-dfuutil @ ~1.9.190708
Downloading...
Unpacking...
Tool Manager: tool-dfuutil @ 1.9.200310 has been installed!
Tool Manager: Installing platformio/tool-ldscripts-ststm32 @ ~0.1.0
Downloading...
Unpacking...
Tool Manager: tool-ldscripts-ststm32 @ 0.1.0 has been installed!
Tool Manager: Installing platformio/tool-scons @ ~4.40001.0
Downloading...
Unpacking...
Tool Manager: tool-scons @ 4.40001.0 has been installed!
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/l0.html
PLATFORM: ST STM32 (9.0.0) > L0
HARDWARE: STM32F072VBT6 48MHz, 16KB RAM, 128KB Flash
DEBUG: Current (stlink) External (stlink)
PACKAGES: 
 - framework-stm32cube 2.0.200813 
 - tool-dfuutil 1.9.200310 
 - tool-ldscripts-ststm32 0.1.0 
 - toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 24 compatible libraries
Scanning dependencies...
Warning! Circular dependencies detected between `/home/runner/work/Luos/Luos/LuosHAL` and `/home/runner/work/Luos/Luos/Luos`
Dependency Graph
|-- <Luos> 0.8.0 (/home/runner/work/Luos/Luos/Luos)
|   |-- <LuosHAL> 0.0.3 (/home/runner/work/Luos/Luos/LuosHAL)
|-- <Button> 0.6.0 (/home/runner/work/Luos/Luos/Examples/Drivers/Button)
|   |-- <Luos> 0.8.0 (/home/runner/work/Luos/Luos/Luos)
|   |   |-- <LuosHAL> 0.0.3 (/home/runner/work/Luos/Luos/LuosHAL)
Building in release mode
arm-none-eabi-gcc -o .pio/build/l0/src/gpio.o -c -Og -Os -ffunction-sections -fdata-sections -Wall -mthumb -mcpu=cortex-m0 -nostdlib -DPLATFORMIO=50003 -DSTM32F072xB -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER -DLUOSHAL=STM32F0 -DMAX_CONTAINER_NUMBER=1 -DMAX_MSG_NB=5 -DUSE_HAL_DRIVER -DF_CPU=48000000L -Isrc -I/home/runner/work/Luos/Luos/Examples/Drivers/Button -I/home/runner/work/Luos/Luos/LuosHAL -I/home/runner/work/Luos/Luos/Luos/src -I/home/runner/.platformio/platforms/ststm32/builder/Inc -I/home/runner/work/Luos/Luos/LuosHAL/STM32F0 -I/home/runner/work/Luos/Luos/Luos/inc -I/home/runner/work/Luos/Luos/Luos/OD -I/home/runner/work/Luos/Luos/Luos/Robus/inc -Iinc -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/Include -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/Device/ST/STM32F0xx/Include -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/STM32F0xx_HAL_Driver/Inc -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common src/gpio.c
arm-none-eabi-gcc -o .pio/build/l0/src/main.o -c -Og -Os -ffunction-sections -fdata-sections -Wall -mthumb -mcpu=cortex-m0 -nostdlib -DPLATFORMIO=50003 -DSTM32F072xB -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER -DLUOSHAL=STM32F0 -DMAX_CONTAINER_NUMBER=1 -DMAX_MSG_NB=5 -DUSE_HAL_DRIVER -DF_CPU=48000000L -Isrc -I/home/runner/work/Luos/Luos/Examples/Drivers/Button -I/home/runner/work/Luos/Luos/LuosHAL -I/home/runner/work/Luos/Luos/Luos/src -I/home/runner/.platformio/platforms/ststm32/builder/Inc -I/home/runner/work/Luos/Luos/LuosHAL/STM32F0 -I/home/runner/work/Luos/Luos/Luos/inc -I/home/runner/work/Luos/Luos/Luos/OD -I/home/runner/work/Luos/Luos/Luos/Robus/inc -Iinc -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/Include -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/Device/ST/STM32F0xx/Include -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/STM32F0xx_HAL_Driver/Inc -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common src/main.c
arm-none-eabi-gcc -o .pio/build/l0/src/stm32f0xx_hal_msp.o -c -Og -Os -ffunction-sections -fdata-sections -Wall -mthumb -mcpu=cortex-m0 -nostdlib -DPLATFORMIO=50003 -DSTM32F072xB -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER -DLUOSHAL=STM32F0 -DMAX_CONTAINER_NUMBER=1 -DMAX_MSG_NB=5 -DUSE_HAL_DRIVER -DF_CPU=48000000L -Isrc -I/home/runner/work/Luos/Luos/Examples/Drivers/Button -I/home/runner/work/Luos/Luos/LuosHAL -I/home/runner/work/Luos/Luos/Luos/src -I/home/runner/.platformio/platforms/ststm32/builder/Inc -I/home/runner/work/Luos/Luos/LuosHAL/STM32F0 -I/home/runner/work/Luos/Luos/Luos/inc -I/home/runner/work/Luos/Luos/Luos/OD -I/home/runner/work/Luos/Luos/Luos/Robus/inc -Iinc -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/Include -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/Device/ST/STM32F0xx/Include -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/STM32F0xx_HAL_Driver/Inc -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common src/stm32f0xx_hal_msp.c
arm-none-eabi-gcc -o .pio/build/l0/src/stm32f0xx_it.o -c -Og -Os -ffunction-sections -fdata-sections -Wall -mthumb -mcpu=cortex-m0 -nostdlib -DPLATFORMIO=50003 -DSTM32F072xB -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER -DLUOSHAL=STM32F0 -DMAX_CONTAINER_NUMBER=1 -DMAX_MSG_NB=5 -DUSE_HAL_DRIVER -DF_CPU=48000000L -Isrc -I/home/runner/work/Luos/Luos/Examples/Drivers/Button -I/home/runner/work/Luos/Luos/LuosHAL -I/home/runner/work/Luos/Luos/Luos/src -I/home/runner/.platformio/platforms/ststm32/builder/Inc -I/home/runner/work/Luos/Luos/LuosHAL/STM32F0 -I/home/runner/work/Luos/Luos/Luos/inc -I/home/runner/work/Luos/Luos/Luos/OD -I/home/runner/work/Luos/Luos/Luos/Robus/inc -Iinc -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/Include -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/Device/ST/STM32F0xx/Include -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/STM32F0xx_HAL_Driver/Inc -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common src/stm32f0xx_it.c
arm-none-eabi-gcc -o .pio/build/l0/src/system_stm32f0xx.o -c -Og -Os -ffunction-sections -fdata-sections -Wall -mthumb -mcpu=cortex-m0 -nostdlib -DPLATFORMIO=50003 -DSTM32F072xB -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER -DLUOSHAL=STM32F0 -DMAX_CONTAINER_NUMBER=1 -DMAX_MSG_NB=5 -DUSE_HAL_DRIVER -DF_CPU=48000000L -Isrc -I/home/runner/work/Luos/Luos/Examples/Drivers/Button -I/home/runner/work/Luos/Luos/LuosHAL -I/home/runner/work/Luos/Luos/Luos/src -I/home/runner/.platformio/platforms/ststm32/builder/Inc -I/home/runner/work/Luos/Luos/LuosHAL/STM32F0 -I/home/runner/work/Luos/Luos/Luos/inc -I/home/runner/work/Luos/Luos/Luos/OD -I/home/runner/work/Luos/Luos/Luos/Robus/inc -Iinc -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/Include -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/Device/ST/STM32F0xx/Include -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/STM32F0xx_HAL_Driver/Inc -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common src/system_stm32f0xx.c
arm-none-eabi-gcc -o .pio/build/l0/src/usart.o -c -Og -Os -ffunction-sections -fdata-sections -Wall -mthumb -mcpu=cortex-m0 -nostdlib -DPLATFORMIO=50003 -DSTM32F072xB -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER -DLUOSHAL=STM32F0 -DMAX_CONTAINER_NUMBER=1 -DMAX_MSG_NB=5 -DUSE_HAL_DRIVER -DF_CPU=48000000L -Isrc -I/home/runner/work/Luos/Luos/Examples/Drivers/Button -I/home/runner/work/Luos/Luos/LuosHAL -I/home/runner/work/Luos/Luos/Luos/src -I/home/runner/.platformio/platforms/ststm32/builder/Inc -I/home/runner/work/Luos/Luos/LuosHAL/STM32F0 -I/home/runner/work/Luos/Luos/Luos/inc -I/home/runner/work/Luos/Luos/Luos/OD -I/home/runner/work/Luos/Luos/Luos/Robus/inc -Iinc -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/Include -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/Device/ST/STM32F0xx/Include -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/STM32F0xx_HAL_Driver/Inc -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common src/usart.c
arm-none-eabi-gcc -o .pio/build/l0/lib9fd/LuosHAL/STM32F0/luosHAL.o -c -Og -Os -ffunction-sections -fdata-sections -Wall -mthumb -mcpu=cortex-m0 -nostdlib -DPLATFORMIO=50003 -DSTM32F072xB -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER -DLUOSHAL=STM32F0 -DMAX_CONTAINER_NUMBER=1 -DMAX_MSG_NB=5 -DUSE_HAL_DRIVER -DF_CPU=48000000L -I/home/runner/work/Luos/Luos/LuosHAL -I/home/runner/work/Luos/Luos/Luos/src -I/home/runner/work/Luos/Luos/Luos/inc -I/home/runner/work/Luos/Luos/Luos/OD -I/home/runner/work/Luos/Luos/Luos/Robus/inc -Iinc -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/Include -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/Device/ST/STM32F0xx/Include -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/STM32F0xx_HAL_Driver/Inc -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common -I/home/runner/.platformio/platforms/ststm32/builder/Inc -I/home/runner/work/Luos/Luos/LuosHAL/STM32F0 /home/runner/work/Luos/Luos/LuosHAL/STM32F0/luosHAL.c
arm-none-eabi-gcc -o .pio/build/l0/lib37f/Robus/src/msgAlloc.o -c -Og -Os -ffunction-sections -fdata-sections -Wall -mthumb -mcpu=cortex-m0 -nostdlib -DPLATFORMIO=50003 -DSTM32F072xB -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER -DLUOSHAL=STM32F0 -DMAX_CONTAINER_NUMBER=1 -DMAX_MSG_NB=5 -DUSE_HAL_DRIVER -DF_CPU=48000000L -DVERSION=0.8.0 -I/home/runner/work/Luos/Luos/LuosHAL -I/home/runner/work/Luos/Luos/Luos/src -I/home/runner/.platformio/platforms/ststm32/builder/Inc -I/home/runner/work/Luos/Luos/LuosHAL/STM32F0 -Iinc -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/Include -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/Device/ST/STM32F0xx/Include -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/STM32F0xx_HAL_Driver/Inc -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common -I/home/runner/work/Luos/Luos/Luos/inc -I/home/runner/work/Luos/Luos/Luos/OD -I/home/runner/work/Luos/Luos/Luos/Robus/inc /home/runner/work/Luos/Luos/Luos/Robus/src/msgAlloc.c
arm-none-eabi-gcc-ar rc .pio/build/l0/lib9fd/libLuosHAL.a .pio/build/l0/lib9fd/LuosHAL/STM32F0/luosHAL.o
arm-none-eabi-gcc-ranlib .pio/build/l0/lib9fd/libLuosHAL.a
arm-none-eabi-gcc -o .pio/build/l0/lib37f/Robus/src/portManager.o -c -Og -Os -ffunction-sections -fdata-sections -Wall -mthumb -mcpu=cortex-m0 -nostdlib -DPLATFORMIO=50003 -DSTM32F072xB -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER -DLUOSHAL=STM32F0 -DMAX_CONTAINER_NUMBER=1 -DMAX_MSG_NB=5 -DUSE_HAL_DRIVER -DF_CPU=48000000L -DVERSION=0.8.0 -I/home/runner/work/Luos/Luos/LuosHAL -I/home/runner/work/Luos/Luos/Luos/src -I/home/runner/.platformio/platforms/ststm32/builder/Inc -I/home/runner/work/Luos/Luos/LuosHAL/STM32F0 -Iinc -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/Include -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/Device/ST/STM32F0xx/Include -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/STM32F0xx_HAL_Driver/Inc -I/home/runner/.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common -I/home/runner/work/Luos/Luos/Luos/inc -I/home/runner/work/Luos/Luos/Luos/OD -I/home/runner/work/Luos/Luos/Luos/Robus/inc /home/runner/work/Luos/Luos/Luos/Robus/src/portManager.c
/home/runner/work/Luos/Luos/Luos/Robus/src/portManager.c:11:10: fatal error: LuosHAL.h: No such file or directory

*****************************************************************
* Looking for LuosHAL.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:LuosHAL.h"
* Web  > https://platformio.org/lib/search?query=header:LuosHAL.h
*
*****************************************************************

 #include "LuosHAL.h"
          ^~~~~~~~~~~
compilation terminated.
*** [.pio/build/l0/lib37f/Robus/src/portManager.o] Error 1
========================= [FAILED] Took 39.36 seconds =========================
Error: Process completed with exit code 1.

What can be the difference between my local building and the building in the VM?
Do I make a mistake somewhere?

thanks for your reply

The way I see it, the not-found header file is in the LuosHAL library. This HAL library then executes a special python script…

… which will, depending a macro that is activated, add the board-specific include folder to the environment.

Since you want the STM32F0 to be included you have to do a build_flags = -D LUOSHAL=STM32F0.

Do you do that in the project? (You haven’t shown us the platformio.ini of the project, so we can’t know.)

Sorry actually I think I see the problem:

Well there is no LuosHAL.h. The hal folder only provides luosHAL.h. If you’re building in Linux, it has a case-sensitive file system. luosHAL != LuosHAL. Windows is case-insenstive.

Have you tried to duplicate the file inside /home/runner/work/Luos/Luos/LuosHAL/STM32F0/luosHAL.h also as LuosHAL.h?

Renaming the file would create incompatibilities – some files are looking for luosHAL.h and some for LuosHAL.h

has it technically correct because the file is also called luosHAL.h but

has it wrong. Interesting enough another file in the same folder gets it right again.

The include path is definitely added as can be seen in the compiler flag

 -I/home/runner/work/Luos/Luos/LuosHAL/STM32F0

it just can’t see the correct file because it’s technically not there.

Edit: I’ve opened https://github.com/Luos-io/Luos/pull/59 to correct this.

1 Like

hi Max,

Thanks for you reply and your PR. Indeed the problem come from a capital for linux building,
it was not the only place where we had the problem it will be fix in our next release.

regarding the including LuosHAL.h it is indeed pass through the compiler flag.

Thank you some much to help us on this pb and your interrest in Luos technology

Best regards