Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LDF default-includes wrong libs for "Arduino IoT Cloud" + Portenta H7 #4814

Open
1 task done
maxgerhardt opened this issue Dec 22, 2023 · 0 comments
Open
1 task done
Labels
bug ldf Library Dependency Finder

Comments

@maxgerhardt
Copy link
Contributor

maxgerhardt commented Dec 22, 2023

What kind of issue is this?

  • PlatformIO Core.
    If you’ve found a bug, please provide an information below.

You can erase any parts of this template not applicable to your Issue.


Configuration

Operating system: Windows 10 x64

PlatformIO Version (platformio --version): 6.1.12a6

Description of problem

Derived from community topic.

Attempting to compile the [ArduinoIoTCloud-Basic}(https://github.com/arduino-libraries/ArduinoIoTCloud/tree/1.13.0/examples/ArduinoIoTCloud-Basic) example for a Portenta H7 fails to compile, even with LDF mode set to deep+, because of the inclusion of wrong libraries.

Users should not have the expertise or trouble to manually pick out the wrong libraries with lib_ignore and are expecting it to work the same as in the Arduino IDE, which does compile it cleanly.

Steps to Reproduce

  1. Create a new Portenta H7 project
  2. Use the platformio.ini
[env:portenta_h7_m7]
platform = ststm32
board = portenta_h7_m7
framework = arduino
lib_ldf_mode = deep+
lib_deps =
   arduino-libraries/ArduinoIoTCloud@^1.13.0
  1. Copy over all files in the example to src/
  2. Hit build

Actual Results

Tons of build errors from libraries that should not be built, like WiFiNINA, WiFi101

Expected Results

Compiles okay, the same way as in the Arduino IDE.

If problems with PlatformIO Build System:

platformio.ini and code per above.

Additional info

It does build with

lib_ignore =
   WiFiNINA
   WiFi101
   MKRNB
   MKRGSM
   Arduino_ESP32_OTA
   RTCZero

added. Per above that's not too user-friendly. PlatformIO should user stricter checking if sub-dependencies are downloaded and included.

Another note is that setting

lib_compat_mode = strict

will fail the build more drastically, since even the Arduino IoT libary is filtered out completely. PlatformIO does not seem to recognize that board = portenta_h7_m7, framework = arduino matches mbed_portenta within the declared architectures

https://github.com/arduino-libraries/ArduinoIoTCloud/blob/d436b80f099be3bbc9132248aae24c3042836446/library.properties#L9

@maxgerhardt maxgerhardt changed the title LDF includes wrong libs for "Arduino IoT Cloud" + Portenta H7 LDF default-includes wrong libs for "Arduino IoT Cloud" + Portenta H7 Dec 22, 2023
@ivankravets ivankravets added bug ldf Library Dependency Finder labels Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ldf Library Dependency Finder
Projects
None yet
Development

No branches or pull requests

2 participants