Closed traversaro closed 3 years ago
Following the README installation procedure on vanilla Ubuntu machine, the step 4 of server installation (https://github.com/dic-iit/yarp-openmct#server-installation) fails with:
traversaro@IITICUBLAP102:~/src/yarp-openmct/iCubTelemVizServer$ npm install
npm WARN package.json iCubTelemVizServer@1.0.0 No README data
npm WARN deprecated json3@3.3.2: Please use the native JSON object instead of JSON 3
npm WARN deprecated json3@3.2.6: Please use the native JSON object instead of JSON 3
npm WARN deprecated tar@1.0.3: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN deprecated npmconf@2.1.3: this package has been reintegrated into npm and is now out of date with respect to npm
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN engine request@2.88.2: wanted: {"node":">= 6"} (current: {"node":"4.2.2","npm":"2.14.7"})
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN engine har-validator@5.1.5: wanted: {"node":">=6"} (current: {"node":"4.2.2","npm":"2.14.7"})
npm WARN deprecated natives@1.1.6: This module relies on Node.js's internals and will break at some point. Do not use it, and update to graceful-fs@4.x.
npm WARN engine punycode@2.1.1: wanted: {"node":">=6"} (current: {"node":"4.2.2","npm":"2.14.7"})
npm WARN engine punycode@2.1.1: wanted: {"node":">=6"} (current: {"node":"4.2.2","npm":"2.14.7"})
\
> YarpJS@1.0.0 install /home/traversaro/src/yarp-openmct/iCubTelemVizServer/node_modules/YarpJS
> cmake-js
ERR! OMG C++ Compiler toolset is not available. Install proper compiler toolset with your package manager, eg. 'sudo apt-get install g++'.
ERR! OMG C++ Compiler toolset is not available. Install proper compiler toolset with your package manager, eg. 'sudo apt-get install g++'.
npm ERR! Linux 4.19.104-microsoft-standard
npm ERR! argv "/home/traversaro/.nvm/versions/node/v4.2.2/bin/node" "/home/traversaro/.nvm/versions/node/v4.2.2/bin/npm" "install"
npm ERR! node v4.2.2
npm ERR! npm v2.14.7
npm ERR! code ELIFECYCLE
npm ERR! YarpJS@1.0.0 install: `cmake-js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the YarpJS@1.0.0 install script 'cmake-js'.
npm ERR! This is most likely a problem with the YarpJS package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cmake-js
npm ERR! You can get their info via:
npm ERR! npm owner ls YarpJS
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/traversaro/src/yarp-openmct/iCubTelemVizServer/npm-debug.log
I installed build-essential
apt package, but then it fails with:
info TOOL Using Unix Makefiles generator.
info TOOL Using c++11 compiler standard.
info DIST Downloading distribution files.
http DIST - http://nodejs.org/dist/v4.2.2/SHASUMS256.txt
http DIST - http://nodejs.org/dist/v4.2.2/node-v4.2.2-headers.tar.gz
ERR! OMG CMake executable is not found. Please use your system's package manager to install it, or you can get installers from there: http://cmake.org.
npm ERR! Linux 4.19.104-microsoft-standard
npm ERR! argv "/home/traversaro/.nvm/versions/node/v4.2.2/bin/node" "/home/traversaro/.nvm/versions/node/v4.2.2/bin/npm" "install"
npm ERR! node v4.2.2
npm ERR! npm v2.14.7
npm ERR! code ELIFECYCLE
npm ERR! YarpJS@1.0.0 install: `cmake-js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the YarpJS@1.0.0 install script 'cmake-js'.
npm ERR! This is most likely a problem with the YarpJS package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cmake-js
npm ERR! You can get their info via:
npm ERR! npm owner ls YarpJS
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/traversaro/src/yarp-openmct/iCubTelemVizServer/npm-debug.log
Even after installing cmake, the command fails with:
traversaro@IITICUBLAP102:~/src/yarp-openmct/iCubTelemVizServer$ npm install
npm WARN package.json iCubTelemVizServer@1.0.0 No README data
npm WARN deprecated npmconf@2.1.3: this package has been reintegrated into npm and is now out of date with respect to npm
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated tar@1.0.3: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN engine request@2.88.2: wanted: {"node":">= 6"} (current: {"node":"4.2.2","npm":"2.14.7"})
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN engine har-validator@5.1.5: wanted: {"node":">=6"} (current: {"node":"4.2.2","npm":"2.14.7"})
npm WARN deprecated natives@1.1.6: This module relies on Node.js's internals and will break at some point. Do not use it, and update to graceful-fs@4.x.
npm WARN engine punycode@2.1.1: wanted: {"node":">=6"} (current: {"node":"4.2.2","npm":"2.14.7"})
npm WARN engine punycode@2.1.1: wanted: {"node":">=6"} (current: {"node":"4.2.2","npm":"2.14.7"})
\
> YarpJS@1.0.0 install /home/traversaro/src/yarp-openmct/iCubTelemVizServer/node_modules/YarpJS
> cmake-js
info TOOL Using Unix Makefiles generator.
info TOOL Using c++11 compiler standard.
info CMD CONFIGURE
info RUN cmake "/home/traversaro/src/yarp-openmct/iCubTelemVizServer/node_modules/YarpJS" --no-warn-unused-cli -G"Unix Makefiles" -DCMAKE_JS_VERSION="3.2.1" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="/home/traversaro/src/yarp-openmct/iCubTelemVizServer/node_modules/YarpJS/build/Release" -DCMAKE_JS_INC="/home/traversaro/.cmake-js/node-x64/v4.2.2/include/node;/home/traversaro/src/yarp-openmct/iCubTelemVizServer/node_modules/YarpJS/node_modules/nan" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="4.2.2" -DNODE_ARCH="x64" -DCMAKE_CXX_FLAGS="-std=c++11"
Not searching for unused variables given on the command line.
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at CMakeLists.txt:12 (find_package):
By not providing "FindYARP.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "YARP", but
CMake did not find one.
Could not find a package configuration file provided by "YARP" with any of
the following names:
YARPConfig.cmake
yarp-config.cmake
Add the installation prefix of "YARP" to CMAKE_PREFIX_PATH or set
"YARP_DIR" to a directory containing one of the above files. If "YARP"
provides a separate development package or SDK, be sure it has been
installed.
CMake Warning at CMakeLists.txt:13 (find_package):
By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "OpenCV", but
CMake did not find one.
Could not find a package configuration file provided by "OpenCV" with any
of the following names:
OpenCVConfig.cmake
opencv-config.cmake
Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set
"OpenCV_DIR" to a directory containing one of the above files. If "OpenCV"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/traversaro/src/yarp-openmct/iCubTelemVizServer/node_modules/YarpJS/build
info CMD BUILD
info RUN cmake --build "/home/traversaro/src/yarp-openmct/iCubTelemVizServer/node_modules/YarpJS/build" --config Release
Scanning dependencies of target YarpJS
[ 8%] Building CXX object CMakeFiles/YarpJS.dir/YarpJS/src/YarpJS.cpp.o
[ 16%] Building CXX object CMakeFiles/YarpJS.dir/YarpJS/src/YarpJS_Bottle.cpp.o
In file included from /home/traversaro/src/yarp-openmct/iCubTelemVizServer/node_modules/YarpJS/YarpJS/src/YarpJS_Bottle.cpp:6:
/home/traversaro/src/yarp-openmct/iCubTelemVizServer/node_modules/YarpJS/YarpJS/include/YarpJS_Bottle.h:17:10: fatal error: yarp/os/Bottle.h: No such file or directory
17 | #include <yarp/os/Bottle.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/YarpJS.dir/build.make:76: CMakeFiles/YarpJS.dir/YarpJS/src/YarpJS_Bottle.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/YarpJS.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
ERR! OMG Process terminated: 2
npm ERR! Linux 4.19.104-microsoft-standard
npm ERR! argv "/home/traversaro/.nvm/versions/node/v4.2.2/bin/node" "/home/traversaro/.nvm/versions/node/v4.2.2/bin/npm" "install"
npm ERR! node v4.2.2
npm ERR! npm v2.14.7
npm ERR! code ELIFECYCLE
npm ERR! YarpJS@1.0.0 install: `cmake-js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the YarpJS@1.0.0 install script 'cmake-js'.
npm ERR! This is most likely a problem with the YarpJS package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cmake-js
npm ERR! You can get their info via:
npm ERR! npm owner ls YarpJS
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/traversaro/src/yarp-openmct/iCubTelemVizServer/npm-debug.log
Perhaps the command should be executed inside the `robotologyenv
conda environment?
Perhaps the command should be executed inside the
`robotologyenv
conda environment?
Indeed this fixes all the problems, after also installing the compilers
and cmake
packages. Now the problem is that in section https://github.com/dic-iit/yarp-openmct#how-to-run-the-server , point 2, gazebo, icub-models and gazebo-yarp-plugins are assumed to be installed, but it is not documented anywhere to install them.
Recap of problems:
robotologyenv
conda environment enabled (all of them?) and which notcompilers
and cmake
conda packages are necessary, but their installation is not documentedgazebo-yarp-plugins
and icub-models
conda packages are necessary, but their installation is not documentednvm use 14.17.0
before npm start
in /home/traversaro/src/yarp-openmct/openmctStaticServer
Running npm start
in ~/src/yarp-openmct/openmctStaticServer
fails with error:
traversaro@IITICUBLAP102:~/src/yarp-openmct/openmctStaticServer$ npm start
> openmctStaticServer@1.0.0 start /home/traversaro/src/yarp-openmct/openmctStaticServer
> node server.js
/home/traversaro/src/yarp-openmct/openmctStaticServer/node_modules/express-ws/node_modules/ws/lib/constants.js:8
EMPTY_BUFFER: Buffer.alloc(0),
^
TypeError: Buffer.alloc is not a function
at Object.<anonymous> (/home/traversaro/src/yarp-openmct/openmctStaticServer/node_modules/express-ws/node_modules/ws/lib/constants.js:8:24)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/home/traversaro/src/yarp-openmct/openmctStaticServer/node_modules/express-ws/node_modules/ws/lib/permessage-deflate.js:7:19)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
npm ERR! Linux 4.19.104-microsoft-standard
npm ERR! argv "/home/traversaro/.nvm/versions/node/v4.2.2/bin/node" "/home/traversaro/.nvm/versions/node/v4.2.2/bin/npm" "start"
npm ERR! node v4.2.2
npm ERR! npm v2.14.7
npm ERR! code ELIFECYCLE
npm ERR! openmctStaticServer@1.0.0 start: `node server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the openmctStaticServer@1.0.0 start script 'node server.js'.
npm ERR! This is most likely a problem with the openmctStaticServer package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node server.js
npm ERR! You can get their info via:
npm ERR! npm owner ls openmctStaticServer
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/traversaro/src/yarp-openmct/openmctStaticServer/npm-debug.log
probably a nvm use 14.17.0
is missing somewhere, as executing it before fixes the problem.
I was able to finally start everything, but now the visualization is not showing any data and just showing a waiting for cursor:
With yarp read ... /icubSim/left_leg/state:o
I am able to read that the data are actually transmitted, and via YARP http debug features I am able to see that indeed there is a connection from /icubSim/left_leg/state:o
to /yarpjs/left_leg/stateExt:o
:
The problem was on Firefox, on Chrome it is working.
All installation procedure guidelines and other README issues shall be addressed in https://github.com/ami-iit/yarp-openmct/issues/22. The issue about running the visualizer on Firefox (https://github.com/ami-iit/yarp-openmct/issues/12#issuecomment-910207820) shall be addressed in https://github.com/ami-iit/yarp-openmct/issues/33.
@traversaro , since the issue here is about your task of running the tests, can we close it?
Ok, let's close it!
The section in https://github.com/dic-iit/yarp-openmct#notes contains a link to a private repo.