Skip to content

Error on install (during build) with long path on Windows #152

Closed

Description

@kavika13

I don't know that all the details of the steps to reproduce are important (exact source of emsdk, the build tool I used, the exact command line options the build tool passed). I know that when I followed the same steps and used a more shallow directory that the install command built and succeeded.

The instructions to repro exactly:

  1. Setup build environment (Windows box)
  2. Clone/unzip source (I got emsdk-portable from "mozilla games" pacakge, via the "fips" build tool for the "sokol-samples" project)
  3. (2a) Use a somewhat long path (in my case, was effectively C:\Users\my_user_name\development\fips-sdks\win\emsdk-portable)
  4. emsdk.bat update
  5. emsdk.bat install --shallow --disable-assertions sdk-incoming-64bit

Expected: Build/install completes, or some sort of early warning system goes off saying the path is going to be too long
Actual: Build/install fails with hard to debug error:

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(312,5): error MSB3491: Could not write lines to file "x64\Release\ClangAttrSubMatchRulesParserStringSwitches\ClangAtt.8917E2BC.tlog\ClangAttrSubMatchRulesParserStringSwitches.lastbuildstate". The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. [C:\Users\my_user_name\development\fips-sdks\win\emsdk-portable\clang\fastcomp\build_incoming_vs2015_64\tools\clang\include\clang\Parse\ClangAttrSubMatchRulesParserStringSwitches.vcxproj]

Activity

  1. juj commented on Jul 5, 2018

    @juj
    Collaborator

    That is a limitation I have seen before, but unfortunately I am out of ideas on how to fix, except to clone to a path that is shorter.

  2. phraemer commented on Jul 5, 2018

    @phraemer

    Perhaps not the fix you want :)
    But on Windows 10 it's possible to just turn on long paths
    https://superuser.com/questions/1119883/windows-10-enable-ntfs-long-paths-policy-option-missing

  3. added a commit that references this issue on Nov 22, 2023
  4. sbc100 commented on Aug 5, 2026

    @sbc100
    Collaborator

    Sounds like this is not something that we can/will fix in emsdk?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions