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 doesn't resolve dependencies in (+) modes if an intermediate header file is located outside lib folders #4818

Open
valeros opened this issue Jan 5, 2024 · 1 comment
Labels
bug ldf Library Dependency Finder
Milestone

Comments

@valeros
Copy link
Member

valeros commented Jan 5, 2024

Description of problem

LDF (in any mode that evaluates C/C++ Preprocessor conditional syntax) is not able to find a dependency when a header from that dependency is hidden under an ifdef guard and the macro that enables the include header file is located outside search paths (framework libraries, include and src folders) passed to CCONDITIONAL_SCANNER,

For example the CONFIG_ETH_ENABLED macro in the code below is set in the sdkconfig.h file which is located in the framework folder $PIO_PACKAGES/framework-arduinoespressif32/tools/sdk/esp32/dio_qspi/include.

Steps to Reproduce

Compile the following code:

#include <Arduino.h>
#include <sdkconfig.h>

#ifdef CONFIG_ETH_ENABLED
#include "ETH.h"
#endif

void setup() {}

void loop() {}

with the following configuration:

[env:esp32dev]
platform = espressif32
framework = arduino
board = esp32dev
lib_ldf_mode = deep+

Actual Results

Scanning dependencies...
No dependencies
Compiling .pio\build\esp32dev\src\main.cpp.o
src/main.cpp:25:10: fatal error: ETH.h: No such file or directory

Expected Results

Scanning dependencies...
Dependency Graph
|-- Ethernet @ 2.0.0
@sklyarovaleksey
Copy link

The same issue

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

3 participants