[llvm-bugs] [Bug 47622] New: clang does not support long paths

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 22 23:50:09 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=47622

            Bug ID: 47622
           Summary: clang does not support long paths
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: federico.kircheis at gmail.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

Hello, clang is inconsistent on how ti handles long paths.

I'm using the cygwin environment for simplicity, but it has nothing to do with
cygwin, as it is only used for calling clang and creating feils/directories.



----
LONG_DIR="D:/1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234/12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
mkdir -p "$LONG_DIR"
echo "int main(){}" > "$LONG_DIR/main.cpp"
'/cygdrive/c/Program Files/LLVM/bin/clang++.exe' "$LONG_DIR/main.cpp" -o
"$LONG_DIR/main.exe"                                                            

LINK : fatal error LNK1104: cannot open file
'D:\1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234\12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\123456789012345678901234567890123456789012345
67890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\main.exe'
----




While following works without issues


----
LONG_DIR="D:/1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234/12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
mkdir -p "$LONG_DIR"
echo "int main(){}" > "$LONG_DIR/main.cpp"
'/cygdrive/c/Program Files/LLVM/bin/clang++.exe' "$LONG_DIR/main.cpp"
----

Thus it seems that clang has issues writing, not reading, files in long paths.



If case it is relevant, I've enabled "LongPathsEnabled" on my machine (Windows
10 Version 1909).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200923/8a0400ff/attachment.html>


More information about the llvm-bugs mailing list