rclnodejs: Install error on Ubuntu 20.04 with Ros2 Humble

HI, i am trying to install install this package on a nvidia AGX Orin and I am facing compiling errors. To get more info I used “npm install --loglevel verbose” on this setup:

  • Library Version: 0.21.3
  • ROS Version: humble
  • Platform / OS: Ubuntu 20.04 but the linux for tegra version

and this is the output:

> rclnodejs@0.21.3 install
> node-gyp rebuild

gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli   '/usr/bin/node',
gyp verb cli   '/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'rebuild'
gyp verb cli ]
gyp info using node-gyp@9.0.0
gyp info using node@16.17.0 | linux | arm64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb find Python Python is not set from command line or npm configuration
gyp verb find Python Python is not set from environment variable PYTHON
gyp verb find Python checking if "python3" can be used
gyp verb find Python - executing "python3" to get executable path
gyp verb find Python - executable path is "/usr/bin/python3"
gyp verb find Python - executing "/usr/bin/python3" to get version
gyp verb find Python - version is "3.8.10"
gyp info find Python using Python version 3.8.10 found at "/usr/bin/python3"
gyp verb get node dir no --target version specified, falling back to host node version: 16.17.0
gyp verb command install [ '16.17.0' ]
gyp verb install input version string "16.17.0"
gyp verb install installing version: 16.17.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 16.17.0
gyp verb build dir attempting to create "build" dir: /mnt/storage/test-area/rclnodejs/build
gyp verb build dir "build" dir needed to be created? Yes
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: /mnt/storage/test-area/rclnodejs/build/config.gypi
gyp verb config.gypi checking for gypi file: /mnt/storage/test-area/rclnodejs/config.gypi
gyp verb common.gypi checking for gypi file: /mnt/storage/test-area/rclnodejs/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/mnt/storage/test-area/rclnodejs/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/jasmin/.cache/node-gyp/16.17.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/jasmin/.cache/node-gyp/16.17.0',
gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/jasmin/.cache/node-gyp/16.17.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/mnt/storage/test-area/rclnodejs',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp verb command build []
gyp verb build type Release
gyp verb architecture arm64
gyp verb node dev dir /home/jasmin/.cache/node-gyp/16.17.0
gyp verb `which` succeeded for `make` /usr/bin/make
gyp info spawn make
gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/mnt/storage/test-area/rclnodejs/build'
make: execvp: printf: Argument list too long
make: *** [rclnodejs.target.mk:8922: Release/obj.target/rclnodejs/src/addon.o] Error 127
make: Leaving directory '/mnt/storage/test-area/rclnodejs/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Linux 5.10.104-tegra
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /mnt/storage/test-area/rclnodejs
gyp ERR! node -v v16.17.0
gyp ERR! node-gyp -v v9.0.0
gyp ERR! not ok
npm timing command:install Completed in 5540ms
npm verb stack Error: command failed
npm verb stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:63:27)
npm verb stack     at ChildProcess.emit (node:events:513:28)
npm verb stack     at maybeClose (node:internal/child_process:1093:16)
npm verb stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm verb pkgid rclnodejs@0.21.3
npm verb cwd /mnt/storage/test-area/rclnodejs
npm verb Linux 5.10.104-tegra
npm verb node v16.17.0
npm verb npm  v8.15.0
npm ERR! code 1
npm ERR! path /mnt/storage/test-area/rclnodejs
npm ERR! command failed
npm ERR! command sh /tmp/install-6c0a1c6f.sh
npm verb exit 1
npm timing npm Completed in 5654ms
npm verb code 1

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jasmin/.npm/_logs/2022-09-22T10_21_48_410Z-debug-0.log

Sadly i am not an expert on nodejs and hopefully someone can help me Kind regards, Nils

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

just a small typo in

(please build wiht flag --merge-install).

but thanks 😃

I remember there was once a flag called --merge-install, which enables merging all the components together, please check with https://docs.ros.org/en/eloquent/Installation/Linux-Development-Setup.html#build-the-code-in-the-workspace, but not sure whether it’s still feasible for Humble. What is certain is that installing from Debian package does merge them together.