Skip to content
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

v8 inspector build failure: File name too long #7959

Closed
gibfahn opened this issue Aug 3, 2016 · 5 comments
Closed

v8 inspector build failure: File name too long #7959

gibfahn opened this issue Aug 3, 2016 · 5 comments
Labels
build Issues and PRs related to build files or the CI.

Comments

@gibfahn
Copy link
Member

gibfahn commented Aug 3, 2016

  • Version: master
  • Platform: All (x,p,z,ple Linux, OSX, AIX)
  • Subsystem: build, deps/v8_inspector

I'm assuming this is because the file name is 258 characters long, as the name contains the full directory path. This can be worked around with custom Jenkins workspaces, but the file name is 168 chars without the directory structure anyway.

  LD_LIBRARY_PATH=/space/jenkins-local/workspace/node-master-build/ARCH/x64/GCC/gcc48/OS/linux/labels/build/node/out/Release/lib.host:/space/jenkins-local/workspace/node-master-build/ARCH/x64/GCC/gcc48/OS/linux/labels/build/node/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../deps/v8_inspector/third_party/v8_inspector/platform/v8_inspector; mkdir -p /space/jenkins-local/workspace/node-master-build/ARCH/x64/GCC/gcc48/OS/linux/labels/build/node/out/Release/obj/gen/blink/platform/v8_inspector; python ../inspector_protocol/generate-inspector-protocol-version --o "/space/jenkins-local/workspace/node-master-build/ARCH/x64/GCC/gcc48/OS/linux/labels/build/node/out/Release/obj/gen/blink/platform/v8_inspector/protocol.json" js_protocol.json
  touch _space_jenkins_local_workspace_node_master_build_ARCH_x64_GCC_gcc48_OS_linux_labels_build_node_deps_v8_inspector_third_party_v8_inspector_platform_v8_inspector_v8_inspector_gyp_protocol_sources_target_generateV8InspectorProtocolBackendSources.intermediate
/bin/sh: /space/jenkins-local/workspace/node-master-build/ARCH/x64/GCC/gcc48/OS/linux/labels/build/node/out/Release/.deps/_space_jenkins_local_workspace_node_master_build_ARCH_x64_GCC_gcc48_OS_linux_labels_build_node_deps_v8_inspector_third_party_v8_inspector_platform_v8_inspector_v8_inspector_gyp_protocol_sources_target_generateV8InspectorProtocolBackendSources.intermediate.d: File name too long
make[2]: *** [_space_jenkins_local_workspace_node_master_build_ARCH_x64_GCC_gcc48_OS_linux_labels_build_node_deps_v8_inspector_third_party_v8_inspector_platform_v8_inspector_v8_inspector_gyp_protocol_sources_target_generateV8InspectorProtocolBackendSources.intermediate] Error 1
make[2]: *** Waiting for unfinished jobs....
rm _space_jenkins_local_workspace_node_master_build_ARCH_x64_GCC_gcc48_OS_linux_labels_build_node_deps_v8_inspector_third_party_v8_inspector_platform_v8_inspector_v8_inspector_gyp_protocol_sources_target_generateV8InspectorProtocolBackendSources.intermediate
make[2]: Leaving directory `/space/jenkins-local/workspace/node-master-build/ARCH/x64/GCC/gcc48/OS/linux/labels/build/node/out'
make[1]: *** [node] Error 2
make[1]: Leaving directory `/space/jenkins-local/workspace/node-master-build/ARCH/x64/GCC/gcc48/OS/linux/labels/build/node'
make: *** [node-v7.0.0-linux-x64.tar] Error 2
@bnoordhuis
Copy link
Member

It's a gyp issue. Cheap hack to work around it:

diff --git a/tools/gyp/pylib/gyp/generator/make.py b/tools/gyp/pylib/gyp/generator/make.py
index a81f639..47e841e 100644
--- a/tools/gyp/pylib/gyp/generator/make.py
+++ b/tools/gyp/pylib/gyp/generator/make.py
@@ -21,6 +21,7 @@
 # toplevel Makefile.  It may make sense to generate some .mk files on
 # the side to keep the the files readable.

+import hashlib
 import os
 import re
 import sys
@@ -873,6 +874,7 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD
     for action in actions:
       name = StringToMakefileVariable('%s_%s' % (self.qualified_target,
                                                  action['action_name']))
+      name = hashlib.sha1(name).hexdigest()
       self.WriteLn('### Rules for action "%s":' % action['action_name'])
       inputs = action['inputs']
       outputs = action['outputs']

Not really a proper fix but it demonstrates where the issue lies.

@bnoordhuis bnoordhuis added the build Issues and PRs related to build files or the CI. label Aug 3, 2016
@addaleax
Copy link
Member

addaleax commented Aug 3, 2016

See also #7510… would pulling in addaleax@4747d1b be acceptable as floating a patch on gyp?

@bnoordhuis
Copy link
Member

Great minds really do seem to think alike... In light of Google's lack of interest in maintaining gyp, I think floating a patch is acceptable.

@addaleax
Copy link
Member

addaleax commented Aug 3, 2016

PR: #7963

addaleax added a commit to addaleax/node that referenced this issue Aug 3, 2016
Pulling in https://codereview.chromium.org/2019133002/ in its current
state, as gyp seems to be largely abandoned as a project.

Original commit message:

    Hash intermediate file name to avoid ENAMETOOLONG

    Hash the intermediate Makefile target used for multi-output rules
    so that it still works when the involved file names are very long.

    Since the intermediate file's name is effectively arbitrary, this
    does not come with notable behavioural changes.

    The `import hashlib` boilerplate is taken directly
    from `xcodeproj_file.py`.

Concretely, this makes the V8 inspector build currently fail when long
pathnames are involved, notably when using ecryptfs which has a lower
file name length limit.

Fixes: nodejs#7959
Ref: nodejs#7510
@addaleax addaleax closed this as completed Aug 8, 2016
addaleax added a commit that referenced this issue Aug 8, 2016
Pulling in https://codereview.chromium.org/2019133002/ in its current
state, as gyp seems to be largely abandoned as a project.

Original commit message:

    Hash intermediate file name to avoid ENAMETOOLONG

    Hash the intermediate Makefile target used for multi-output rules
    so that it still works when the involved file names are very long.

    Since the intermediate file's name is effectively arbitrary, this
    does not come with notable behavioural changes.

    The `import hashlib` boilerplate is taken directly
    from `xcodeproj_file.py`.

Concretely, this makes the V8 inspector build currently fail when long
pathnames are involved, notably when using ecryptfs which has a lower
file name length limit.

Fixes: #7959
Ref: #7510
PR-URL: #7963
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
cjihrig pushed a commit that referenced this issue Aug 10, 2016
Pulling in https://codereview.chromium.org/2019133002/ in its current
state, as gyp seems to be largely abandoned as a project.

Original commit message:

    Hash intermediate file name to avoid ENAMETOOLONG

    Hash the intermediate Makefile target used for multi-output rules
    so that it still works when the involved file names are very long.

    Since the intermediate file's name is effectively arbitrary, this
    does not come with notable behavioural changes.

    The `import hashlib` boilerplate is taken directly
    from `xcodeproj_file.py`.

Concretely, this makes the V8 inspector build currently fail when long
pathnames are involved, notably when using ecryptfs which has a lower
file name length limit.

Fixes: #7959
Ref: #7510
PR-URL: #7963
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
MylesBorins pushed a commit that referenced this issue Sep 30, 2016
Pulling in https://codereview.chromium.org/2019133002/ in its current
state, as gyp seems to be largely abandoned as a project.

Original commit message:

    Hash intermediate file name to avoid ENAMETOOLONG

    Hash the intermediate Makefile target used for multi-output rules
    so that it still works when the involved file names are very long.

    Since the intermediate file's name is effectively arbitrary, this
    does not come with notable behavioural changes.

    The `import hashlib` boilerplate is taken directly
    from `xcodeproj_file.py`.

Concretely, this makes the V8 inspector build currently fail when long
pathnames are involved, notably when using ecryptfs which has a lower
file name length limit.

Fixes: #7959
Ref: #7510
PR-URL: #7963
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
bnoordhuis pushed a commit to bnoordhuis/io.js that referenced this issue Oct 8, 2016
Pulling in https://codereview.chromium.org/2019133002/ in its current
state, as gyp seems to be largely abandoned as a project.

Original commit message:

    Hash intermediate file name to avoid ENAMETOOLONG

    Hash the intermediate Makefile target used for multi-output rules
    so that it still works when the involved file names are very long.

    Since the intermediate file's name is effectively arbitrary, this
    does not come with notable behavioural changes.

    The `import hashlib` boilerplate is taken directly
    from `xcodeproj_file.py`.

Concretely, this makes the V8 inspector build currently fail when long
pathnames are involved, notably when using ecryptfs which has a lower
file name length limit.

Fixes: nodejs#7959
Ref: nodejs#7510
PR-URL: nodejs#7963
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
rvagg pushed a commit that referenced this issue Oct 18, 2016
Pulling in https://codereview.chromium.org/2019133002/ in its current
state, as gyp seems to be largely abandoned as a project.

Original commit message:

    Hash intermediate file name to avoid ENAMETOOLONG

    Hash the intermediate Makefile target used for multi-output rules
    so that it still works when the involved file names are very long.

    Since the intermediate file's name is effectively arbitrary, this
    does not come with notable behavioural changes.

    The `import hashlib` boilerplate is taken directly
    from `xcodeproj_file.py`.

Concretely, this makes the V8 inspector build currently fail when long
pathnames are involved, notably when using ecryptfs which has a lower
file name length limit.

Fixes: #7959
Ref: #7510
PR-URL: #7963
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
MylesBorins pushed a commit that referenced this issue Oct 26, 2016
Pulling in https://codereview.chromium.org/2019133002/ in its current
state, as gyp seems to be largely abandoned as a project.

Original commit message:

    Hash intermediate file name to avoid ENAMETOOLONG

    Hash the intermediate Makefile target used for multi-output rules
    so that it still works when the involved file names are very long.

    Since the intermediate file's name is effectively arbitrary, this
    does not come with notable behavioural changes.

    The `import hashlib` boilerplate is taken directly
    from `xcodeproj_file.py`.

Concretely, this makes the V8 inspector build currently fail when long
pathnames are involved, notably when using ecryptfs which has a lower
file name length limit.

Fixes: #7959
Ref: #7510
PR-URL: #7963
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
rvagg pushed a commit to nodejs/node-gyp that referenced this issue Aug 9, 2018
Pulling in https://codereview.chromium.org/2019133002/ in its current
state, as gyp seems to be largely abandoned as a project.

Original commit message:

    Hash intermediate file name to avoid ENAMETOOLONG

    Hash the intermediate Makefile target used for multi-output rules
    so that it still works when the involved file names are very long.

    Since the intermediate file's name is effectively arbitrary, this
    does not come with notable behavioural changes.

    The `import hashlib` boilerplate is taken directly
    from `xcodeproj_file.py`.

Concretely, this makes the V8 inspector build currently fail when long
pathnames are involved, notably when using ecryptfs which has a lower
file name length limit.

Fixes: nodejs/node#7959
Ref: nodejs/node#7510
PR-URL: nodejs/node#7963
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
rvagg pushed a commit to nodejs/node-gyp that referenced this issue Aug 9, 2018
Pulling in https://codereview.chromium.org/2019133002/ in its current
state, as gyp seems to be largely abandoned as a project.

Original commit message:

    Hash intermediate file name to avoid ENAMETOOLONG

    Hash the intermediate Makefile target used for multi-output rules
    so that it still works when the involved file names are very long.

    Since the intermediate file's name is effectively arbitrary, this
    does not come with notable behavioural changes.

    The `import hashlib` boilerplate is taken directly
    from `xcodeproj_file.py`.

Concretely, this makes the V8 inspector build currently fail when long
pathnames are involved, notably when using ecryptfs which has a lower
file name length limit.

Fixes: nodejs/node#7959
Ref: nodejs/node#7510
PR-URL: nodejs/node#7963
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI.
Projects
None yet
Development

No branches or pull requests

4 participants
@bnoordhuis @addaleax @gibfahn and others