Issues building on new machine using exact same versions, example included

Hello,

I had to reflash a m5atom device so I checked out the old project on my new machine, but I couldn’t for the life of me get it to build. Went back to my old machine and it build without issues. I took note of the exact versions of espressif and packages used and tried to lock the versions so it would work the same on my other machine - but to no avail, even more issues showed up.

I have the project here:

In the platformio.ini you can see that I tried to lock the versions as good as I could:

[env:m5stack-atom]
platform = espressif32 @ 3.3.2
platform_packages =
	framework-arduinoespressif32 @ 3.10006.210326
	tool-esptoolpy @ 1.30100.210531
	tool-mkspiffs @ 2.230.0
	toolchain-xtensa32 @ 2.50200.97
board = m5stack-atom
framework = arduino
monitor_speed = 115200
lib_deps =
	m5stack/M5Atom@^0.1.0
	fastled/FastLED@^3.5.0
	prexus/Wifi Manager for ESP32@^2.1.2
	khoih-prog/AsyncHTTPRequest_Generic@^1.10.2
	esphome/ESPAsyncWebServer-esphome@^3.0.0
	bblanchon/ArduinoJson@^6.19.4

I get a bunch of errors:

compilation terminated.
*** [.pio\build\m5stack-atom\lib792\Wifi Manager for ESP32\WifiManager.cpp.o] Error 1
In file included from .pio/libdeps/m5stack-atom/WebServer_ESP32_ENC/src/enc28j60/esp32_enc28j60.cpp:25:0:
.pio/libdeps/m5stack-atom/WebServer_ESP32_ENC/src/enc28j60/esp32_enc28j60.h:32:27: fatal error: hal/spi_types.h: No such file or directory
compilation terminated.
*** [.pio\build\m5stack-atom\lib5ed\WebServer_ESP32_ENC\enc28j60\esp32_enc28j60.cpp.o] Error 1
In file included from .pio/libdeps/m5stack-atom/WebServer_ESP32_W5500/src/w5500/esp32_w5500.cpp:22:0:
.pio/libdeps/m5stack-atom/WebServer_ESP32_W5500/src/w5500/esp32_w5500.h:28:27: fatal error: hal/spi_types.h: No such file or directory
compilation terminated.
*** [.pio\build\m5stack-atom\lib985\WebServer_ESP32_W5500\w5500\esp32_w5500.cpp.o] Error 1

*** [.pio\build\m5stack-atom\lib5ed\WebServer_ESP32_ENC\enc28j60\extmod\esp_eth_spi_enc28j60.c.o] Error 1
*** [.pio\build\m5stack-atom\lib5ed\WebServer_ESP32_ENC\enc28j60\extmod\esp_eth_mac_enc28j60.c.o] Error 1
.pio/libdeps/m5stack-atom/Wifi Manager for ESP32/src/WifiManager.cpp:4:21: fatal error: ESPmDNS.h: No such file or directory

.pio/libdeps/m5stack-atom/WebServer_ESP32_ENC/src/enc28j60/extmod/esp_eth_phy_enc28j60.c:37:33: fatal error: eth_phy_regs_struct.h: No such file or directory

So maybe I’m missing something, but shouldn’t it be exactly the same thing building it on two different machines as long as those versions are set to be the same?

Anyone with an idea of what’s going on?

Thanks in advance.

Wow, that’s an ancient version released on Aug 31, 2021!
Is this the exact version which is used on the machine where the compilation work? Please check which Espressif32 versions are installed on the (working) machine.

