Espressiv32 builder not found, cant compile

Hi, im getting this error when trying to compile my scetch.

I have this platform.ini file:

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:esp32-s3-devkitc-1]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
lib_deps = 
	ottowinter/ESPAsyncWebServer-esphome@^3.0.0
	plerup/EspSoftwareSerial@^8.0.1
	bblanchon/ArduinoJson@^6.21.2
	mikalhart/TinyGPSPlus@^1.0.3
	roboticsbrno/ServoESP32@^1.0.3
extra_scripts =
  pre:env-extra.py
board_build.arduino.memory_type = dio_opi ; NEEDED FOR PSRAM
monitor_speed = 115200
monitor_port = COM13
upload_port = COM13
build_flags = -DCORE_DEBUG_LEVEL=5
	-DBOARD_HAS_PSRAM
	-mfix-esp32-psram-cache-issue
lib_ldf_mode = deep+
lib_extra_dirs = ~/Documents/Arduino/libraries

can someone help me please with this error message?

Compiling .pio/build/esp32-s3-devkitc-1/FrameworkArduino/wiring_pulse.c.o
Compiling .pio/build/esp32-s3-devkitc-1/FrameworkArduino/wiring_shift.c.o
Archiving .pio/build/esp32-s3-devkitc-1/libFrameworkArduino.a
Indexing .pio/build/esp32-s3-devkitc-1/libFrameworkArduino.a
*** [.pio/build/esp32-s3-devkitc-1/firmware.elf] Implicit dependency `/home/joengelh/.platformio/platforms/espressif32/builder/=' not found, needed by target `.pio/build/esp32-s3-devkitc-1/firmware.elf'.
==================================================== [FAILED] Took 6.24 seconds ====================================================

 *  The terminal process "platformio 'run'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

Thanks a lot

What’s the content of this script?

Hi, thanks for the fast reply. I checked if its because if the script, but that is not the case, as i removed it and got the same error.

However the content is this:

from os.path import isfile
Import("env")
assert isfile(".env")
try:
  f = open(".env", "r")
  lines = f.readlines()
  envs = []
  for line in lines:
    envs.append("-D{}".format(line.strip()))
  env.Append(BUILD_FLAGS=envs)
except IOError:
  print("File .env not accessible",)
finally:
  f.close()

I would say that this does have the potential to cause this error if you have some line with “a = b” that has spaces in it. This script should be using env.Append(CPPDEFINES=...); instead.

Did you delete the .pio folder after commenting out the script and build again to get a clean build?