-
Notifications
You must be signed in to change notification settings - Fork 83
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
PlatformIO fails to resolve all SensESP dependencies #154
Comments
@wefleenor - please search your hard drive for a filed called Adafruit_Sensor.h. When I do that, I find it in a LOT of places. But I can't think of any reason it should work on the boat, but not at home. BTW, be careful with all of your research into this: there is a BME280 sensor, and a BMP280 sensor, and SensESP works with both, and has file names for both. |
Notice that it's down in the directory structure of each of my PlatformIO Projects, and also in |
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
code
{mso-style-priority:99;
font-family:"Courier New";}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
-->Thanks, Brian, I do find them in each project 1 layer down in the /d1_mini folder. I didn’t look for it because I wasn’t using that sensor and it didn’t make sense to me that it would be needed. This would seem to be an issue with how the software functions. Is there a way to manually include the path or is it necessary to copy the files up 1 level? Bill*****************************************William E Fleenor, Ph.D. (retired)Civil & Environmental EngineeringUniversity of California - Davis2001 Engineering IIIOne Shields AvenueDavis, CA [email protected] (530) 219-2351Center for Watershed Sciences, UC Davishttps://watershed.ucdavis.edu/people/faculty*********************************** From: Brian SmithSent: Monday, September 7, 2020 11:48 AMTo: SignalK/SensESPCc: wefleenor; MentionSubject: Re: [SignalK/SensESP] build errors (#154) Notice that it's down in the directory structure of each of my PlatformIO Projects, and also in /.platformio/lib/.... I'm guessing yours should be, too.—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hi Bill: It's a workaround, but here's how I managed to get builds to complete when I was faced with similar issues. After locating the *.h file the compiler is complaining about, put its directory into the compiler's search path using the following flag:
The In my case it seemed that PlatformIO was having trouble with its library management. I observed multiple installs of the same library, wrong libraries, wrong versions, etc over a week-long period...it was tough on my hair. My compile errors eventually disappeared, after multiple times of uninstalling and reinstalling PIO, deleting the .pio folder within the project, and trying other solutions mentioned on the web. I'm still not sure why it finally fixed itself, but in the meantime, hopefully the above will get you going. One interesting related behaviour I noticed about PIO that still persists is that its Library Manager seems to need a restart of PIO before it recognizes changes to a project's libraries. I can reproduce the problem on my setup by creating a new PIO project, and then browsing PIO Home->Libraries->Installed. In that tab, the new project is not listed until after I quit and restart PIO. |
After updating Python2 and Python3 on my computer today, I also started getting the error first reported in this Issue. I don't know how those updates could have had anything to do with it, but that is all I did (unless I unwittingly did something else during the Python updating - that was not a simple process). UPDATE: The reason I updated Python was that PlatformIO wouldn't start the build process without doing a PIO Core update, which was failing because my Python versions were too old. As soon as I updated Python, then PIO updated its Core, and THAT'S what broke the library thing. See below. I started by just adding the library with the missing .h file (Adafruit_Sensor.h) to I know that PIO is supposed to be smart enough to pull in any library that's required, but it doesn't seem to be doing that. @mairas, is it a bad idea to add these libraries to I believe that all of these libraries are new to SensESP with PR #145 , adding the Magnetometer sensor. Could there be a problem with the way some libraries were included in those new files? Maybe all of the missing .h files should just be added to that one new sensor's .h file? There was one missing .h file that the above approach didn't resolve: |
Ideally it'd be better to let PIO resolve the dependencies but if it can't do that, it's not too harmful if they're added. It's just that if any of those explicit dependencies turn out to be unneeded, it'll be unnecessarily downloaded and built. I don't think they'd be linked in the binary if they're not used, so the firmware size shouldn't be affected. Anyway, I wanted to see what these build problems were all about and pulled the latest commits and deleted the |
PlatformIO 5.0.0 was released on 2020-09-03 and got automatically updated at least for me. I bet it introduced some incompatibility. I'll dig into the issue properly tomorrow. |
This sounds similar to our issue: https://community.platformio.org/t/dependencies-from-private-lib-disappear-after-upgrading-to-core-5-0-0/15720 |
OK, tried downgrading platformio:
A new build successfully uses pio 4.3.4 but results in the same failure. So it doesn't seem to be due to PIO 5.0.0. |
I had some issues installing PIO on my a new machine yesterday and the guys from Platform IO provided brilliant support to get it resolved (don't let Time Machine try to move VSC / PIO basically as it breaks all sorts of stuff). I've pointed them into the direction of this issue so maybe they can provide some guidance. |
Please file an issue at https://github.com/platformio/platformio-core and provide a simple project to reproduce this issue. See https://docs.platformio.org/en/latest/core/history.html
It was a bug in whole PIO Core 4. |
Sorry, this is our bug and has been fixed in platformio/platformio-core#3658 We will release 5.0.1 tomorrow. A temporary solurion is to switch to dev-version via |
Thank you, @ivankravets !!! |
UPDATE: Version 5.0.1 of PIO doesn't seem to fix the problem - maybe for a few people, but not everyone (me included). Currently, the "fix" seems to be to include several more Adafruit libraries in the SensESP |
Just a note that another workaround for the missing EEPROM library (and any other libraries that fail to get automatically loaded) is to list them in platformio.ini under |
I recently installed vscode and pio for the first time and immediately began having issues with dependencies. The workaround for me also has been to add additional dependencies to lib_deps such as ESP Async Webserver and others as required. |
This issue seems to be an aggregate of multiple individual bugs. There’s a temporary fix in place, provided by PR#170 and SensESP has been verified to build just fine. The remaining SensESP and PIO issues are tracked in #168 and platformio/platformio-core#3668, respectively. Closing. |
As a long-time user of VSC I uploaded the PlatformIO IDE, and set out to run one or more of the examples. I di it without issue and left the boat for home. At home, using the same computer, I modified the code to utilize the different network and I get errors that I did not have before. I have tried starting the examples from scratch with the same result. What could possibly be wrong? I have not found any log files, although I have to believe they exist. This is the first of the errors and the rest refer to the same bmp280 sensor which is not needed for any on the examples I am trying. Thank you.
compilation terminated.
*** [.pio\build\d1_mini\libaf9\SensESP\sensors\bmp280.cpp.o] Error 1
In file included from .pio\libdeps\d1_mini\SensESP\src\sensors\bme280.h:5:0,
from .pio\libdeps\d1_mini\SensESP\src\sensors\bme280.cpp:1:
.pio\libdeps\d1_mini\Adafruit BME280 Library/Adafruit_BME280.h:26:29: fatal error: Adafruit_Sensor.h: No such file or directory
The text was updated successfully, but these errors were encountered: