Skip to content

@tensorflow/tfjs-node build fails if the build isn't provided by Google and the project path contains spaces #8615

@dword-design

Description

@dword-design

Please make sure that this is a bug. As per our
GitHub Policy,
we only address code/doc bugs, performance issues, feature requests and
build/installation issues on GitHub. tag:bug_template

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow.js): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): macOS Tahoe 26.2
  • Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: No
  • TensorFlow.js installed from (npm or script link): @tensorflow/tfjs-node
  • TensorFlow.js version (use command below): 4.22.0
  • Browser version: Happening in the CLI
  • Tensorflow.js Converter Version:

Describe the current behavior

Project path without space: Tensorflow builds locally (after failing to load the build from Google)
Project path with space (e.g. /Users/user/foo bar baz):

gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
│ clang++: error: no such file or directory: 'bar'
│ clang++: error: no such file or directory: 'baz/node_modules/@tensorflow/tfjs-node/deps/include'
│ make: *** [Release/obj.target/tfjs_binding/binding/tfjs_backend.o] Error 1
│ gyp ERR! build error 
│ gyp ERR! stack Error: `make` failed with exit code: 2

Describe the expected behavior

The lib builds in both cases.

Standalone code to reproduce the issue
Not possible because it depends on the checkout path.

Other info / logs Include any logs or source code that would be helpful to
diagnose the problem. If including tracebacks, please include the full
traceback. Large logs and files should be attached.

gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
│ clang++: error: no such file or directory: 'bar'
│ clang++: error: no such file or directory: 'baz/node_modules/@tensorflow/tfjs-node/deps/include'
│ make: *** [Release/obj.target/tfjs_binding/binding/tfjs_backend.o] Error 1
│ gyp ERR! build error 
│ gyp ERR! stack Error: `make` failed with exit code: 2

Additional thoughts
@tensorflow/tfjs-node uses an outdated version of @mapbox/node-pre-gyp. Maybe related.

Is probably also the reason why the macOS Apple Chip issues in this repo are open right now.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions