Hello everybody,
since Update VSCODE to version 1.36.3 i’ve got the Error "No module named ‘SCons.Tool.FortranCommon’ " during compilation and the compiler stops. No changes at the sourcecode are made, only automated updating VSCODE under Linux Mint 22.3. The missing Module is present in my .venv python 3.12.3 environment.
Any Hints for solving the Problem?
Thanks
Helmut
It seems you’re using PIOArduino with an ESP32 board? I don’t see any issue right now in the PlatformIO Core or PlatformIO VSCode IDE repos, but there is
opened 03:54PM - 08 Sep 26 UTC
---
name: Problem Report
about: Create a Report to help us improve
---
### PR… OBLEM DESCRIPTION
With the release of **PlatformIO Core 6.2.0** (released September 5, 2026), builds using `framework = espidf` fail at the link step with:
```
*** [.pio/build/<env>/firmware.elf] ModuleNotFoundError : No module named 'SCons.Tool.FortranCommon'
```
#### Root Cause
1. PlatformIO Core 6.2.0 bumped its internal SCons dependency in `platformio/dependencies.py` to `tool-scons@~4.41101.0` (SCons 4.11.1).
2. In `pioarduino/platform-espressif32`, `platform.json` declares:
```json
"tool-scons": {
"type": "tool",
"optional": true,
"owner": "pioarduino",
"package-version": "4.40801.0",
"version": "https://github.com/pioarduino/registry/releases/download/0.0.1/scons-4.8.1.zip"
}
```
3. `platform.py:98` includes `"tool-scons"` in `COMMON_IDF_PACKAGES`. When `framework = espidf` is used, `_install_common_idf_packages()` runs `_check_tool_version("tool-scons")`.
4. It compares `installed_version` (`4.41101.0`) against `required_version` (`4.40801.0`). Finding a mismatch, `_handle_existing_tool()` deletes `~/.platformio/packages/tool-scons`.
5. Because of the issue described in #526, `install_tool("tool-scons")` falls through without reinstalling. PlatformIO Core's runner then races or attempts to re-unpack SCons, causing SCons to fail importing internal modules (`SCons.Tool.FortranCommon` during `$SMARTLINK` resolution).
6. Note: SCons 4.11.1 *does* contain `FortranCommon.py`; the error is purely a symptom of `tool-scons` being wiped mid-build.
Furthermore, `tool-scons` is an internal engine package managed by PlatformIO Core via `platformio.package.manager.core.get_core_package_dir("tool-scons")`, rather than an ESP-IDF toolchain package (such as `tool-cmake` or `toolchain-riscv32-esp`).
### TO REPRODUCE
1. Install or upgrade to PlatformIO Core 6.2.0 (`pip install "platformio>=6.2.0"`).
2. Set up any project using `framework = espidf` with `platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip`. Example `platformio.ini`:
```ini
[env:esp32c6]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip
framework = espidf
board = esp32-c6-devkitc-1
```
3. Run `pio run`.
4. Observe the package manager wiping `tool-scons` due to version mismatch `4.41101.0 != 4.40801.0`, followed by:
```
*** [.pio/build/esp32c6/firmware.elf] ModuleNotFoundError : No module named 'SCons.Tool.FortranCommon'
```
### EXPECTED BEHAVIOUR
The build should complete successfully without `platform.py` deleting the PlatformIO Core SCons package.
### SCREENSHOTS
_N/A_
### ADDITIONAL CONTEXT
**Workarounds:**
- **Local patch:** Update `~/.platformio/platforms/espressif32/platform.json` to set `"package-version": "4.41101.0"` under `"tool-scons"`.
- **Downgrade:** Pin `platformio==6.1.19` in the Python venv, where PlatformIO Core natively expects `~4.40801.0`.
**Suggested Fix in `platform-espressif32`:**
1. Remove `"tool-scons"` from `COMMON_IDF_PACKAGES` in `platform.py` so PlatformIO Core can manage its own build tool.
2. Alternatively, update `platform.json` to declare `"package-version": "4.41101.0"` under `"tool-scons"` for Core 6.2+ compatibility.