es-ude / EmbeddedSystemsBuildScripts

Bazel build scripts used for all projects of the embedded systems department
MIT License
4 stars 5 forks source link

Missing include path for newlib library #23

Open pixelboehm opened 4 years ago

pixelboehm commented 4 years ago

The compilation of an ARM cortex-m4 project on ubuntu might show the following error

this rule is missing dependency declarations for the following files included by 'Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c':
  '/usr/include/newlib/stdint.h'
  '/usr/include/newlib/machine/_default_types.h'
  '/usr/include/newlib/sys/features.h'
  '/usr/include/newlib/_newlib_version.h'
  '/usr/include/newlib/sys/_intsup.h'
  '/usr/include/newlib/sys/_stdint.h'

I would guess that the compiler want to include the newlib library although he initially shouldn't do that.

This problem is only produced on the following systems: OS: Ubuntu 18.04, Ubuntu 19.09, Ubuntu 20.04 (and maybe any other Debian based Linux distribution) Compiler: arm-none-eabi-gcc version: 6.x,9.2.x

The build process itself works fine under different OSes with the above listet compiler versions

A workaround for the problem is incoming. The problem might need further investigation.