Comments (9)
I believe your issue is probably a duplicate of #4885 that's already fixed in the dev branch. Please run pio upgrade --dev
in the IDE terminal and try again.
from platformio-core.
PlatformIO Core 6.1.15 has been released!
from platformio-core.
If you add #include <SparkFun_BMI270_Arduino_Library.h>
to your name_of_your_library.h or cpp
it will resolve all dependencies. Otherwise, you can set lib_ldf_mode = deep
for your library. Docs:
- https://docs.platformio.org/en/latest/librarymanager/ldf.html#dependency-finder-mode
- https://docs.platformio.org/en/latest/manifests/library-json/fields/build/libldfmode.html
from platformio-core.
Thanks @ivankravets .
Unfortunately, adding #include <SparkFun_BMI270_Arduino_Library.h>
to name_of_your_library.cpp
doesn't work for me.
My problem seems to be both simpler and stranger that what I originally described. Please see this repo of a minimal library:
https://github.com/sylque/Platformio_bugLib
And here is a simple project that includes this library:
platformio.ini:
[platformio]
default_envs = esp32
[env:esp32]
framework = arduino
platform = espressif32
board = m5stick-c
lib_deps =
https://github.com/sylque/Platformio_bugLib.git
main.cpp:
#include <Arduino.h>
void setup() {
}
void loop() {
}
Compilation result:
Scanning dependencies...
Dependency Graph
|-- Platformio_bugLib @ 1.0.0+sha.24e33b8
Building in release mode
Compiling .pio\build\esp32\lib254\Platformio_bugLib\Platformio_bugLib.cpp.o
.pio/libdeps/esp32/Platformio_bugLib/Platformio_bugLib.cpp:1:10: fatal error: SparkFun_BMI270_Arduino_Library.h: No such file or directory
It makes no sense to me. I've just spent two hours deleting .pio folders, doing Clean, Full Clean, reinstalling platformio, trying with symlink:, file:, etc. Sometimes it has worked, most of the time it hasn't. Any clue is welcome.
from platformio-core.
main.cpp:
Have you added #include <Platformio_bugLib.h>
to the one of the project files?
from platformio-core.
I provided you with all the code I'm using. There's no hidden project file, the only one is main.cpp
.
Or do you mean that I should add #include <Platformio_bugLib.h>
to main.cpp
? That wouldn't be good. I provide a library: it's up to the users of my library to decide if they want to include a file from my library or not. It should work the same in both cases.
Unfortunately, I cannot test whether adding #include <Platformio_bugLib.h>
to main.cpp
solves anything, because now it works properly! (without any change) The issue seems to occur randomly when you add or remove stuff in lib_deps
. For example, I've just changed from https://github.com/sylque/Platformio_bugLib.git
to symlink://../../../bugs/Platformio_bugLib
(exact same library), and now it works! But I'm sure the issue will be back soon.
May I ask what's the behavior on your side with the code I provided?
from platformio-core.
Hi @sylque, strange, but I cannot reproduce the issue. I took your platformio.ini
and main.cpp
, then just ran the project. Although there was an issue with missing SPI and Wire libraries, but after adding them to lib_deps
everything compiled just fine, here is the dependency graph from that project:
Dependency Graph
|-- Platformio_bugLib @ 1.0.0+sha.24e33b8
| |-- SparkFun BMI270 Arduino Library @ 1.0.2+sha.09d6aaf
| | |-- SPI @ 2.0.0
| | |-- Wire @ 2.0.0
|-- Wire @ 2.0.0
|-- SPI @ 2.0.0
Here is my test project if you're interested: platformio-core-issue-4900.zip
Am I missing something?
from platformio-core.
@valeros , here is the full output when I compile your project:
* Executing task in folder platformio-core-issue-4900: C:\Users\sylque\.platformio\penv\Scripts\platformio.exe run
Processing esp32 (framework: arduino; platform: espressif32; board: m5stick-c)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/m5stick-c.html
PLATFORM: Espressif 32 (6.6.0) > M5Stick-C
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
- framework-arduinoespressif32 @ 3.20014.231204 (2.0.14)
- tool-esptoolpy @ 1.40501.0 (4.5.1)
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 35 compatible libraries
Scanning dependencies...
Dependency Graph
|-- Platformio_bugLib @ 1.0.0+sha.24e33b8
|-- Wire @ 2.0.0
|-- SPI @ 2.0.0
Building in release mode
Compiling .pio\build\esp32\src\main.cpp.o
Building .pio\build\esp32\bootloader.bin
Generating partitions .pio\build\esp32\partitions.bin
Compiling .pio\build\esp32\lib210\Platformio_bugLib\Platformio_bugLib.cpp.o
.pio/libdeps/esp32/Platformio_bugLib/Platformio_bugLib.cpp:1:10: fatal error: SparkFun_BMI270_Arduino_Library.h: No such file or directory
*****************************************************************************************
* Looking for SparkFun_BMI270_Arduino_Library.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:SparkFun_BMI270_Arduino_Library.h"
* Web > https://registry.platformio.org/search?q=header:SparkFun_BMI270_Arduino_Library.h
*
*****************************************************************************************
#include <SparkFun_BMI270_Arduino_Library.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
esptool.py v4.5.1
Creating esp32 image...
Merged 1 ELF section
Successfully created esp32 image.
Compiling .pio\build\esp32\libaff\Wire\Wire.cpp.o
*** [.pio\build\esp32\lib210\Platformio_bugLib\Platformio_bugLib.cpp.o] Error 1
==================================================================== [FAILED] Took 4.68 seconds ====================================================================
* The terminal process "C:\Users\Sylvain\.platformio\penv\Scripts\platformio.exe 'run'" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.
from platformio-core.
@valeros , I confirm the issue doesn't occur with the dev branch. Thanks a million!
from platformio-core.
Related Issues (20)
- Oh boy, I only just realized I picked the wrong project, sorry 😞 I must have been on platformio.org rather then on registry.platformio.org when I hit the "Report a Bug" link in the footer. HOT 1
- PlatformIO trips up on spaces inside microcontroller names on Windows 10
- AddPreAction doesn't work as expected HOT 1
- Unable to remove library from VS Code HOT 5
- Help with Migrating ESP-IDF Project to PlatformIO" HOT 1
- Silent failure when dependency path is incorrect in library.json
- Project is built with include directories for two different versions of the same library
- AMB82 and AMB82-mini - What a shame there's no support for those boards HOT 1
- Package CDN speed, Russia HOT 2
- Support concurrent access to shared PLATFORMIO_PACKAGES_DIR and PLATFORMIO_PLATFORMS_DIR for CI builds
- Multiple problems since reinstallation of
- Add a board config to 'Board Explorer' for standalone 328P PU (DIP28 IC on breadboard) with 8MHz and 1MHz internal clock
- hello? HOT 1
- Update clang-tidy support to v17.0.1 (or later)
- support for renesas risc-v mcu
- Platform IO not installing idf_component.yml HOT 1
- Parse error in Azure from junit output HOT 3
- Telit boards
- Support for Arduino Giga R1 WiFi
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from platformio-core.