Skip to content

In Windows, need support for longer package paths or ability to specify package folder #1010

Closed
@MikeFarrington

Description

@MikeFarrington

Describe the problem

My windows user name, "Michael Farrington", is 18 characters long. Windows applications, by default, can only support 260 path characters. Due to long package names, combined with Arduino placing files into %LocalAppData%, makes the maximum path to a library effectively much shorter.

Windows 10 and above now support breaking the 260 character path limit, but applications must be tagged in their application manifest with the "longPathAware" attribute. See this Microsoft Docs link for more information.

I tried creating my own manifest files to the IDE executable, and executables in the arduino-ide-extensions\build folder, but that did not work. I then tried to do the same to the cc1plus.exe ESP32 compiler executables. Nothing worked, and am left unable to compile some projects (using 1.8.19 or 2.0 RC6), unless I create a new windows profile with a shorter username.

Below is an example of the error. The file that it says is not found is indeed in the folder. If I could specify the folder in which to store the packages, I could gain up to 57 extra characters of path length (if I go to the extreme of placing packages in folder "c:\p"). Obviously removing Windows path length limitations by using longPathAware is the better solution, but I imagine that would require support from 3rd-party compilers.

I realize that this is mostly an issue caused by Windows, but allowing users to move the packages folder location would be of great help.

In file included from c:\users\michael farrington\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\gcc8_4_0-esp-2021r2-patch3\xtensa-esp32-elf\include\c++\8.4.0\string:41,
                 from c:\users\michael farrington\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\gcc8_4_0-esp-2021r2-patch3\xtensa-esp32-elf\include\c++\8.4.0\stdexcept:39,
                 from c:\users\michael farrington\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\gcc8_4_0-esp-2021r2-patch3\xtensa-esp32-elf\include\c++\8.4.0\array:39,
                 from c:\users\michael farrington\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\gcc8_4_0-esp-2021r2-patch3\xtensa-esp32-elf\include\c++\8.4.0\tuple:39,
                 from c:\users\michael farrington\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\gcc8_4_0-esp-2021r2-patch3\xtensa-esp32-elf\include\c++\8.4.0\functional:54,
                 from C:\Users\Michael Farrington\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\cores\esp32/HardwareSerial.h:49,
                 from C:\Users\Michael Farrington\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\cores\esp32/Arduino.h:167,
                 from C:\Users\Michael Farrington\AppData\Local\Temp\arduino-sketch-ECB8BAD75F7407F9B3C84ADE862078A8\sketch\floppybird.ino.cpp:1:
c:\users\michael farrington\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\gcc8_4_0-esp-2021r2-patch3\xtensa-esp32-elf\include\c++\8.4.0\bits\allocator.h:46:10: fatal error: bits/c++allocator.h: No such file or directory
 #include <bits/c++allocator.h> // Define the base class to std::allocator.
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.

To reproduce

Try to compile a project that includes files with a file path longer than 260 characters.

Expected behavior

All files to be found.

Arduino IDE version

2.0.0-rc6-nightly-20220529

Operating system

Windows

Operating system version

Windows 11 (Version 21H1)

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions