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

Fix compilation against gazebo 11 #194

Merged
merged 4 commits into from
Nov 11, 2020
Merged

Fix compilation against gazebo 11 #194

merged 4 commits into from
Nov 11, 2020

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Oct 6, 2020

Made a copule changes that allowed me to build gzweb against gazebo9 and gazebo11 on Bionic:

I also fixed a link and gzweb version in package.json'

Update:

Instead making a PR against a release branch, I created a new gzweb_1.4 dev branch for patches made against the 1.4 version. Once these changes get in, I can tag a gzweb_1.4.1 release and update the instructions on http://gazebosim.org/gzweb.html.

Signed-off-by: Ian Chen ichen@osrfoundation.org

Signed-off-by: Ian Chen <ichen@osrfoundation.org>
@iche033 iche033 mentioned this pull request Oct 6, 2020
@iche033 iche033 changed the base branch from gzweb_1.4.0 to gzweb_1.4 October 7, 2020 02:49
@iche033 iche033 requested a review from chapulina October 7, 2020 02:59
@mis-eu
Copy link

mis-eu commented Oct 7, 2020

great work on these build updates for Gazebo11 on Bionic

unfortunately, the patches do not work to compile gzweb for Gazebo11 on Foxy/Focal
any suggestions?

@Jaeyoung-Lim
Copy link

@iche033 I was following installation instructions on http://gazebosim.org/gzweb.html#install-collapse-1 but there seems to be some dependency conflicts between npm and gazebo11 (on bionic)

@iche033
Copy link
Contributor Author

iche033 commented Oct 7, 2020

@Jaeyoung-Lim I'm using node v6.17.1, and npm 3.10.10. These versions seem to work fine and I installed them using nvm. I had issues in the past with the node and npm versions that come with ubuntu bionic. See if these versions work for you and I can update the installation instructions on gazebosim.org

@mis-eu Maybe it's an issue with node and npm version too? Could you also try node v6 and npm v3?

@Jaeyoung-Lim
Copy link

Jaeyoung-Lim commented Oct 8, 2020

@mis-eu This works perfectly on gazebo11 on Ubuntu Focal.

@iche033 Thanks!

@chapulina
Copy link
Contributor

How about adding some CI that tests against Gazebo 7 / 9 / 11, like this one on master?

https://github.com/osrf/gzweb/blob/master/.github/workflows/ci.yaml

@mis-eu
Copy link

mis-eu commented Oct 12, 2020

@mis-eu This works perfectly on gazebo11 on Ubuntu Focal.

@Jaeyoung-Lim the build error is below
which version node and npm are you using to compile on Ubuntu Focal with ROS2 Foxy?
Failed with:
node v.12.18.4
npm 6.14.6

Also failed with @iche033 suggested:
node v6.17.1
npm 3.10.10

Failed to build on Ubuntu Focal/Foxy/Gazebo11 the https://github.com/osrf/gzweb checked out 1.4
with manually added both patches: eurogroep@696148d

I even installed Boost from source. Would inking the Boost lib to the gzweb build be required?

gzweb Focal/Foxy build error Ouput below

user@machine:~/gzweb$ npm run deploy --- -m

gzweb@1.3.0 deploy /home/user/gzweb
./deploy.sh "-m"

Build a local model database.
Download from gazebo_models repository.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none was installed.
npm WARN gzweb@1.3.0 No license field.
Running "concat:build_src" (concat) task

Running "concat:build_gz3d" (concat) task

Running "concat:build_gui" (concat) task

Running "jshint:files" (jshint) task

2 files lint free.

Running "uglify:build_src" (uglify) task

1 file created 1.48 MB → 693.93 kB

Running "uglify:build_gz3d" (uglify) task

1 file created 1.48 MB → 693.93 kB

Running "uglify:build_gui" (uglify) task

1 file created 2.13 MB → 1.14 MB

Done, without errors.
-- 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
-- gzweb version 2.0.0
CMake Warning (dev) at CMakeLists.txt:23 (set):
Policy CMP0053 is not set: Simplify variable reference and escape sequence
evaluation. Run "cmake --help-policy CMP0053" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.

For input:

'@PROJECT_NAME@-@GZWEB_VERSION_FULL@'

the old evaluation rules produce:

'gzweb-2.0.0'

but the new evaluation rules produce:

'@PROJECT_NAME@-@GZWEB_VERSION_FULL@'

Using the old result for compatibility since the policy is not set.
This warning is for project developers. Use -Wno-dev to suppress it.

-- Build type not selected: Release selected by default
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'bullet>=2.82'
-- Found bullet, version 2.88
-- Found ccd: /usr/include (found suitable version "2.0", minimum required is "2.0")
-- Found fcl: /usr/include (found suitable version "0.5.0", minimum required is "0.3.2")
-- Found assimp: /usr/include (found version "5.0.0")
-- Found DART: /usr/include (Required is at least version "6.6") found components: dart
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.40.0") found components: thread system filesystem program_options regex iostreams date_time
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.6.1")
-- Looking for ignition-math6 -- found version 6.4.0
-- Searching for dependencies of ignition-math6
-- Looking for OGRE...
-- OGRE_PREFIX_WATCH changed.
-- Checking for module 'OGRE'
-- Found OGRE, version 1.9.0
-- Found Ogre Ghadamon (1.9.0)
-- Found OGRE: optimized;/usr/lib/x86_64-linux-gnu/libOgreMain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreMain.so
-- Looking for OGRE_Paging...
-- Found OGRE_Paging: optimized;/usr/lib/x86_64-linux-gnu/libOgrePaging.so;debug;/usr/lib/x86_64-linux-gnu/libOgrePaging.so
-- Looking for OGRE_Terrain...
-- Found OGRE_Terrain: optimized;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so
-- Looking for OGRE_Property...
-- Found OGRE_Property: optimized;/usr/lib/x86_64-linux-gnu/libOgreProperty.so;debug;/usr/lib/x86_64-linux-gnu/libOgreProperty.so
-- Looking for OGRE_RTShaderSystem...
-- Found OGRE_RTShaderSystem: optimized;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so;debug;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so
-- Looking for OGRE_Volume...
-- Found OGRE_Volume: optimized;/usr/lib/x86_64-linux-gnu/libOgreVolume.so;debug;/usr/lib/x86_64-linux-gnu/libOgreVolume.so
-- Looking for OGRE_Overlay...
-- Found OGRE_Overlay: optimized;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so;debug;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so
-- Looking for ignition-math6 -- found version 6.4.0
-- Looking for ignition-transport8 -- found version 8.0.0
-- Searching for dependencies of ignition-transport8
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found suitable version "3.6.1", minimum required is "3")
-- Config-file not installed for ZeroMQ -- checking for pkg-config
-- Checking for module 'libzmq >= 4'
-- Found libzmq , version 4.3.2
-- Found ZeroMQ: TRUE (Required is at least version "4")
-- Checking for module 'uuid'
-- Found uuid, version 2.34.0
-- Found UUID: TRUE
-- Looking for ignition-msgs5 -- found version 5.3.0
-- Searching for dependencies of ignition-msgs5
-- Looking for ignition-math6 -- found version 6.4.0
-- Checking for module 'tinyxml2'
-- Found tinyxml2, version 6.2.0
-- Looking for ignition-msgs5 -- found version 5.3.0
-- Looking for ignition-common3 -- found version 3.6.0
-- Searching for dependencies of ignition-common3
-- Looking for dlfcn.h - found
-- Looking for libdl - found
-- Found DL: TRUE
-- Searching for component [graphics]
-- Looking for ignition-common3-graphics -- found version 3.6.0
-- Searching for dependencies of ignition-common3-graphics
-- Looking for ignition-math6 -- found version 6.4.0
-- Looking for ignition-fuel_tools4 -- found version 4.1.0
-- Searching for dependencies of ignition-fuel_tools4
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.68.0")
-- Checking for module 'jsoncpp'
-- Found jsoncpp, version 1.7.4
-- Found JSONCPP: TRUE
-- Checking for module 'yaml-0.1'
-- Found yaml-0.1, version 0.2.2
-- Found YAML: TRUE
-- Checking for module 'libzip'
-- Found libzip, version 1.5.1
-- Found ZIP: TRUE
-- Looking for ignition-common3 -- found version 3.6.0
-- Looking for ignition-msgs5 -- found version 5.3.0
-- Checking for module 'jansson'
-- Found jansson, version 2.12
-- Checking for module 'gts'
-- Found gts, version 0.7.6
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0")
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0") found components: system filesystem regex thread
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.6.1")
-- Looking for tinyxml.h - found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/gzweb/build
Scanning dependencies of target gzcoarse
[ 50%] Building CXX object tools/CMakeFiles/gzcoarse.dir/gzcoarse.cc.o
/home/user/gzweb/tools/gzcoarse.cc: In function ‘void ExportVisualScenes(TiXmlElement*, const gazebo::common::Mesh*)’:
/home/user/gzweb/tools/gzcoarse.cc:427:58: warning: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Wformat-truncation=]
427 | snprintf(attributeValue, sizeof(attributeValue), "#%s", meshId);
| ^
In file included from /usr/include/stdio.h:867,
from /usr/include/gts.h:23,
from /home/user/gzweb/tools/gzcoarse.cc:18:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:35: note: ‘__builtin___snprintf_chk’ output between 2 and 101 bytes into a destination of size 100
67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/gzweb/tools/gzcoarse.cc:445:60: warning: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Wformat-truncation=]
445 | snprintf(attributeValue, sizeof(attributeValue), "#%s", materialId);
| ^
In file included from /usr/include/stdio.h:867,
from /usr/include/gts.h:23,
from /home/user/gzweb/tools/gzcoarse.cc:18:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:35: note: ‘__builtin___snprintf_chk’ output between 2 and 101 bytes into a destination of size 100
67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/gzweb/tools/gzcoarse.cc: In function ‘void ExportGeometrySource(const gazebo::common::SubMesh*, TiXmlElement*, GeometryType, const char*)’:
/home/user/gzweb/tools/gzcoarse.cc:352:53: warning: ‘-array’ directive output may be truncated writing 6 bytes into a region of size between 1 and 100 [-Wformat-truncation=]
352 | snprintf(sourceArrayId, sizeof(sourceArrayId), "%s-array", sourceId);
| ^~~~~~
In file included from /usr/include/stdio.h:867,
from /usr/include/gts.h:23,
from /home/user/gzweb/tools/gzcoarse.cc:18:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:35: note: ‘__builtin___snprintf_chk’ output between 7 and 106 bytes into a destination of size 100
67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/gzweb/tools/gzcoarse.cc:362:54: warning: ‘-array’ directive output may be truncated writing 6 bytes into a region of size between 0 and 99 [-Wformat-truncation=]
362 | snprintf(sourceArrayId, sizeof(sourceArrayId), "#%s-array", sourceId);
| ^~~~~~
In file included from /usr/include/stdio.h:867,
from /usr/include/gts.h:23,
from /home/user/gzweb/tools/gzcoarse.cc:18:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:35: note: ‘__builtin___snprintf_chk’ output between 8 and 107 bytes into a destination of size 100
67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/gzweb/tools/gzcoarse.cc: In function ‘void ExportTextureSource(const gazebo::common::SubMesh*, const gazebo::common::SubMesh*, TiXmlElement*, const char*)’:
/home/user/gzweb/tools/gzcoarse.cc:277:53: warning: ‘-array’ directive output may be truncated writing 6 bytes into a region of size between 1 and 100 [-Wformat-truncation=]
277 | snprintf(sourceArrayId, sizeof(sourceArrayId), "%s-array", sourceId);
| ^~~~~~
In file included from /usr/include/stdio.h:867,
from /usr/include/gts.h:23,
from /home/user/gzweb/tools/gzcoarse.cc:18:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:35: note: ‘__builtin___snprintf_chk’ output between 7 and 106 bytes into a destination of size 100
67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/gzweb/tools/gzcoarse.cc:287:54: warning: ‘-array’ directive output may be truncated writing 6 bytes into a region of size between 0 and 99 [-Wformat-truncation=]
287 | snprintf(sourceArrayId, sizeof(sourceArrayId), "#%s-array", sourceId);
| ^~~~~~
In file included from /usr/include/stdio.h:867,
from /usr/include/gts.h:23,
from /home/user/gzweb/tools/gzcoarse.cc:18:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:35: note: ‘__builtin___snprintf_chk’ output between 8 and 107 bytes into a destination of size 100
67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/gzweb/tools/gzcoarse.cc: In function ‘void ExportGeometries(TiXmlElement*, const gazebo::common::Mesh*, const gazebo::common::Mesh*)’:
/home/user/gzweb/tools/gzcoarse.cc:758:57: warning: ‘-Vertex’ directive output may be truncated writing 7 bytes into a region of size between 1 and 100 [-Wformat-truncation=]
758 | snprintf(attributeValue, sizeof(attributeValue), "%s-Vertex", meshId);
| ^~~~~~~
In file included from /usr/include/stdio.h:867,
from /usr/include/gts.h:23,
from /home/user/gzweb/tools/gzcoarse.cc:18:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:35: note: ‘__builtin___snprintf_chk’ output between 8 and 107 bytes into a destination of size 100
67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/gzweb/tools/gzcoarse.cc:765:58: warning: ‘-Positions’ directive output may be truncated writing 10 bytes into a region of size between 0 and 99 [-Wformat-truncation=]
765 | snprintf(attributeValue, sizeof(attributeValue), "#%s-Positions", meshId);
| ^~~~~~~~~~
In file included from /usr/include/stdio.h:867,
from /usr/include/gts.h:23,
from /home/user/gzweb/tools/gzcoarse.cc:18:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:35: note: ‘__builtin___snprintf_chk’ output between 12 and 111 bytes into a destination of size 100
67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/gzweb/tools/gzcoarse.cc:782:58: warning: ‘-Vertex’ directive output may be truncated writing 7 bytes into a region of size between 0 and 99 [-Wformat-truncation=]
782 | snprintf(attributeValue, sizeof(attributeValue), "#%s-Vertex", meshId);
| ^~~~~~~
In file included from /usr/include/stdio.h:867,
from /usr/include/gts.h:23,
from /home/user/gzweb/tools/gzcoarse.cc:18:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:35: note: ‘__builtin___snprintf_chk’ output between 9 and 108 bytes into a destination of size 100
67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/gzweb/tools/gzcoarse.cc:789:58: warning: ‘-Normals’ directive output may be truncated writing 8 bytes into a region of size between 0 and 99 [-Wformat-truncation=]
789 | snprintf(attributeValue, sizeof(attributeValue), "#%s-Normals", meshId);
| ^~~~~~~~
In file included from /usr/include/stdio.h:867,
from /usr/include/gts.h:23,
from /home/user/gzweb/tools/gzcoarse.cc:18:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:35: note: ‘__builtin___snprintf_chk’ output between 10 and 109 bytes into a destination of size 100
67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/gzweb/tools/gzcoarse.cc:798:60: warning: ‘-UVMap’ directive output may be truncated writing 6 bytes into a region of size between 0 and 99 [-Wformat-truncation=]
798 | snprintf(attributeValue, sizeof(attributeValue), "#%s-UVMap", meshId);
| ^~~~~~
In file included from /usr/include/stdio.h:867,
from /usr/include/gts.h:23,
from /home/user/gzweb/tools/gzcoarse.cc:18:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:35: note: ‘__builtin___snprintf_chk’ output between 8 and 107 bytes into a destination of size 100
67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[100%] Linking CXX executable gzcoarse
[100%] Built target gzcoarse
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack /home/user/gzweb/node_modules/mkdirp/lib/opts-arg.js:7
gyp ERR! stack opts = { mode: 0o777, fs, ...opts }
gyp ERR! stack ^^^
gyp ERR! stack
gyp ERR! stack SyntaxError: Unexpected token ...
gyp ERR! stack at createScript (vm.js:56:10)
gyp ERR! stack at Object.runInThisContext (vm.js:97:10)
gyp ERR! stack at Module._compile (module.js:549:28)
gyp ERR! stack at Object.Module._extensions..js (module.js:586:10)
gyp ERR! stack at Module.load (module.js:494:32)
gyp ERR! stack at tryModuleLoad (module.js:453:12)
gyp ERR! stack at Function.Module._load (module.js:445:3)
gyp ERR! stack at Module.require (module.js:504:17)
gyp ERR! stack at require (internal/module.js:20:19)
gyp ERR! stack at Object. (/home/user/gzweb/node_modules/mkdirp/index.js:1:79)
gyp ERR! System Linux 4.19.104-microsoft-standard
gyp ERR! command "/home/user/.nvm/versions/node/v6.17.1/bin/node" "/home/user/gzweb/node_modules/.bin/node-gyp" "configure"
gyp ERR! cwd /home/user/gzweb/gzbridge
gyp ERR! node -v v6.17.1
gyp ERR! node-gyp -v v7.1.0
gyp ERR! Node-gyp failed to build your package.
gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the package author.
sed: can't read build/gzbridge.target.mk: No such file or directory
gyp ERR! build error
gyp ERR! stack Error: You must run node-gyp configure first!
gyp ERR! stack at ReadFileContext. (/home/user/gzweb/node_modules/node-gyp/lib/build.js:43:20)
gyp ERR! stack at ReadFileContext.callback (/home/user/gzweb/node_modules/graceful-fs/graceful-fs.js:123:16)
gyp ERR! stack at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:367:13)
gyp ERR! System Linux 4.19.104-microsoft-standard
gyp ERR! command "/home/user/.nvm/versions/node/v6.17.1/bin/node" "/home/user/gzweb/node_modules/.bin/node-gyp" "build" "-d"
gyp ERR! cwd /home/user/gzweb/gzbridge
gyp ERR! node -v v6.17.1
gyp ERR! node-gyp -v v7.1.0
gyp ERR! not ok
There are node-gyp build errors, exiting.

npm ERR! Linux 4.19.104-microsoft-standard
npm ERR! argv "/home/user/.nvm/versions/node/v6.17.1/bin/node" "/home/user/.nvm/versions/node/v6.17.1/bin/npm" "run" "deploy" "---" "-m"
npm ERR! node v6.17.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! gzweb@1.3.0 deploy: ./deploy.sh "-m"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the gzweb@1.3.0 deploy script './deploy.sh "-m"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the gzweb package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ./deploy.sh "-m"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs gzweb
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls gzweb
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/user/gzweb/npm-debug.log

@mis-eu
Copy link

mis-eu commented Oct 12, 2020

@mis-eu Maybe it's an issue with node and npm version too? Could you also try node v6 and npm v3?

thanks for the suggestion @iche033
unfortunately still can not build using:
node v6.17.1, and npm 3.10.10

Build Error log is in comment above linked here #194 (comment)

@mis-eu
Copy link

mis-eu commented Oct 12, 2020

@mis-eu Maybe it's an issue with node and npm version too? Could you also try node v6 and npm v3?

@iche033

npm ERR! Tell the author that this fails on your system:
npm ERR! if [ $npm_config_port ]; then port=$npm_config_port; fi; cd gzbridge && ./server.js $port "package.json"

/home/user/gzweb/npm-debug.log

0 info it worked if it ends with ok
1 verbose cli [ '/home/user/.nvm/versions/node/v6.17.1/bin/node',
1 verbose cli   '/home/user/.nvm/versions/node/v6.17.1/bin/npm',
1 verbose cli   'start',
1 verbose cli   'package.json' ]
2 info using npm@3.10.10
3 info using node@v6.17.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle gzweb@1.3.0~prestart: gzweb@1.3.0
6 silly lifecycle gzweb@1.3.0~prestart: no script for prestart, continuing
7 info lifecycle gzweb@1.3.0~start: gzweb@1.3.0
8 verbose lifecycle gzweb@1.3.0~start: unsafe-perm in lifecycle true
9 verbose lifecycle gzweb@1.3.0~start: PATH: /home/user/.nvm/versions/node/v6.17.1/lib/node_modules/npm/bin/node-gyp-bin:/home/user/gzweb/node_modules/.bin:/home/user/.nvm/versions/node/v6.17.1/bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Python38/Scripts/:/mnt/c/Python38/:/mnt/c/Program Files (x86)/Python36-32/Scripts/:/mnt/c/Program Files (x86)/Python36-32/:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files/Git/cmd:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files/Docker/Docker/resources/bin:/mnt/c/ProgramData/DockerDesktop/version-bin:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/Program Files/nodejs/:/mnt/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Users/user/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/user/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/Users/user/AppData/Roaming/npm:/snap/bin
10 verbose lifecycle gzweb@1.3.0~start: CWD: /home/user/gzweb
11 silly lifecycle gzweb@1.3.0~start: Args: [ '-c',
11 silly lifecycle   'if [ $npm_config_port ]; then port=$npm_config_port; fi; cd gzbridge && ./server.js $port "package.json"' ]
12 silly lifecycle gzweb@1.3.0~start: Returned: code: 1  signal: null
13 info lifecycle gzweb@1.3.0~start: Failed to exec start script
14 verbose stack Error: gzweb@1.3.0 start: `if [ $npm_config_port ]; then port=$npm_config_port; fi; cd gzbridge && ./server.js $port "package.json"`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/home/user/.nvm/versions/node/v6.17.1/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.<anonymous> (/home/user/.nvm/versions/node/v6.17.1/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:920:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
15 verbose pkgid gzweb@1.3.0
16 verbose cwd /home/user/gzweb
17 error Linux 4.19.104-microsoft-standard
18 error argv "/home/user/.nvm/versions/node/v6.17.1/bin/node" "/home/user/.nvm/versions/node/v6.17.1/bin/npm" "start" "package.json"
19 error node v6.17.1
20 error npm  v3.10.10
21 error code ELIFECYCLE
22 error gzweb@1.3.0 start: `if [ $npm_config_port ]; then port=$npm_config_port; fi; cd gzbridge && ./server.js $port "package.json"`
22 error Exit status 1
23 error Failed at the gzweb@1.3.0 start script 'if [ $npm_config_port ]; then port=$npm_config_port; fi; cd gzbridge && ./server.js $port "package.json"'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the gzweb package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     if [ $npm_config_port ]; then port=$npm_config_port; fi; cd gzbridge && ./server.js $port "package.json"
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs gzweb
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls gzweb
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ] 

@iche033
Copy link
Contributor Author

iche033 commented Oct 12, 2020

@mis-eu Is the output and errors from the fix_build_gz11 branch in this PR? It looks like you're on gzweb_1.4.0 branch?

@mis-eu
Copy link

mis-eu commented Oct 13, 2020

@mis-eu Is the output and errors from the fix_build_gz11 branch in this PR? It looks like you're on gzweb_1.4.0 branch?

@iche033 that's right, in fact:

this branch fix_build_gz11 outputs:

> gzweb@**1.4.0** deploy /home/user/gzweb_fix_build_gz11/src/gzweb
> ./deploy.sh "-m" "-t"
Build a local model database.

while branch gzweb_1.4 outputs:

> gzweb@**1.3.0** deploy /home/user/gzweb_1.4/src/gzweb
> ./deploy.sh "-m" "-t"
Build a local model database.

Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
@iche033
Copy link
Contributor Author

iche033 commented Oct 14, 2020

Added CI for gazebo9 on Bionic and gazebo11 on Focal with nodejs versions 8 and 10. Builds are passing.

@mis-eu
Copy link

mis-eu commented Oct 14, 2020

Added CI for gazebo9 on Bionic and gazebo11 on Focal with nodejs versions 8 and 10. Builds are passing.

@iche033 thanks for the updates!
unfortunately, the branch fix_build_gz11 "build" does not pass on Ubuntu Focal/Foxy/Gazebo11
GzWeb GUI is loading, without functionality and without models

Also, I had to apply both fixes in order to build with Node 10.22.1

while building with Node 6.17.11 was deprecated for running Node on Focal

image

@iche033 iche033 mentioned this pull request Oct 27, 2020
Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the CI!

After jumping around some different node versions, I was able to build this branch against Gazebo 9 with v6.17.1 as suggested.

Once these changes get in, I can tag a gzweb_1.4.1 release and update the instructions on http://gazebosim.org/gzweb.html.

That would be great, thanks! 😄

@chapulina
Copy link
Contributor

while building with Node 6.17.11 was deprecated for running Node on Focal

I also tested against Gazebo 11 on Focal and it worked well with Node 6.17.1. (note that it isn't 6.17.11 - this version doesn't exist).


I'm going to merge this PR since it solves the issue for at least some of us, and CI is also happy.

@mis-eu , how about continuing iterating on your problem in a new issue?

@chapulina chapulina merged commit da8f187 into gzweb_1.4 Nov 11, 2020
@chapulina chapulina deleted the fix_build_gz11 branch November 11, 2020 21:33
@iche033
Copy link
Contributor Author

iche033 commented Nov 12, 2020

osrf/gazebo_tutorials#126 updates the gzweb installation instructions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants