Build fails with VSCOD, only version mega-20240822- Latest Version.

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
pp1wvc
Normal user
Posts: 44
Joined: 06 Jan 2023, 12:02
Location: Brazil

Build fails with VSCOD, only version mega-20240822- Latest Version.

#1 Post by pp1wvc » 03 Nov 2024, 00:46

Something strange happened when using the latest version of Espeasy 20240822.
After opening in Open paste, I use a directory cloned through Git Clone, this information appears in VSCOD:

Resolving max_ESP32_16M8M_LittleFS_ETH dependencies...
Tool Manager: Installing https://github.com/Jason2866/esp32-ardu ... 74f314.zip
Unpacking 0% 10%Unpacking...
FileNotFoundError: Traceback (most recent call last):
File "C:\Users\william\.platformio\penv\Lib\site-packages\platformio\package\manager\_install.py", line 37, in unpack
return fu.unpack(dst, with_progress=with_progress)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\william\.platformio\penv\Lib\site-packages\platformio\package\unpack.py", line 185, in unpack
self._archiver.extract_item(item, dest_dir)
File "C:\Users\william\.platformio\penv\Lib\site-packages\platformio\package\unpack.py", line 49, in extract_item
self._afo.extract(item, dest_dir)
File "C:\Users\william\AppData\Local\Programs\Python\Python312\Lib\zipfile\__init__.py", line 1726, in extract
return self._extract_member(member, path, pwd)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\william\AppData\Local\Programs\Python\Python312\Lib\zipfile\__init__.py", line 1801, in _extract_member
open(targetpath, "wb") as target:
^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'c:\\Users\\william\\Documents\\ESPEasy\\ESPEasy\\.platformio\\.cache\\tmp\\pkg-installing-jxmxqy8u\\framework-arduinoespressif32\\tools\\esp32-arduino-libs\\esp32\\include\\mbedtls\\mbedtls\\3rdparty\\everest\\include\\everest\\kremlib\\FStar_UInt64_FStar_UInt32_FStar_UInt16_FStar_UInt8.h'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\william\.platformio\penv\Lib\site-packages\platformio\__main__.py", line 103, in main
cli() # pylint: disable=no-value-for-parameter
^^^^^
File "C:\Users\william\.platformio\penv\Lib\site-packages\click\core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\william\.platformio\penv\Lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "C:\Users\william\.platformio\penv\Lib\site-packages\platformio\cli.py", line 85, in invoke
return super().invoke(ctx)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\william\.platformio\penv\Lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\william\.platformio\penv\Lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\william\.platformio\penv\Lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\william\.platformio\penv\Lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\william\.platformio\penv\Lib\site-packages\platformio\project\commands\init.py", line 106, in project_init_cmd
install_project_dependencies(
File "C:\Users\william\.platformio\penv\Lib\site-packages\platformio\package\commands\install.py", line 107, in install_project_dependencies
already_up_to_date = not install_project_env_dependencies(env, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\william\.platformio\penv\Lib\site-packages\platformio\package\commands\install.py", line 132, in install_project_env_dependencies
_install_project_env_platform(project_env, options),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\william\.platformio\penv\Lib\site-packages\platformio\package\commands\install.py", line 149, in _install_project_env_platform
PlatformPackageManager().install(
File "C:\Users\william\.platformio\penv\Lib\site-packages\platformio\package\manager\platform.py", line 62, in install
p.install_required_packages(force=force)
File "C:\Users\william\.platformio\penv\Lib\site-packages\platformio\platform\_packages.py", line 76, in install_required_packages
self.install_package(name, force=force)
File "C:\Users\william\.platformio\penv\Lib\site-packages\platformio\platform\_packages.py", line 70, in install_package
return self.pm.install(spec or self.get_package_spec(name), force=force)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\william\.platformio\penv\Lib\site-packages\platformio\package\manager\_install.py", line 47, in install
pkg = self._install(spec, skip_dependencies=skip_dependencies, force=force)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\william\.platformio\penv\Lib\site-packages\platformio\package\manager\_install.py", line 97, in _install
pkg = self.install_from_uri(spec.uri, spec)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\william\.platformio\penv\Lib\site-packages\platformio\package\manager\_install.py", line 191, in install_from_uri
self.unpack(dl_path, tmp_dir)
File "C:\Users\william\.platformio\penv\Lib\site-packages\platformio\package\manager\_install.py", line 42, in unpack
return fu.unpack(dst, with_progress=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\william\.platformio\penv\Lib\site-packages\platformio\package\unpack.py", line 178, in unpack
self._archiver.extract_item(item, dest_dir)
File "C:\Users\william\.platformio\penv\Lib\site-packages\platformio\package\unpack.py", line 49, in extract_item
self._afo.extract(item, dest_dir)
File "C:\Users\william\AppData\Local\Programs\Python\Python312\Lib\zipfile\__init__.py", line 1726, in extract
return self._extract_member(member, path, pwd)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\william\AppData\Local\Programs\Python\Python312\Lib\zipfile\__init__.py", line 1801, in _extract_member
open(targetpath, "wb") as target:
^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'c:\\Users\\william\\Documents\\ESPEasy\\ESPEasy\\.platformio\\.cache\\tmp\\pkg-installing-jxmxqy8u\\framework-arduinoespressif32\\tools\\esp32-arduino-libs\\esp32\\include\\mbedtls\\mbedtls\\3rdparty\\everest\\include\\everest\\kremlib\\FStar_UInt64_FStar_UInt32_FStar_UInt16_FStar_UInt8.h'

============================================================

An unexpected error occurred. Further steps:

* Verify that you have the latest version of PlatformIO using
`python -m pip install -U platformio` command

* Try to find answer in FAQ Troubleshooting section
https://docs.platformio.org/page/faq/index.html

* Report this problem to the developers
https://github.com/platformio/platformio-core/issues

I ran the command python -m pip install -U platformio` command with the following results:
Requirement already satisfied: platformio in c:\users\william\appdata\local\programs\python\python312\lib\site-packages (6.1.16)
Requirement already satisfied: click<9,>=8.0.4 in c:\users\william\appdata\local\programs\python\python312\lib\site-packages (from platformio) (8.1.7)
Requirement already satisfied: colorama in c:\users\william\appdata\local\programs\python\python312\lib\site-packages (from platformio) (0.4.6)
Requirement already satisfied: marshmallow==3.* in c:\users\william\appdata\local\programs\python\python312\lib\site-packages (from platformio) (3.23.1)
Requirement already satisfied: pyelftools<1,>=0.27 in c:\users\william\appdata\local\programs\python\python312\lib\site-packages (from platformio) (0.31)
Requirement already satisfied: pyserial==3.5.* in c:\users\william\appdata\local\programs\python\python312\lib\site-packages (from platformio) (3.5)
Requirement already satisfied: requests==2.* in c:\users\william\appdata\local\programs\python\python312\lib\site-packages (from platformio) (2.32.3)
Requirement already satisfied: semantic-version==2.10.* in c:\users\william\appdata\local\programs\python\python312\lib\site-packages (from platformio) (2.10.0)
Requirement already satisfied: tabulate==0.* in c:\users\william\appdata\local\programs\python\python312\lib\site-packages (from platformio) (0.9.0)
Requirement already satisfied: ajsonrpc==1.2.* in c:\users\william\appdata\local\programs\python\python312\lib\site-packages (from platformio) (1.2.0)
Requirement already satisfied: starlette<0.40,>=0.19 in c:\users\william\appdata\local\programs\python\python312\lib\site-packages (from platformio) (0.39.2)
Requirement already satisfied: wsproto==1.* in c:\users\william\appdata\local\programs\python\python312\lib\site-packages (from platformio) (1.2.0)
Requirement already satisfied: bottle==0.13.* in c:\users\william\appdata\local\programs\python\python312\lib\site-packages (from platformio) (0.13.2)
Requirement already satisfied: uvicorn<0.31,>=0.16 in c:\users\william\appdata\local\programs\python\python312\lib\site-packages (from platformio) (0.30.6)
Requirement already satisfied: packaging>=17.0 in c:\users\william\appdata\local\programs\python\python312\lib\site-packages (from marshmallow==3.*->platformio) (24.1)
Requirement already satisfied: charset-normalizer<4,>=2 in c:\users\william\appdata\local\programs\python\python312\lib\site-packages (from requests==2.*->platformio) (3.4.0)
Requirement already satisfied: idna<4,>=2.5 in c:\users\william\appdata\local\programs\python\python312\lib\site-packages (from requests==2.*->platformio) (3.10)
Requirement already satisfied: urllib3<3,>=1.21.1 in c:\users\william\appdata\local\programs\python\python312\lib\site-packages (from requests==2.*->platformio) (2.2.3)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\william\appdata\local\programs\python\python312\lib\site-packages (from requests==2.*->platformio) (2024.8.30)
Requirement already satisfied: h11<1,>=0.9.0 in c:\users\william\appdata\local\programs\python\python312\lib\site-packages (from wsproto==1.*->platformio) (0.14.0)
Requirement already satisfied: anyio<5,>=3.4.0 in c:\users\william\appdata\local\programs\python\python312\lib\site-packages (from starlette<0.40,>=0.19->platformio) (4.6.2.post1)
Requirement already satisfied: sniffio>=1.1 in c:\users\william\appdata\local\programs\python\python312\lib\site-packages (from anyio<5,>=3.4.0->starlette<0.40,>=0.19->platformio) (1.3.1)

Previous versions I can compile normally.
What has changed for Vscod in this new version? :oops:

TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Build fails with VSCOD, only version mega-20240822- Latest Version.

#2 Post by TD-er » 03 Nov 2024, 01:06

I think some of the platform files may no longer be available as Jason was trying to get rid of the solo1 platform builds.

You could fetch the latest code from Git as I did update the platform files in the mean time.

chemmex
Normal user
Posts: 103
Joined: 15 Feb 2019, 16:18

Re: Build fails with VSCOD, only version mega-20240822- Latest Version.

#3 Post by chemmex » 03 Nov 2024, 10:17

Freshly fetched the repo, still the same error

pp1wvc
Normal user
Posts: 44
Joined: 06 Jan 2023, 12:02
Location: Brazil

Re: Build fails with VSCOD, only version mega-20240822- Latest Version.

#4 Post by pp1wvc » 03 Nov 2024, 10:50

TD-er wrote: 03 Nov 2024, 01:06 I think some of the platform files may no longer be available as Jason was trying to get rid of the solo1 platform builds.

You could fetch the latest code from Git as I did update the platform files in the mean time.
I downloaded it again, same error, nothing changed. :|

TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Build fails with VSCOD, only version mega-20240822- Latest Version.

#5 Post by TD-er » 03 Nov 2024, 10:58

I'm apparently using Python 3.10.12
Maybe this is some kind of Python version issue?

TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Build fails with VSCOD, only version mega-20240822- Latest Version.

#6 Post by TD-er » 03 Nov 2024, 11:01

Just to be sure, here is the pip freeze output so you can compare versions of libs you have installed?

Code: Select all

gijs@Imagine:~/GitHub/TD-er/ESPEasy/tools$ pip freeze
alabaster==0.7.16
apeye==1.4.1
apeye-core==1.1.5
attrs==21.2.0
autodocsumm==0.2.13
Automat==20.2.0
babel==2.16.0
bcrypt==3.2.0
beautifulsoup4==4.10.0
blinker==1.4
CacheControl==0.14.0
certifi==2020.6.20
chardet==4.0.0
charset-normalizer==3.3.2
click==8.0.3
cloud-init==24.3.1
colorama==0.4.4
command-not-found==0.3
commonmark==0.9.1
configobj==5.0.6
constantly==15.1.0
cryptography==3.4.8
cssutils==2.11.1
dbus-python==1.2.18
dict2css==0.3.0.post1
distlib==0.3.4
distro==1.7.0
distro-info==1.1+ubuntu0.2
docutils==0.21.2
domdf-python-tools==3.9.0
filelock==3.16.1
gyp==0.1
html5lib==1.1
httplib2==0.20.2
hyperlink==21.0.0
idna==3.3
imagesize==1.4.1
importlib-metadata==4.6.4
incremental==21.3.0
jeepney==0.7.1
Jinja2==3.1.4
jsonpatch==1.32
jsonpointer==2.0
jsonschema==3.2.0
keyring==23.5.0
launchpadlib==1.10.16
lazr.restfulclient==0.14.4
lazr.uri==1.0.6
livereload==2.7.0
lxml==4.8.0
MarkupSafe==2.0.1
more-itertools==8.10.0
msgpack==1.1.0
natsort==8.4.0
netifaces==0.11.0
oauthlib==3.2.0
packaging==24.1
pexpect==4.8.0
platformdirs==2.5.1
ptyprocess==0.7.0
pyasn1==0.4.8
pyasn1-modules==0.2.1
pycairo==1.20.1
pycurl==7.44.1
Pygments==2.18.0
PyGObject==3.42.1
PyHamcrest==2.0.2
pyinotify==0.9.6
PyJWT==2.3.0
pymacaroons==0.13.0
PyNaCl==1.5.0
pyOpenSSL==21.0.0
pyparsing==2.4.7
pyrsistent==0.18.1
pyserial==3.5
python-apt==2.4.0+ubuntu4
python-debian==0.1.43+ubuntu1.1
python-magic==0.4.24
pytz==2022.1
PyYAML==5.4.1
recommonmark==0.7.1
requests==2.32.3
ruamel.yaml==0.18.6
ruamel.yaml.clib==0.2.8
SecretStorage==3.3.1
service-identity==18.1.0
six==1.16.0
snowballstemmer==2.2.0
sos==4.5.6
soupsieve==2.3.1
Sphinx==7.4.7
sphinx-autobuild==2021.3.14
sphinx-autodoc-typehints==2.3.0
sphinx-bootstrap-theme==0.8.1
sphinx-jinja2-compat==0.3.0
sphinx-prompt==1.8.0
sphinx-tabs==3.4.5
sphinx-toolbox==3.8.0
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-devhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
ssh-import-id==5.11
systemd-python==234
tabulate==0.9.0
tomli==2.0.2
tornado==6.4.1
Twisted==22.1.0
typing_extensions==4.12.2
ubuntu-pro-client==8001
ufw==0.36.1
unattended-upgrades==0.1
urllib3==1.26.5
virtualenv==20.13.0+ds
wadllib==1.3.6
webencodings==0.5.1
zipp==1.0.0
zope.interface==5.4.0
N.B. this is VS-code running on Windows using WSL2 with Ubuntu 22.04.5 LTS

pp1wvc
Normal user
Posts: 44
Joined: 06 Jan 2023, 12:02
Location: Brazil

Re: Build fails with VSCOD, only version mega-20240822- Latest Version.

#7 Post by pp1wvc » 03 Nov 2024, 11:07

TD-er wrote: 03 Nov 2024, 10:58 I'm apparently using Python 3.10.12
Maybe this is some kind of Python version issue?
I'm using the version:
PS ESPEasy > python
Python 3.12.4 (tags/v3.12.4:8e8a4ba, Jun 6, 2024, 7:30:16 PM) [MSC v.1940 64-bit (AMD64)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.
>>>
But with the older version it's working, have you changed anything that could cause this conflict with Python in the newer version?

pp1wvc
Normal user
Posts: 44
Joined: 06 Jan 2023, 12:02
Location: Brazil

Re: Build fails with VSCOD, only version mega-20240822- Latest Version.

#8 Post by pp1wvc » 03 Nov 2024, 11:10

TD-er wrote: 03 Nov 2024, 11:01 Just to be sure, here is the pip freeze output so you can compare versions of libs you have installed?

Code: Select all

gijs@Imagine:~/GitHub/TD-er/ESPEasy/tools$ pip freeze
alabaster==0.7.16
apeye==1.4.1
apeye-core==1.1.5
attrs==21.2.0
autodocsumm==0.2.13
Automat==20.2.0
babel==2.16.0
bcrypt==3.2.0
beautifulsoup4==4.10.0
blinker==1.4
CacheControl==0.14.0
certifi==2020.6.20
chardet==4.0.0
charset-normalizer==3.3.2
click==8.0.3
cloud-init==24.3.1
colorama==0.4.4
command-not-found==0.3
commonmark==0.9.1
configobj==5.0.6
constantly==15.1.0
cryptography==3.4.8
cssutils==2.11.1
dbus-python==1.2.18
dict2css==0.3.0.post1
distlib==0.3.4
distro==1.7.0
distro-info==1.1+ubuntu0.2
docutils==0.21.2
domdf-python-tools==3.9.0
filelock==3.16.1
gyp==0.1
html5lib==1.1
httplib2==0.20.2
hyperlink==21.0.0
idna==3.3
imagesize==1.4.1
importlib-metadata==4.6.4
incremental==21.3.0
jeepney==0.7.1
Jinja2==3.1.4
jsonpatch==1.32
jsonpointer==2.0
jsonschema==3.2.0
keyring==23.5.0
launchpadlib==1.10.16
lazr.restfulclient==0.14.4
lazr.uri==1.0.6
livereload==2.7.0
lxml==4.8.0
MarkupSafe==2.0.1
more-itertools==8.10.0
msgpack==1.1.0
natsort==8.4.0
netifaces==0.11.0
oauthlib==3.2.0
packaging==24.1
pexpect==4.8.0
platformdirs==2.5.1
ptyprocess==0.7.0
pyasn1==0.4.8
pyasn1-modules==0.2.1
pycairo==1.20.1
pycurl==7.44.1
Pygments==2.18.0
PyGObject==3.42.1
PyHamcrest==2.0.2
pyinotify==0.9.6
PyJWT==2.3.0
pymacaroons==0.13.0
PyNaCl==1.5.0
pyOpenSSL==21.0.0
pyparsing==2.4.7
pyrsistent==0.18.1
pyserial==3.5
python-apt==2.4.0+ubuntu4
python-debian==0.1.43+ubuntu1.1
python-magic==0.4.24
pytz==2022.1
PyYAML==5.4.1
recommonmark==0.7.1
requests==2.32.3
ruamel.yaml==0.18.6
ruamel.yaml.clib==0.2.8
SecretStorage==3.3.1
service-identity==18.1.0
six==1.16.0
snowballstemmer==2.2.0
sos==4.5.6
soupsieve==2.3.1
Sphinx==7.4.7
sphinx-autobuild==2021.3.14
sphinx-autodoc-typehints==2.3.0
sphinx-bootstrap-theme==0.8.1
sphinx-jinja2-compat==0.3.0
sphinx-prompt==1.8.0
sphinx-tabs==3.4.5
sphinx-toolbox==3.8.0
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-devhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
ssh-import-id==5.11
systemd-python==234
tabulate==0.9.0
tomli==2.0.2
tornado==6.4.1
Twisted==22.1.0
typing_extensions==4.12.2
ubuntu-pro-client==8001
ufw==0.36.1
unattended-upgrades==0.1
urllib3==1.26.5
virtualenv==20.13.0+ds
wadllib==1.3.6
webencodings==0.5.1
zipp==1.0.0
zope.interface==5.4.0
N.B. this is VS-code running on Windows using WSL2 with Ubuntu 22.04.5 LTS



PS C:\Users\william\Documents\ESPEasy\ESPEasy> pip freeze
ajsonrpc==1.2.0
anyio==4.6.2.post1
bottle==0.13.2
certifi==2024.8.30
cffi==1.17.1
charset-normalizer==3.4.0
click==8.1.7
colorama==0.4.6
cryptography==43.0.3
h11==0.14.0
idna==3.10
marshmallow==3.23.1
packaging==24.1
platformio==6.1.16
pycparser==2.22
pyelftools==0.31
pygit2==1.16.0
pyserial==3.5
requests==2.32.3
semantic-version==2.10.0
setuptools==75.3.0
sniffio==1.3.1
starlette==0.39.2
tabulate==0.9.0
urllib3==2.2.3
uvicorn==0.30.6
wsproto==1.2.0

TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Build fails with VSCOD, only version mega-20240822- Latest Version.

#9 Post by TD-er » 03 Nov 2024, 12:05

I have not changed anything as far as I know. I only know there have been some issues with Python 3.12 a while ago, so that's why I mentioned it.

I also know there have been issues lately with the path length, so maybe you could try checking out the Git repo at a short path on your system, for example C:\GH\ESPEasy\

The reason I'm now using WSL to build and develop is due to those kind of Windows issues with path lengths and more importantly the build speed.
On my system it is a factor 5 faster in building (MAX builds from 10 - 13 -> 2 minutes)

TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Build fails with VSCOD, only version mega-20240822- Latest Version.

#10 Post by TD-er » 03 Nov 2024, 12:07

Oh and one other thing I changed is that the .platformio dir is now in the ESPEasy folder, also due to path length issues.
So maybe you need to reload your VS code after checking out ESPEasy to a new (shorter) path, so PlatformIO can initialize its data in the .platformio folder within the repo. (it is added to the .gitignore file)

User avatar
Ath
Normal user
Posts: 4007
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Build fails with VSCOD, only version mega-20240822- Latest Version.

#11 Post by Ath » 03 Nov 2024, 14:41

Had somewhat similar issues yesterday when starting from a clean local repo.
Solved it by expanding an ESP32 non-LittleFS build environment, starting a build, that failed, then expanding an ESP32 LittleFS env, and starting a build which then re-installed the Platform files. That solved it for me. Also switching to a non-LittleFS env works fine (as that again re-installs the matching platform files).
/Ton (PayPal.me)

chemmex
Normal user
Posts: 103
Joined: 15 Feb 2019, 16:18

Re: Build fails with VSCOD, only version mega-20240822- Latest Version.

#12 Post by chemmex » 03 Nov 2024, 15:42

Commented out the ''core_dir = .platformio'' line in platformio.ini and it seems to have returned back to normal

User avatar
Ath
Normal user
Posts: 4007
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Build fails with VSCOD, only version mega-20240822- Latest Version.

#13 Post by Ath » 03 Nov 2024, 16:47

Switching between environments as I described above should work equally well, or even better, as it uses shorter paths, and is the way we'll continue. With your change you're back to using the global .platformio folder.
/Ton (PayPal.me)

TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Build fails with VSCOD, only version mega-20240822- Latest Version.

#14 Post by TD-er » 03 Nov 2024, 21:31

If you removed that line, then I think the real issue might be that there are essentially 2 .platformio folders.
So restoring that line, save the .platformio.ini file, close VS code and remove both .platformio folders (in your c:\Users\...\.platformio and .platformio folder in the ESPEasy repo) could also work here.
Or maybe just removing these folders from both .platformio directories is enough:
- .cache
- packages
- platforms

Just make sure VS Code is closed when you remove those folders and the restored core_dir is present (and saved) in the platformio.ini file before opening VS code.

TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Build fails with VSCOD, only version mega-20240822- Latest Version.

#15 Post by TD-er » 03 Nov 2024, 22:00

OK, maybe not try to remove the .platformio folder for now to make it 'work the official way'...

It seems one of the CDN servers is offline, or at least unreachable.

Looks like it might be a DNS issue...
For when you temporary want to override it in the /etc/hosts file (or equivalent for Windows)
173.249.62.85 eu2.contabostorage.com

pp1wvc
Normal user
Posts: 44
Joined: 06 Jan 2023, 12:02
Location: Brazil

Re: Build fails with VSCOD, only version mega-20240822- Latest Version.

#16 Post by pp1wvc » 03 Nov 2024, 22:12

I was able to compile it by downloading it directly to the root drive C:\ESPEasy.
Different like this, just commenting platformio.ini core_dir = .platformio.
To use Vscod on Windows, you will need to update the informative documentation.
I didn't notice any performance improvements with the change in Windows.
Compile Time:
custom_ESP32_4M316k_LittleFS_ETH SUCCESS 00:39:16.917

TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Build fails with VSCOD, only version mega-20240822- Latest Version.

#17 Post by TD-er » 03 Nov 2024, 22:29

There isn't any compile time speed improvement when building in Windows between versions.
Even worse, the later ESP-IDF5.x seems to be even slower compared to ESP-IDF4.x builds in the past.

However, what I am doing now is that I have installed WSL2 on my system, which is running Ubuntu on Windows.
VS-code can work together with this and if you checkout the code on a Linux file system (thus not trying to build from /mnt/c/.... ), you can see a significant build time improvement.

That process really needs to be documented, but so far I am trying to figure it all out myself as for example directly flashing (or using monitor) of USB connected boards from WSL is not that straightforward.

Typically, the more CPU cores you have, the bigger the gain can be.
What seems to be happening on Windows is that the hooks used by virusscanners, Windows defender, etc. on each file access makes compiling highly serialized instead of parallel.
This does significantly slow down the build process.

On my Ryzen 9 (12 core) CPU, it takes about 13 minutes on average to build a 'max' build on Windows, where it takes about 2 minutes using WSL.
Also using this WSL/Linux route does no longer have to deal with all these max command line length issues you see on Windows.

chemmex
Normal user
Posts: 103
Joined: 15 Feb 2019, 16:18

Re: Build fails with VSCOD, only version mega-20240822- Latest Version.

#18 Post by chemmex » 03 Nov 2024, 22:34

Ath wrote: Switching between environments as I described above should work equally well, or even better, as it uses shorter paths, and is the way we'll continue. With your change you're back to using the global .platformio folder.
To be honest, I prefer to keep the platforms in the global folder as sometimes I use Jason's platforms in my other projects. Having it portable is, on one hand, a good idea, but the overhead is huge.

And I never experienced the long path problem
TD-er wrote:If you removed that line, then I think the real issue might be that there are essentially 2 .platformio folders.
I deleted the local .platformio folder, so it now works "the old way". By the way, I noticed that all relevant platform and tools files have downloaded, unpacked and installed successfully into the global folder. Before, it was failing while installing libsodium from framework-arduinoespressif32 into the local .platformio. The framework was downloaded and unpacked to the tmp folder within .platformio
Last edited by chemmex on 03 Nov 2024, 22:42, edited 1 time in total.

chemmex
Normal user
Posts: 103
Joined: 15 Feb 2019, 16:18

Re: Build fails with VSCOD, only version mega-20240822- Latest Version.

#19 Post by chemmex » 03 Nov 2024, 22:39

TD-er wrote:
Typically, the more CPU cores you have, the bigger the gain can be.
What seems to be happening on Windows is that the hooks used by virusscanners, Windows defender, etc. on each file access makes compiling highly serialized instead of parallel.
This does significantly slow down the build process.

On my Ryzen 9 (12 core) CPU, it takes about 13 minutes on average to build a 'max' build on Windows, where it takes about 2 minutes using WSL.
Also using this WSL/Linux route does no longer have to deal with all these max command line length issues you see on Windows.
I've noticed a massive speedup when tried the code-server, a dockerized version of VSCode. The build took less than a minute on an old 4-core Xeon processor

TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Build fails with VSCOD, only version mega-20240822- Latest Version.

#20 Post by TD-er » 03 Nov 2024, 22:53

chemmex wrote: 03 Nov 2024, 22:34
Ath wrote: Switching between environments as I described above should work equally well, or even better, as it uses shorter paths, and is the way we'll continue. With your change you're back to using the global .platformio folder.
To be honest, I prefer to keep the platforms in the global folder as sometimes I use Jason's platforms in my other projects. Having it portable is, on one hand, a good idea, but the overhead is huge.

And I never experienced the long path problem

[...]
I know there are drawbacks, like use of extra drive space.
However without these changes it was next to impossible on my dev system to build on Windows for all env's.
Most 'custom' envs have rather small env names, but the longer ones of the builds which need nearly all libraries in the libs folder like the 'max' builds, did fails.
I also gave the same hint to move the core files inside the project folder to several users which ran into build issues using pioarduino and many have reported success after moving this.

Also on my dev system it has some other nice side-effects like I am now able to make several builds in parallel, which was impossible when using a global .platformio folder.
And I have much less often build issues which need removal of the folders in the .platformio folder to make it work again.

I don't have a generic 'one fits all' solution, so I just took the fix which does make my development less frustrating and time-consuming as I am probably the one building ESPEasy the most (next to Ton) and as I said it does seem to help others too who run into those path-related build issues.

TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Build fails with VSCOD, only version mega-20240822- Latest Version.

#21 Post by TD-er » 03 Nov 2024, 22:54

chemmex wrote: 03 Nov 2024, 22:39 [...]

I've noticed a massive speedup when tried the code-server, a dockerized version of VSCode. The build took less than a minute on an old 4-core Xeon processor
Probably not the full 'max' build, right?
Also ESP8266 take a lot less time to compile compared to ESP32 builds.

chemmex
Normal user
Posts: 103
Joined: 15 Feb 2019, 16:18

Re: Build fails with VSCOD, only version mega-20240822- Latest Version.

#22 Post by chemmex » 03 Nov 2024, 23:32

TD-er wrote:
Probably not the full 'max' build, right?
Also ESP8266 take a lot less time to compile compared to ESP32 builds.
Nope, a custom build with 15 plugins. Generally, it takes about 5 minutes to build on my laptop
I know there are drawbacks, like use of extra drive space.
I think I'll give WSL a try

TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Build fails with VSCOD, only version mega-20240822- Latest Version.

#23 Post by TD-er » 03 Nov 2024, 23:34

Just make sure to have the files on the Linux file system or else it will be (much) slower than building on Windows.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest