ESP8266 Audio library fails to compile

I started a project to provide cow mooing sounds when a person walks in front of a proximity sensor.
I am using Pltformio core 5.2.5 home 3.4.1 in VSC 1.64.2 on Linux Mint 20.3
I started by searching for an audio component and cam across Earle Philhower’s library. After installing it and assign it to my project whose platformio.ini conatins:
platform = espressif8266
board = nodemcuv2
framework = arduino
lib_deps = earlephilhower/ESP8266Audio@^1.9.4

The main.cpp just to start:
#include <Arduino.h>
#include “AudioGeneratorAAC.h”
#include “AudioOutputI2S.h”
#include “AudioFileSourcePROGMEM.h”

void setup() {
// put your setup code here, to run once:

void loop() {
// put your main code here, to run repeatedly:

The compilation fails:

  • Looking for ESP8266HTTPClient.h dependency? Check our library registry!
  • CLI > platformio lib search “header:ESP8266HTTPClient.h”
  • Web > PlatformIO Registry

It looks like ESP8266HTTPClient.h is missing, I believe its supposed to be in an Arduino lib.
I tried the exact same code same board in an Adruino IDE v 1.8.20 and it compiled.
What am I missing in setting up the project?

Same problem here but with FirebaseArduino.h library.
Did you found any solutions?

It looks like ESP8266HTTPClient.h is missing too!

This library needs lib_ldf_mode = deep in the platformio.ini to detect its dependencies properly.

Edit: Correction, it just needs deep, not deep+.

platform = espressif8266
board = nodemcuv2
framework = arduino
lib_deps = earlephilhower/ESP8266Audio@^1.9.5
lib_ldf_mode = deep
Scanning dependencies...
Dependency Graph
|-- <ESP8266Audio> 1.9.5
|   |-- <ESP8266HTTPClient> 1.2
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <LittleFS> 0.1.0
|   |-- <SD> 2.0.0
|   |   |-- <SDFS> 0.1.0
|   |   |   |-- <ESP8266SdFat> 2.0.2
|   |   |   |   |-- <SPI> 1.0
|   |   |   |-- <SPI> 1.0
|   |-- <SPI> 1.0
|   |-- <I2S> 1.0
Building in release mode
Linking .pio\build\nodemcuv2\firmware.elf
Retrieving maximum program size .pio\build\nodemcuv2\firmware.elf
Checking size .pio\build\nodemcuv2\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [===       ]  34.0% (used 27892 bytes from 81920 bytes)
Flash: [==        ]  24.9% (used 260093 bytes from 1044464 bytes)
Building .pio\build\nodemcuv2\firmware.bin
Creating BIN file ".pio\build\nodemcuv2\firmware.bin" using "C:\Users\Max\.platformio\packages\framework-arduinoespressif8266\bootloaders\eboot\eboot.elf" and ".pio\build\nodemcuv2\firmware.elf"
============== [SUCCESS] Took 25.55 seconds ==============

Not really I’ve been trying to understand the compilation process. There’s a directory .platformio/packages/framework-arduinoespressif8266/libraries/ that has the “missing” library component. Unfortunately that file somehow isn’t seen in the build sequence, the why is what I’m trying to work out. I’ve simply put the file in the /home/dbristow/PlatformIO/Projects/CowSound/.pio/libdeps/nodemcuv2/ESP8266Audio/src directory, but then another dependence issue arises. If I figure it out I’ll be sure to post the solution.

Thanks!! works like a charm

A fix is proposed in Fix PlatformIO library search mode by maxgerhardt · Pull Request #500 · earlephilhower/ESP8266Audio · GitHub. Until then, the workaround works.

@maxgerhardt lib_ldf_mode = deep works great here too!