PlatformIO Community

Library depends library for other board

Hello, so i’m trying to install this library, but when i do, building fails with

.pio/libdeps/nodemcuv2/STM32Ethernet/src/utility/stm32_eth.h:42:10: fatal error: stm32_def.h: No such file or directory

I did some research. and found out that it happens, because it installs some libraries that are not for esp8266. Any idea how to resolve this?

library.json

"dependencies": 
  [
    {
      "owner": "me-no-dev",
      "name": "AsyncTCP",
      "version": ">=1.1.1",
      "platforms": ["espressif32"]
    },
    {
      "owner": "me-no-dev",
      "name": "ESPAsyncTCP",
      "version": ">=1.2.2",
      "platforms": "espressif8266"
    },
    {
      "owner": "khoih-prog",
      "name": "ESPAsync_WiFiManager",
      "version": ">=1.12.2",
      "platforms": ["espressif8266", "espressif32"]
    },
    {
      "owner": "stm32duino",
      "name": "STM32duino LwIP",
      "version": ">=2.1.2",
      "platforms": "ststm32"
    },
    {
      "owner": "stm32duino",
      "name": "STM32Ethernet",
      "version": ">=1.2.0",
      "platforms": "ststm32"
    },
    {
      "owner": "lorol",
      "name": "LittleFS_esp32",
      "version": ">=1.0.6",
      "platforms": ["espressif32"]
    },
    {
      "owner": "khoih-prog",
      "name": "WebServer_WT32_ETH01",
      "version": ">=1.4.1",
      "platforms": ["espressif32"]
    },
    {
      "name": "STM32AsyncTCP",
      "version": "https://github.com/khoih-prog/STM32AsyncTCP"
    }
  ],

With lib_ldf_mode and lib_compat_mode these libraries should get weeded out. Try adding

lib_ldf_mode = chain+
lib_compat_mode = strict

to your platformio.ini

See docs.

2 Likes