Yeah, this is the output from the machine successfully building it:

Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/m5stack-atom.html
PLATFORM: Espressif 32 (3.3.2) > M5Stack-ATOM
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (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.10006.210326 (1.0.6)
 - tool-esptoolpy @ 1.30100.210531 (3.1.0)
 - tool-mkspiffs @ 2.230.0 (2.30)
 - toolchain-xtensa32 @ 2.50200.97 (5.2.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 40 compatible libraries
Scanning dependencies...
Dependency Graph
|-- M5Atom @ 0.1.0
|-- FastLED @ 3.5.0
|-- Wifi Manager for ESP32 @ 1.0.3
|-- AsyncHTTPRequest_Generic @ 1.10.2
|-- ESPAsyncWebServer-esphome @ 3.0.0
|-- ArduinoJson @ 6.19.4
|-- ESP Async WebServer @ 1.2.3
|-- SPIFFS @ 1.0
|-- WiFi @ 1.0
|-- Preferences @ 1.0

Where would I look to confirm this?

I cleared out C:\Users\<user>\.platformio 's cache, packages and platforms folder, deleted the project .pio folder, cleaned the project and let it redownload everything again - but nope, same errors.

At least the errors are persistent :sweat_smile:

Espressif32 @ 3.3.2 is Espressif32 Arduino Core 1.0.6.
This is veeeery old.

The version listed under ‘Platforms’ as you mention in the above, is correctly listed as the version I tried to lock the project to:

image

Now, I know it’s old but I guess it shouldn’t matter at all when I see it building fine with this old version? Any new project I would obviously use the newest stuff, but just reviving this ol’ boi I’d prefer not to have to change too much :sweat_smile:

For fun I upgraded the packages to see what happened, and I just get a new error that again has nothing to do with my code but probably some of the libraries I use or something like that😑

Using:

[env:m5stack-atom]
platform = espressif32
board = m5stack-atom
framework = arduino
monitor_speed = 115200
lib_deps =
	m5stack/M5Atom@^0.1.2
	fastled/FastLED@^3.5.0
	prexus/Wifi Manager for ESP32@^2.1.2
	khoih-prog/AsyncHTTPRequest_Generic@^1.10.2
	esphome/ESPAsyncWebServer-esphome@^3.0.0
	bblanchon/ArduinoJson@^6.19.4

It will build with:

Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/m5stack-atom.html
PLATFORM: Espressif 32 (6.9.0) > M5Stack-ATOM
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.20017.0 (2.0.17)
 - tool-esptoolpy @ 1.40501.0 (4.5.1)
 - tool-mkfatfs @ 2.0.1
 - tool-mklittlefs @ 1.203.210628 (2.3)
 - tool-mkspiffs @ 2.230.0 (2.30)
 - 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 48 compatible libraries
Scanning dependencies...
Dependency Graph
|-- M5Atom @ 0.1.2
|-- FastLED @ 3.8.0
|-- Wifi Manager for ESP32 @ 2.1.2
|-- AsyncHTTPRequest_Generic @ 1.13.0
|-- ESPAsyncWebServer-esphome @ 3.2.2
|-- ArduinoJson @ 6.21.5
|-- ESP Async WebServer @ 1.2.4
|-- SPIFFS @ 2.0.0
|-- WiFi @ 2.0.0
|-- Preferences @ 2.0.0

And give me:

In file included from .pio/libdeps/m5stack-atom/WebServer_ESP32_W6100/src/w6100/esp32_w6100.cpp:22:
.pio/libdeps/m5stack-atom/WebServer_ESP32_W6100/src/WebServer_ESP32_W6100.hpp:32:10: fatal error: WebServer.h: No such file or directory

*******************************************************************
* Looking for WebServer.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:WebServer.h"
* Web  > https://registry.platformio.org/search?q=header:WebServer.h
*
*******************************************************************

 #include <WebServer.h> // Introduce corresponding libraries

So this is why I try to revive the project using the original version of the libraries. But it’s not really going that well as I had hoped :smiling_face_with_tear:

So by including <Webserver.h> in my main file, things start to compile using the new versions.

I don’t understand why that’s necessary?

Ok, I want just to be sure that 3.3.2 is the version which is used on your working machine.

This will use the latest installed version. So you can’t be sure which version is used exactly when you have multiple versions installed.

It seems that something has changed with one of the used libraries.

Please note that khoih-prog/AsyncHTTPRequest_Generic has been archived and is no longer maintained.

This is why you see in the initial post that I did platform = espressif32 @ 3.3.2 in my platform ini - including locking the platform_packages too to ensure the versions were the exact same ones as the one used on my old machine.

I had hoped to understand what happened, but at least i can get things to work now it seems :sweat_smile: Thank you for prodding me in the right direction.

1 Like

This seems to have been the culprit. I decided to migrate to AsyncTCP.h using the AsyncClient and got rid of the khoih-prog/AsyncHTTPRequest_Generic package.

Now I’m on the most recent version of espressif (6.9) and everything compiles without warnings.

Thank you for the assistance!

1 Like