Skip to content

Compilation failure if directory too long #1892

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
kufupa opened this issue Jul 8, 2022 · 2 comments
Open

Compilation failure if directory too long #1892

kufupa opened this issue Jul 8, 2022 · 2 comments
Labels
topic: build-process Related to the sketch build process topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@kufupa
Copy link

kufupa commented Jul 8, 2022

Spent about an hour trying to understand why moving a portable arduino install compiles in some folders but not others.
To recreate - keep putting install in more and more folders until the basic file, with no code inside setup() or loop() procedures, has a compilation failure.

ERROR LOG:

In file included from C:\Users\gamin\Desktop\Programming All 1\stm32\akjdhfjkldshfdafgaastmlink_template\portable\packages\stm32duino\hardware\STM32F1\2021.5.31\cores\maple\cxxabi-compat.cpp:1:0:
c:\users\gamin\desktop\programming all 1\stm32\akjdhfjkldshfdafgaastmlink_template\portable\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1\arm-none-eabi\include\c++\4.8.3\cstdlib:41:28: fatal error: bits/c++config.h: No such file or directory
 #include <bits/c++config.h>
                            ^
compilation terminated.
exit status 1
Error compiling for board Generic STM32F103C series.

Changing name from akjdhfjkldshfdafgaastmlink_template to aastmlink_template compiles just fine.

@per1234 per1234 transferred this issue from arduino/Arduino Sep 24, 2022
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Sep 24, 2022
@cmaglie
Copy link
Member

cmaglie commented Apr 27, 2023

Unfortunately, this is a combination of two problems of gcc and Windows:

  • Windows limits the path to ~256 chars (more or less I don't remember the exact number :-))
  • gcc generates some include search path with a lot of ../../../.. path traversal reducing the available chars even more.

I'll keep this issue open to track the problem but it doesn't have an easy solution AFAIK.

@cmaglie cmaglie added the topic: build-process Related to the sketch build process label Apr 27, 2023
@Puiching-Memory

This comment has been minimized.

@arduino arduino locked and limited conversation to collaborators May 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic: build-process Related to the sketch build process topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

4 participants