Unhelpful error message on compilation failure

I don’t really know where to file this question?

Targeting esp32-s3-devkitc-1
When I add GitHub - tzapu/WiFiManager: ESP8266 WiFi Connection manager with web captive portal to my lib_deps

I get:

Compiling .pio\build\esp32-s3-devkitc-1-myboard\src\main.cpp.o
Compiling .pio\build\esp32-s3-devkitc-1-myboard\src\ota.cpp.o
Generating partitions .pio\build\esp32-s3-devkitc-1-myboard\partitions.bin
xtensa-esp32s3-elf-g++: error: CreateProcess: No such file or directory
xtensa-esp32s3-elf-g++: error: CreateProcess: No such file or directory
Compiling .pio\build\esp32-s3-devkitc-1-myboard\lib6fa\Wire\Wire.cpp.o
*** [.pio\build\esp32-s3-devkitc-1-myboard\src\main.cpp.o] Error 1
*** [.pio\build\esp32-s3-devkitc-1-myboard\src\ota.cpp.o] Error 1

Which isn’t in anyway helpful. I don’t know what it means or where the error is. I tried verbose and that was even more useless.

It doesn’t have to be that library, I added ArduinoOTA yesterday and same meaningless errors. So a couple of days in I am no closer to working out what the error is.

If I use verbose it says here are some tmp files and by the way it failed, but not going to tell you what.

xtensa-esp32s3-elf-g++ @C:\Users\james\Documents\PlatformIO\Projects\CrowPanel_ESP32_7.0\.pio\build\esp32-s3-devkitc-1-myboard\tmp8hgbfnxq.tmp
xtensa-esp32s3-elf-g++ @C:\Users\james\Documents\PlatformIO\Projects\CrowPanel_ESP32_7.0\.pio\build\esp32-s3-devkitc-1-myboard\tmpy02wes4e.tmp
=================================================================================================== [FAILED] Took 25.93 seconds ===

actually not quite true - it actually shows the meaningless error message in thge middle of the meaningless output:

aea8f7d6ce292db8f4c47/tools/sdk/esp32s3/include/esp-dsp/modules/math/mulc/include -IC:/Users/james/.platformio/packages/framework-arduinoespressif32@src-87ac2a9d947aea8f7d6ce292db8f4c47/tools/sdk/esp32s3/include/esp-dsp/modules/math/sqrt/include -IC:/Users/james/.platformio/packages/framework-arduinoespressif32@src-87ac2a9d947aea8f7d6ce292db8f4c47/tools/sdk/esp32s3/includxtensa-esp32s3-elf-g++: error: CreateProcess: No such file or directory
e/esp-dsp/modules/matrix/include -IC:/Users/james/.platformio/packages/framework-arduinoespressif32@src-87ac2a9d947aea8f7d6ce292db8f4c47/tools/sdk/esp32s3/include/esp-dsp/modules/fft/include -IC:/Users/james/.platformio/packages/framework-arduinoespressif32@src-87ac2a9d947aea8f7d6ce292db8f4c47/tools/sdk/esp32s3/include/esp-dsp/modules/dct/include -IC:/Users/james/.platformio/packages/framew*** [.pio\build\esp32-s3-devkitc-1-myboard\src\ota.cpp.o] Error 1

I found a post suggesting this might be defender causing the issue. I turned that off and still same.

Please share a minimal project to reproduce the error.
The project should consist of a single .c or .cpp file and a platformio.ini.

Hi, sorry for the delay. I checked in to private github and checked out on a VM. It then compiles ok. I added back in all the libraries I was having issues with and no issues.

I then headed back to my main workstation and uninstalled vscode, and then deleted .platformIO and re-installed. Then hit build and it pulled down the various frameworks and then built ok.

So something was amiss and resetting it, cleanup, force, and all the stuff I tried was unable to remedy the situation and it was infuriating as I spent all yesteday afternoon on it - thinking it had to be something I had done wrong.

This morning, I did some very specific googling and found that exact error message in a few places ultimately leading to no resolution - so I tried the nuclear option. I’m soprry we couldn’t get to the exact issue and maybe save someone else from it - but I needed to make progress on it.

OK, its happened again. And once again, checked in and out on another machine and works fine.

Now, what I noticed is that it started saying building on the bottom bar and got stuck forever. I didn’t press build. But after that its broken. So perhaps its a stuck temp file somewhere?

I can’t get it to occur on a minimal project and even if I could you can see that with the exact same code the problem isn’t present. Its something thats happening to the environment.

It could still be Microsoft Defender or something like that - I don’t have anything else that might interefere with disk access. I nearly got some work done.

Deleting just .platformio didn’t fix it. Uninstalling vscode and reinstalling and then opening my project did.

But now its happening again…

see the building that appeared at the bottom. I don’t know where the output from that is? Is it a dynamic intellisense thing? I started adding the code above. I added httpclient.h and this function and it started doing whatever its doing. I guarantee now its all broken and reverting my files its still broken.

Yep, broke again.

Deleting platformio or vscode won’t change anything.
The only thing which might help is deleting the platform and packages folder.

Did you get my pm ?

I am wondering about that ancient Arduino Espressif version you’re using
framework-arduinoespressif32 @ 2.0.3+sha.142fceb
What kind of version is this??

I’m not even sure if the esp32-s3 was supported in this version…

Please show at least your platformio.ini!

Me too.

[platformio]
src_dir = src
boards_dir = .

[env:esp32-s3-devkitc-1-myboard]
platform = espressif32
board = esp32-s3-devkitc-1-myboard
board_build.partitions = huge_app.csv
framework = arduino
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
platform_packages = framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32#2.0.3
build_flags = 
	-D LV_LVGL_H_INCLUDE_SIMPLE
	-I./include
	-DWM_NOTEMP
	-DVERSION_MAJOR=1
	-DVERSION_MINOR=0
	-DVERSION_PATCH=1
lib_deps = 
	#lvgl/lvgl@8.3.6
	tamctec/TAMC_GT911@^1.0.2
	moononournation/GFX Library for Arduino@1.2.8
	lovyan03/LovyanGFX@^1.1.12
	maxpromer/PCA9557-arduino@^1.0.0
	adafruit/Adafruit GFX Library@^1.11.9
	bblanchon/ArduinoJson@^7.1.0
	https://github.com/tzapu/WiFiManager.git

Which comes from:

https://www.elecrow.com/wiki/esp32-display-702727-intelligent-touch-screen-wi-fi26ble-800480-hmi-display.html

Link: https://www.elecrow.com/download/product/CrowPanel/ESP32-HMI/7.0-DIS08070H/PlatformIO/CrowPanel_ESP32_7.0_PlatformIO_Project.zip

I did try to change that to latest and then everything explodes.

Basically my project at the moment consists of that repo, then I stripped out LVGL and has wifimanager added. He hence the -DWM_NOTEMP which is because of missing temperature sensing (don’t know why thats involved).

Then I was adding a function to pull a config:

bool fetchConfig(const String &macAddress)
{
  HTTPClient https;
  WiFiClientSecure client;
  client.setInsecure(); // Use insecure mode for simplicity
  bool result;

  // Specify request destination
  https.begin(client, API_URL);

  // Add headers
  https.addHeader("Content-Type", "application/json");
  https.addHeader("Authorization", API_KEY);
  https.addHeader("X-MAC-Address", macAddress); // Add MAC address as a custom header

  // Perform the request
  int httpCode = https.GET();

  if (httpCode > 0)
  { // Check for the returning code
    if (httpCode == HTTP_CODE_OK)
    {
      String payload = https.getString();

      // Save payload to file
      saveToFile("/config.txt", payload);
      syslog.printf("Data saved to /config.txt %s\n", payload.c_str());
      result = true;
    }
    else
    {
      syslog.printf("Failed to get data, HTTP code: %d %s\n", httpCode, https.getString().c_str());
    }
  }
  else
  {
    syslog.printf("Unable to connect, error: %s\n", https.errorToString(httpCode).c_str());
  }

  // End the connection
  https.end();
  return result;
}

And during that process it dies. This is not my first rodeo, basically I’ll have 1200 of these damn things and that code is from a similar project which pulls xml config and then it configures the rest of the API stuff.

If you really want to use Espressif Arduino 2.0.3 please delete this line and use
platform = espressif32 @ 5.0.0

Better try if the latest available 2.0.17 works:
platform = espressif32 @ 6.9.0

See platform-espressif32 versions · GitHub

Wow, that file is over 133 MB in size and includes a full .pio and .vscode folder → not a good idea which exactly might lead to the issues you have.

You absolutely could be right. I will try a later build, but these types of Chinese things often have hardcoded junk all over. So I started with their repo.

It was fine on another project which was quite sizable, but its fine until it isn’t. It seems to be since platformio updated and I add libraries.

I tried that ZIP file but ended in

Resolving esp32-s3-devkitc-1-myboard dependencies...
Tool Manager: Installing espressif/toolchain-riscv32-esp @ 8.4.0+2021r2-patch3
UnknownPackageError: Could not find the package with 'espressif/toolchain-riscv32-esp @ 8.4.0+2021r2-patch3' requirements for your system 'windows_amd64'

I think this project needs to be reworked from the ground up. Especially with regard to the libraries used, their versions and dependencies.

I give up.
I’ve tried everything possible, but I can’t get the project contained in the ZIP to compile. The biggest problem seems to be the LovyanGFX library.

This is the problem. I’ve seen that reported in another thread, too. If you use a custom arduinoespressif32 package, then the resulting paths can be so long that it exceeds what can be passed on the Windows commandline (32K limit?). You have make it such that C:/Users/james/.platformio/packages/framework-arduinoespressif32 is chosen as the package path.

this should be a good solution. It could just be that Espressif has deleted their toolchain package in the meantime.

But then you should try upgrading the project to just use the regular 2.0.14 in the latest espressif32 platform, no platform_packages, that’s causing the problem.

You know, I did wonder if that was the case when I looked at the verbose mode, it the screen full was in fact the command line arguments! The CMD cli limit is 8191 characters which includes the executable. Then there is a python limitation as well. I will see what can be done.

I have had path length issues before with c compilers.

Also - when you look at the output and I said it shows the error in the middle of the command line… It was showing it at the truncated part which isn’t a valid path - so its sort of correct.

What error did you get? I think I got it to work out of the box. I think as Max has pointed out that path length may be the issue, which explains why adding just a single reference can mess it up. I will try the changes and see if I can get around that. Ideally, I’d like to use a later version - but I don’t want to spend all week trying to get back to a working project before I make any progress.

C:/Users/boris/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s3/include/newlib/platform_include/assert.h:20:10: fatal error: sdkconfig.h: No such file or directory

Caused by the LovyanGFX library.

The project is ‘too messed up’ for me to invest time in troubleshooting.

platform = espressif32 @ 5.0.0 doesn’t work because it cannot find the riscv libraries and I cannot get that to work.

I have moved .platformio to the root. c:\platformio via the environment variable and on re-opening its obviously having to get and unpack everything (like a new install). Its seems happy with that and I can confirm that dir now had all the stuff I expect.

It builds.
So now, adding in <HTTPClient.h>…

And it has started saying buidling… again and the fans are going… so its doing something but no output to speak of. Then its acting like I asked for build (which I didn’t, I just added that line).

But its built.

Checking size .pio\build\esp32-s3-devkitc-1-myboard\firmware.elf
Advanced Memory Usage is available via “PlatformIO Home > Project Inspect”
RAM: [= ] 13.4% (used 43940 bytes from 327680 bytes)
Flash: [=== ] 27.7% (used 870513 bytes from 3145728 bytes)
Building .pio\build\esp32-s3-devkitc-1-myboard\firmware.bin
esptool.py v4.5.1
Creating esp32s3 image…
Merged 2 ELF sections
Successfully created esp32s3 image.

So far so good.

Now I will add the API function I wanted and we’ll see.

So the issue where it says it cannot find the file, its probably truncating the path. That kind of is a bug… Because it could measure the length of the path and tell you.

OK. it works. I have now managed to talk to my API and pull back the JSON it needs and thats all fine. I may have got there in the end but moving the .platformio dir seems to have been the answer.

I could also change update the framework but I will leave as is for now.

My OP still stands the error message wasn’t helpful, I suppose now we think that the path was being truncated you could loosly argue its sort of correct but not in a way that points you to what needs fixed.