https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86039

            Bug ID: 86039
           Summary: Compiler placed in deep/long folder cannot open/run
                    needed files on Windows
           Product: gcc
           Version: 6.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: samuel.hultgren at st dot com
  Target Milestone: ---

Created attachment 44229
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44229&action=edit
output of compilation with compiler in directories with different length

If the compiler file structure is placed in a folder with a name that is 163
characters or longer, the GCC will fail to include certain files and/or run
sub-programs (cc1.exe etc).

Tested on Windows 7, and Windows 10, with GCC based on 6.3.1.

How to reproduce:
Create a simple file c:\test.c:
#include <stdio.h>
int main()
{
  return 0;
}

Place a Windows native GCC toolchain in a folder called c:\1 which includes the
bin, lib, share and target folders directly in it.

Use cygwin or other environment to run help script to try with different folder
name lengths:
cd /cygdrive/c
str=""
for i in `seq 1 256`; 
do 
echo "Testing length $i";
str="1$str"; 
mv 1* $str; 
1*/bin/arm-none-eabi-gcc test.c -o test.o --specs=nano.specs
-specs=nosys.specs;
done

Adjust above script as necessary for your environment, but you should get
similar results to the attached output.

In the attached output we can see that when the folder name is 163 characters
or longer, we see the first type of error, GCC can no longer find all the
header files in the compiler structure.
At folder length 180, GCC can no longer find stdio.h.
At folder length 214, GCC no longer can CreateProcess cc1.exe.

After that length specs files can not be found.

Reply via email to