To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/onos-dev/13995df3-34ab-4c6e-554c-bd852b1313f3%40gmail.com.
While I can’t answer your question without additional information, I would highly recommend not to build as a privileged user.
Thomas
Hi Thomas, Laszlo
Thank you for the heads up. I followed your advice, using an
unpriviledged user.
While it does seem that I didn't hit the previous issue, I am
getting another error
INFO: Analysed target //:onos (714 packages loaded).
INFO: Found 1 target...
ERROR: /home/cttc/onos/web/gui/BUILD:96:1: Executing
genrule //web/gui:_onos-gui-npm-install failed (Exit 1): bash
failed: error executing command
(cd
/home/cttc/.cache/bazel/_bazel_cttc/2539a2bcd4004d28123e434eca1f9b5a/execroot/org_onosproject_onos
&& \
exec env - \
PATH=/bin:/usr/bin \
/bin/bash -c 'source
external/bazel_tools/tools/genrule/genrule-setup.sh; ROOT=`pwd`
&& export HOME=. && export
XDG_CONFIG_HOME=bazel-out/k8-fastbuild/genfiles/web/gui/config
&& export BABEL_DISABLE_CACHE=1 && if [[ ! -z
${HTTP_PROXY-} ]]; then NPM_ARGS="--proxy $HTTP_PROXY
--without-ssl --insecure"; else NPM_ARGS=""; fi &&
NPM=$ROOT/external/nodejs/bin/npm && mkdir -p tools/gui
&& cd tools/gui && jar xf
../../bazel-out/k8-fastbuild/genfiles/tools/gui/tools-gui-gulp.jar
&& $NPM $NPM_ARGS install --no-cache --loglevel=error
>npm-install.out 2>&1 && find . -name
package.json | while read pjson; do egrep -v '\''/execroot/'\''
$pjson > ptmp; mv ptmp $pjson; done && find
package.json gulpfile.babel.js node_modules gulp-tasks -type f
-exec touch -t 201806280000 {} \; && jar Mcf
$ROOT/bazel-out/k8-fastbuild/genfiles/web/gui/onos-gui-npm-install.jar
package.json gulpfile.babel.js node_modules gulp-tasks')
Use --sandbox_debug to see verbose messages from the
sandbox
Target //:onos failed to build
A web search yielded:
https://groups.google.com/a/onosproject.org/forum/#!topic/onos-dev/2jUh_kNMY_0
I made sure npm is installed, I am not using a proxy, I added .npmrc and .bowerrc as described
Checked:
cttc@P01-C2-MH-145:~/.cache/bazel/_bazel_cttc/2539a2bcd4004d28123e434eca1f9b5a/execroot/org_onosproject_onos$
vi
./bazel-out/k8-fastbuild/genfiles/web/gui2-fw-lib/onos-gui2-npm-install.log
Binary found at
/home/cttc/.cache/bazel/_bazel_cttc/2539a2bcd4004d28123e434eca1f9b5a/sandbox/linux-sandbox/497/execroot/org_onosproject_onos/web/gui2-fw-lib/node_modules/node-sass/vendor/linux-x64-57/binding.node
Testing binary
Binary is fine
> @angular/c...@6.0.8 postinstall
/home/cttc/.cache/bazel/_bazel_cttc/2539a2bcd4004d28123e434eca1f9b5a/sandbox/linux-sandbox/497/execroot/org_onosproject_onos/web/gui2-fw-lib/node_modules/@angular/cli
> node ./bin/ng-update-message.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:
fsev...@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported
platform for fsev...@1.2.4: wanted {"os":"darwin","arch":"any"}
(current: {"os":"linux","arch":"x64"})
added 1319 packages in 82.047s
--
You received this message because you are subscribed to the Google Groups "ONOS Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+u...@onosproject.org.
To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/onos-dev/07f6f679-4d29-c2af-aa02-eef16a58f5ed%40gmail.com.
INFO: Starting clean (this may take a while). Consider using --async if the clean takes more than several minutes.
Starting local Bazel server and connecting to it...
DEBUG: Rule 'build_bazel_rules_nodejs' modified arguments {"commit": "70406e05de721520ca568a17186de73e972d7651", "shallow_since": "1551145517 -0800"} and dropped ["tag"]
INFO: SHA256 (https://github.com/bazelbuild/rules_go/releases/download/0.16.3/rules_go-0.16.3.tar.gz) = b7a62250a3a73277ade0ce306d22f122365b513f5402222403e507f2f997d421
DEBUG: Rule 'io_bazel_rules_go' modified arguments {"sha256": "b7a62250a3a73277ade0ce306d22f122365b513f5402222403e507f2f997d421"}
INFO: SHA256 (https://github.com/bazelbuild/buildtools/archive/db073457c5a56d810e46efc18bb93a4fd7aa7b5e.zip) = e0b5b400cfef17d65886365dc7289cb4ef8dfe07066165607413a271a32aa2a4
DEBUG: Rule 'com_github_bazelbuild_buildtools' modified arguments {"sha256": "e0b5b400cfef17d65886365dc7289cb4ef8dfe07066165607413a271a32aa2a4"}
INFO: Analysed target //:onos (771 packages loaded, 13237 targets configured).
INFO: Found 1 target...
INFO: From Generating Java (Immutable) proto_library @com_github_openconfig_gnmi//:gnmi_proto:
external/com_google_protobuf: warning: directory does not exist.
INFO: From Generating Java (Immutable) proto_library @com_github_openconfig_gnoi//:gnoi_system_proto:
external/com_google_protobuf: warning: directory does not exist.
INFO: From Generating Java (Immutable) proto_library @com_github_openconfig_gnoi//:gnoi_types_proto:
external/com_google_protobuf: warning: directory does not exist.
INFO: From Generating Java (Immutable) proto_library @com_github_openconfig_gnoi//:gnoi_common_proto:
external/com_google_protobuf: warning: directory does not exist.
INFO: From Generating Java (Immutable) proto_library @com_github_p4lang_p4runtime//:p4runtime_proto:
external/com_google_protobuf: warning: directory does not exist.
INFO: From Generating Java (Immutable) proto_library @com_github_p4lang_p4runtime//:p4info_proto:
external/com_google_protobuf: warning: directory does not exist.
ERROR: /home/ankur/onos/web/gui/BUILD:94:1: Executing genrule //web/gui:_onos-gui-npm-install failed (Exit 1) bash failed: error executing command
(cd /home/ankur/.cache/bazel/_bazel_ankur/42ce72a06c8af14269f42b451d721f16/sandbox/linux-sandbox/814/execroot/org_onosproject_onos && \
exec env - \
PATH=/bin:/usr/bin \
/bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; ROOT=`pwd` && export HOME=. && export XDG_CONFIG_HOME=bazel-out/k8-fastbuild/genfiles/web/gui/config && export BABEL_DISABLE_CACHE=1 && if [[ ! -z ${HTTP_PROXY-} ]]; then NPM_ARGS="--proxy $HTTP_PROXY --without-ssl --insecure"; else NPM_ARGS=""; fi && NPM=$ROOT/external/nodejs/bin/npm && mkdir -p tools/gui && cd tools/gui && jar xf ../../bazel-out/k8-fastbuild/genfiles/tools/gui/tools-gui-gulp.jar && $NPM $NPM_ARGS install --no-cache --loglevel=error >npm-install.out 2>&1 && find . -name package.json | while read pjson; do egrep -v '\''/execroot/'\'' $pjson > ptmp; mv ptmp $pjson; done && find package.json gulpfile.babel.js node_modules gulp-tasks -type f -exec touch -t 201806280000 {} \; && jar Mcf $ROOT/bazel-out/k8-fastbuild/genfiles/web/gui/onos-gui-npm-install.jar package.json gulpfile.babel.js node_modules gulp-tasks
')
Execution platform: @bazel_tools//platforms:host_platform
Use --sandbox_debug to see verbose messages from the sandbox: bash failed: error executing command
(cd /home/ankur/.cache/bazel/_bazel_ankur/42ce72a06c8af14269f42b451d721f16/sandbox/linux-sandbox/814/execroot/org_onosproject_onos && \
exec env - \
PATH=/bin:/usr/bin \
/bin/bash -c '
source external/bazel_tools/tools/genrule/genrule-setup.sh; ROOT=`pwd` && export HOME=. && export XDG_CONFIG_HOME=bazel-out/k8-fastbuild/genfiles/web/gui/config && export BABEL_DISABLE_CACHE=1 && if [[ ! -z ${HTTP_PROXY-} ]]; then NPM_ARGS="--proxy $HTTP_PROXY --without-ssl --insecure"; else NPM_ARGS=""; fi && NPM=$ROOT/external/nodejs/bin/npm && mkdir -p tools/gui && cd tools/gui && jar xf ../../bazel-out/k8-fastbuild/genfiles/tools/gui/tools-gui-gulp.jar && $NPM $NPM_ARGS install --no-cache --loglevel=error >npm-install.out 2>&1 && find . -name package.json | while read pjson; do egrep -v '\''/execroot/'\'' $pjson > ptmp; mv ptmp $pjson; done && find package.json gulpfile.babel.js node_modules gulp-tasks -type f -exec touch -t 201806280000 {} \; && jar Mcf $ROOT/bazel-out/k8-fastbuild/genfiles/web/gui/onos-gui-npm-install.jar package.json gulpfile.babel.js node_modules gulp-tasks')
Execution platform: @bazel_tools//platforms:host_platform
Use --sandbox_debug to see verbose messages from the sandbox
Target //:onos failed to build
INFO: Elapsed time: 736.109s, Critical Path: 73.78s
INFO: 816 processes: 813 linux-sandbox, 3 worker.
FAILED: Build did NOT complete successfully
The Bazel build does not use the locally installed npm, it installs it's own version and uses that. The instructions you were referring to are for buck and only apply to version 1.13 and lower.As to your build problem, I can't tell from the output what is happening. Please trybazel clean --expungeand retry the build.
On Mon, Oct 15, 2018 at 11:37 PM Ramon Casellas <ramon....@gmail.com> wrote:
El 15/10/2018 a las 17:48, Thomas Vachuska escribió:
While I can’t answer your question without additional information, I would highly recommend not to build as a privileged user.
Thomas
Hi Thomas, Laszlo
Thank you for the heads up. I followed your advice, using an unpriviledged user.
While it does seem that I didn't hit the previous issue, I am getting another error
INFO: Analysed target //:onos (714 packages loaded).
INFO: Found 1 target...
ERROR: /home/cttc/onos/web/gui/BUILD:96:1: Executing genrule //web/gui:_onos-gui-npm-install failed (Exit 1): bash failed: error executing command
(cd /home/cttc/.cache/bazel/_bazel_cttc/2539a2bcd4004d28123e434eca1f9b5a/execroot/org_onosproject_onos && \
exec env - \
PATH=/bin:/usr/bin \
/bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; ROOT=`pwd` && export HOME=. && export XDG_CONFIG_HOME=bazel-out/k8-fastbuild/genfiles/web/gui/config && export BABEL_DISABLE_CACHE=1 && if [[ ! -z ${HTTP_PROXY-} ]]; then NPM_ARGS="--proxy $HTTP_PROXY --without-ssl --insecure"; else NPM_ARGS=""; fi && NPM=$ROOT/external/nodejs/bin/npm && mkdir -p tools/gui && cd tools/gui && jar xf ../../bazel-out/k8-fastbuild/genfiles/tools/gui/tools-gui-gulp.jar && $NPM $NPM_ARGS install --no-cache --loglevel=error >npm-install.out 2>&1 && find . -name package.json | while read pjson; do egrep -v '\''/execroot/'\'' $pjson > ptmp; mv ptmp $pjson; done && find package.json gulpfile.babel.js node_modules gulp-tasks -type f -exec touch -t 201806280000 {} \; && jar Mcf $ROOT/bazel-out/k8-fastbuild/genfiles/web/gui/onos-gui-npm-install.jar package.json gulpfile.babel.js node_modules gulp-tasks')
Use --sandbox_debug to see verbose messages from the sandbox
Target //:onos failed to build
A web search yielded:
https://groups.google.com/a/onosproject.org/forum/#!topic/onos-dev/2jUh_kNMY_0
I made sure npm is installed, I am not using a proxy, I added .npmrc and .bowerrc as described
Checked: ct...@P01-C2-MH-145:~/.cache/bazel/_bazel_cttc/2539a2bcd4004d28123e434eca1f9b5a/execroot/org_onosproject_onos$ vi ./bazel-out/k8-fastbuild/genfiles/web/gui2-fw-lib/onos-gui2-npm-install.log
Binary found at /home/cttc/.cache/bazel/_bazel_cttc/2539a2bcd4004d28123e434eca1f9b5a/sandbox/linux-sandbox/497/execroot/org_onosproject_onos/web/gui2-fw-lib/node_modules/node-sass/vendor/linux-x64-57/binding.node
Testing binary
Binary is fine
> @angular/c...@6.0.8 postinstall /home/cttc/.cache/bazel/_bazel_cttc/2539a2bcd4004d28123e434eca1f9b5a/sandbox/linux-sandbox/497/execroot/org_onosproject_onos/web/gui2-fw-lib/node_modules/@angular/cli
> node ./bin/ng-update-message.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsev...@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsev...@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
added 1319 packages in 82.047s
Any further advice is appreciated
R.
--
You received this message because you are subscribed to the Google Groups "ONOS Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onos...@onosproject.org.
To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+u...@onosproject.org.
To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/onos-dev/025e1d72-3f82-4614-82ca-eecffb0e8cbe%40onosproject.org.
The program 'npm' is currently not installed. You can install it by typing:
sudo apt install npm
Starting local Bazel server and connecting to it...
INFO: Analysed target //web/gui:_onos-gui-npm-install (5 packages loaded, 34 targets configured).
INFO: Found 1 target...
ERROR: /home/ankur/onos/web/gui/BUILD:94:1: Executing genrule //web/gui:_onos-gui-npm-install failed (Exit 1) linux-sandbox failed: error executing command
(cd /home/ankur/.cache/bazel/_bazel_ankur/42ce72a06c8af14269f42b451d721f16/sandbox/linux-sandbox/1/execroot/org_onosproject_onos && \
exec env - \
PATH=/bin:/usr/bin \
TMPDIR=/tmp \
/home/ankur/.cache/bazel/_bazel_ankur/install/6f98dd1afced7c8dc211ce7a461c786c/_embedded_binaries/linux-sandbox -t 15 -w /home/ankur/.cache/bazel/_bazel_ankur/42ce72a06c8af14269f42b451d721f16/sandbox/linux-sandbox/1/execroot/org_onosproject_onos -w /tmp -w /dev/shm -D -- /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; ROOT=`pwd` && export HOME=. && export XDG_CONFIG_HOME=bazel-out/k8-fastbuild/genfiles/web/gui/config && export BABEL_DISABLE_CACHE=1 && if [[ ! -z ${HTTP_PROXY-} ]]; then NPM_ARGS="--proxy $HTTP_PROXY --without-ssl --insecure"; else NPM_ARGS=""; fi && NPM=$ROOT/external/nodejs/bin/npm && mkdir -p tools/gui && cd tools/gui && jar xf ../../bazel-out/k8-fastbuild/genfiles/tools/gui/tools-gui-gulp.jar && $NPM $NPM_ARGS install --no-cache --loglevel=error >npm-install.out 2>&1 && find . -name package.json | while read pjson; do egrep -v '\''/execroot/'\'' $pjson > ptmp; mv ptmp $pjson; done && find package.json gulpfile.babel.js node_modules gulp-tasks -type f -exec touch -t 201806280000 {} \; && jar Mcf $ROOT/bazel-out/k8-fastbuild/genfiles/web/gui/onos-gui-npm-install.jar package.json gulpfile.babel.js node_modules gulp-tasks'): linux-sandbox failed: error executing command
(cd /home/ankur/.cache/bazel/_bazel_ankur/42ce72a06c8af14269f42b451d721f16/sandbox/linux-sandbox/1/execroot/org_onosproject_onos && \
exec env - \
PATH=/bin:/usr/bin \
TMPDIR=/tmp \
/home/ankur/.cache/bazel/_bazel_ankur/install/6f98dd1afced7c8dc211ce7a461c786c/_embedded_binaries/linux-sandbox -t 15 -w /home/ankur/.cache/bazel/_bazel_ankur/42ce72a06c8af14269f42b451d721f16/sandbox/linux-sandbox/1/execroot/org_onosproject_onos -w /tmp -w /dev/shm -D -- /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; ROOT=`pwd` && export HOME=. && export XDG_CONFIG_HOME=bazel-out/k8-fastbuild/genfiles/web/gui/config && export BABEL_DISABLE_CACHE=1 && if [[ ! -z ${HTTP_PROXY-} ]]; then NPM_ARGS="--proxy $HTTP_PROXY --without-ssl --insecure"; else NPM_ARGS=""; fi && NPM=$ROOT/external/nodejs/bin/npm && mkdir -p tools/gui && cd tools/gui && jar xf ../../bazel-out/k8-fastbuild/genfiles/tools/gui/tools-gui-gulp.jar && $NPM $NPM_ARGS install --no-cache --loglevel=error >npm-install.out 2>&1 && find . -name package.json | while read pjson; do egrep -v '\''/execroot/'\'' $pjson > ptmp; mv ptmp $pjson; done && find package.json gulpfile.babel.js node_modules gulp-tasks -type f -exec touch -t 201806280000 {} \; && jar Mcf $ROOT/bazel-out/k8-fastbuild/genfiles/web/gui/onos-gui-npm-install.jar package.json gulpfile.babel.js node_modules gulp-tasks')
src/main/tools/linux-sandbox.cc:154: linux-sandbox-pid1 has PID 32372
src/main/tools/linux-sandbox-pid1.cc:175: working dir: /home/ankur/.cache/bazel/_bazel_ankur/42ce72a06c8af14269f42b451d721f16/sandbox/linux-sandbox/1/execroot/org_onosproject_onos
src/main/tools/linux-sandbox-pid1.cc:194: writable: /home/ankur/.cache/bazel/_bazel_ankur/42ce72a06c8af14269f42b451d721f16/sandbox/linux-sandbox/1/execroot/org_onosproject_onos
src/main/tools/linux-sandbox-pid1.cc:194: writable: /tmp
src/main/tools/linux-sandbox-pid1.cc:194: writable: /dev/shm
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /dev
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /dev/pts
src/main/tools/linux-sandbox-pid1.cc:265: remount rw: /dev/shm
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /dev/hugepages
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /dev/mqueue
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /run
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /run/lock
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /run/user/0
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/kernel/security
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/fs/cgroup
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/fs/cgroup/systemd
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/fs/cgroup/net_cls,net_prio
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/fs/cgroup/blkio
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/fs/cgroup/cpu,cpuacct
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/fs/cgroup/perf_event
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/fs/cgroup/memory
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/fs/cgroup/pids
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/fs/cgroup/hugetlb
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/fs/cgroup/freezer
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/fs/cgroup/devices
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/fs/cgroup/cpuset
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/fs/pstore
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/kernel/debug
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/fs/fuse/connections
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /proc
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /proc/sys/fs/binfmt_misc
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /var/lib/lxcfs
src/main/tools/linux-sandbox-pid1.cc:265: remount rw: /home/ankur/.cache/bazel/_bazel_ankur/42ce72a06c8af14269f42b451d721f16/sandbox/linux-sandbox/1/execroot/org_onosproject_onos
src/main/tools/linux-sandbox-pid1.cc:265: remount rw: /home/ankur/.cache/bazel/_bazel_ankur/42ce72a06c8af14269f42b451d721f16/sandbox/linux-sandbox/1/execroot/org_onosproject_onos
src/main/tools/linux-sandbox-pid1.cc:265: remount rw: /tmp
src/main/tools/linux-sandbox-pid1.cc:265: remount rw: /dev/shm
src/main/tools/process-tools.cc:118: sigaction(32, &sa, nullptr) failed
src/main/tools/process-tools.cc:118: sigaction(33, &sa, nullptr) failed
src/main/tools/linux-sandbox-pid1.cc:437: waitpid returned 2
src/main/tools/linux-sandbox-pid1.cc:457: child exited with code 1
src/main/tools/linux-sandbox.cc:204: child exited normally with exitcode 1
Target //web/gui:_onos-gui-npm-install failed to build
INFO: Elapsed time: 83.522s, Critical Path: 70.93s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
--
You received this message because you are subscribed to the Google Groups "ONOS Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+u...@onosproject.org.
To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/onos-dev/b83fac79-407f-4728-a34d-e946d88bbf7c%40onosproject.org.
AnkurI cannot reproduce the problem you are seeing here, but you could use the method I follow for getting to the bottom of these kind of errors.1) In a separate terminal window cd in to the folder/home/ankur/.cache/bazel/_bazel_ankur/42ce72a06c8af14269f42b451d721f16/sandbox/linux-sandbox/1/execroot/org_onosproject_onos2) Take the command (from above) and break it up in to individual commands to see which one is broken. Rather than "jar -xf" use "ls" to see if the jar file was extractedROOT=`pwd`
export HOME=.
export XDG_CONFIG_HOME=bazel-out/k8-fastbuild/genfiles/web/gui/config
export BABEL_DISABLE_CACHE=1
if [[ ! -z ${HTTP_PROXY-} ]]; then NPM_ARGS="--proxy $HTTP_PROXY --without-ssl --insecure"; else NPM_ARGS=""; fi
NPM=$ROOT/external/nodejs/bin/npm
mkdir -p tools/gui
cd tools/gui
jar xf ../../bazel-out/k8-fastbuild/genfiles/tools/gui/tools-gui-gulp.jar
$NPM $NPM_ARGS install --no-cache --loglevel=error >npm-install.out 2>&1
find . -name package.json | while read pjson; do egrep -v '\''/execroot/'\'' $pjson > ptmp; mv ptmp $pjson; done
find package.json gulpfile.babel.js node_modules gulp-tasks -type f -exec touch -t 201806280000 {} \;
jar Mcf $ROOT/bazel-out/k8-fastbuild/genfiles/web/gui/onos-gui-npm-install.jar package.json gulpfile.babel.js node_modules gulp-tasks'If you want more information on it - this command is generated by thehttps://github.com/opennetworkinglab/onos/blob/master/web/gui/BUILD genrule _onos-gui-npm-install
To unsubscribe from this group and stop receiving emails from it, send an email to onos...@onosproject.org.
To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/onos-dev/b83fac79-407f-4728-a34d-e946d88bbf7c%40onosproject.org.
Folks,
I also got a build failed in the //web/gui:_onos-gui-npm-install phase, when building master branch on CentOS 7 recently and reason was not obvious at start. I had followed steps at https://wiki.onosproject.org/display/ONOS/Developer+Quick+Start but //web/gui:_onos-gui-npm-install phase failed. See reference [1] below for logs with "--verbose_failures --sandbox_debug" added.
I then followed the troubleshooting steps suggested by Sean Condon earlier in this thread; and realised it was npm that was failing, and when I looked at the npm-install.out there was an error saying :
bzip2: Cannot exec: No such file or directory tar (child): Error is not recoverable: exiting now
After installing "bzip2" it worked fine.
I have updated the above wiki regarding bzip2
So I am sending this e-mail in case it saves someone else a few headaches !
Regards,
Kieran
Reference [1]
bazel build //web/gui:_onos-gui-npm-install --verbose_failures --sandbox_debug
Starting local Bazel server and connecting to it...
INFO: Analyzed target //web/gui:_onos-gui-npm-install (5 packages loaded, 35 targets configured).
INFO: Found 1 target...
ERROR: /root/kieran/onos/web/gui/BUILD:94:1: Executing genrule //web/gui:_onos-gui-npm-install failed (Exit 1) process-wrapper failed: error executing command
(cd /root/.cache/bazel/_bazel_root/8243756b584a9ad919bdf59ee1a6f315/sandbox/processwrapper-sandbox/2/execroot/org_onosproject_onos && \
exec env - \
PATH=/bin:/usr/bin \
TMPDIR=/tmp \
/root/.cache/bazel/_bazel_root/install/157630649b08e7b4de5a16dc302dcbd4/_embedded_binaries/process-wrapper '--timeout=0' '--kill_delay=15' /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; ROOT=`pwd` && export HOME=. && export XDG_CONFIG_HOME=bazel-out/k8-fastbuild/bin/web/gui/config && export BABEL_DISABLE_CACHE=1 && if [[ ! -z ${HTTP_PROXY-} ]]; then NPM_ARGS="--proxy $HTTP_PROXY --without-ssl --insecure"; else NPM_ARGS=""; fi && NPM=$ROOT/external/nodejs/bin/npm && mkdir -p tools/gui && cd tools/gui && jar xf ../../bazel-out/k8-fastbuild/bin/tools/gui/tools-gui-gulp.jar && $NPM $NPM_ARGS install --no-cache --loglevel=error >npm-install.out 2>&1 && find . -name package.json | while read pjson; do egrep -v '\''/execroot/'\'' $pjson > ptmp; mv ptmp $pjson; done && find package.json gulpfile.babel.js node_modules gulp-tasks -type f -exec touch -t 201806280000 {} \; && jar Mcf $ROOT/bazel-out/k8-fastbuild/bin/web/gui/onos-gui-npm-install.jar package.json gulpfile.babel.js node_modules gulp-tasks'): process-wrapper failed: error executing command
(cd /root/.cache/bazel/_bazel_root/8243756b584a9ad919bdf59ee1a6f315/sandbox/processwrapper-sandbox/2/execroot/org_onosproject_onos && \
exec env - \
PATH=/bin:/usr/bin \
TMPDIR=/tmp \
/root/.cache/bazel/_bazel_root/install/157630649b08e7b4de5a16dc302dcbd4/_embedded_binaries/process-wrapper '--timeout=0' '--kill_delay=15' /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; ROOT=`pwd` && export HOME=. && export XDG_CONFIG_HOME=bazel-out/k8-fastbuild/bin/web/gui/config && export BABEL_DISABLE_CACHE=1 && if [[ ! -z ${HTTP_PROXY-} ]]; then NPM_ARGS="--proxy $HTTP_PROXY --without-ssl --insecure"; else NPM_ARGS=""; fi && NPM=$ROOT/external/nodejs/bin/npm && mkdir -p tools/gui && cd tools/gui && jar xf ../../bazel-out/k8-fastbuild/bin/tools/gui/tools-gui-gulp.jar && $NPM $NPM_ARGS install --no-cache --loglevel=error >npm-install.out 2>&1 && find . -name package.json | while read pjson; do egrep -v '\''/execroot/'\'' $pjson > ptmp; mv ptmp $pjson; done && find package.json gulpfile.babel.js node_modules gulp-tasks -type f -exec touch -t 201806280000 {} \; && jar Mcf $ROOT/bazel-out/k8-fastbuild/bin/web/gui/onos-gui-npm-install.jar package.json gulpfile.babel.js node_modules gulp-tasks')
Target //web/gui:_onos-gui-npm-install failed to build
INFO: Elapsed time: 32.604s, Critical Path: 21.29s
INFO: 1 process: 1 processwrapper-sandbox.
FAILED: Build did NOT complete successfully
Reference [2]
cat npm-install.out
> phantomjs...@2.1.16 install /root/.cache/bazel/_bazel_root/8243756b584a9ad919bdf59ee1a6f315/sandbox/processwrapper-sandbox/2/execroot/org_onosproject_onos/tools/gui/node_modules/karma-phantomjs-launcher/node_modules/phantomjs-prebuilt
> node install.js
PhantomJS not found on PATH
Download already available at /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Verified checksum of previously downloaded file
Extracting tar contents (via spawned process)
Error extracting archive
Phantom installation failed { Error: Command failed: tar jxf /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
tar (child): bzip2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
at ChildProcess.exithandler (child_process.js:275:12)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Socket.stream.socket.on (internal/child_process.js:346:11)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at Pipe._handle.close [as _onclose] (net.js:567:12)
killed: false,
code: 2,
signal: null,
// SNIP
ERROR: /home/stack/Devesh/onos/web/gui2-fw-lib/BUILD:168:1: NodeJS npm install //web/gui2-fw-lib:onos-gui2-fw-npm-install failed (Exit 1) linux-sandbox failed: error executing command
(cd /home/stack/.cache/bazel/_bazel_stack/8768f012864786bba03af85ab03e2f26/sandbox/linux-sandbox/21/execroot/org_onosproject_onos && \
exec env - \
PATH=/bin:/usr/bin \
TMPDIR=/tmp \
/home/stack/.cache/bazel/_bazel_stack/install/6d3fb10895e05e30e7c0d70ff072919e/_embedded_binaries/linux-sandbox -t 15 -w /home/stack/.cache/bazel/_bazel_stack/8768f012864786bba03af85ab03e2f26/sandbox/linux-sandbox/21/execroot/org_onosproject_onos -w /tmp -w /dev/shm -D -- /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; ROOT=`pwd` && export HOME=. && export XDG_CONFIG_HOME=bazel-out/k8-fastbuild/bin/web/gui2-fw-lib/config && export BABEL_DISABLE_CACHE=1 && if [[ ! -z ${HTTP_PROXY-} ]]; then NPM_ARGS="--proxy $HTTP_PROXY --without-ssl --insecure"; else NPM_ARGS=""; fi && NPM=external/nodejs/bin/npm && export PATH=$ROOT/$(dirname ${NPM}):$PATH && npm -v > $ROOT/bazel-out/k8-fastbuild/bin/web/gui2-fw-lib/onos-gui2-npm-install.log 2>&1 && cd web/gui2-fw-lib && npm $NPM_ARGS install --no-cache >> $ROOT/bazel-out/k8-fastbuild/bin/web/gui2-fw-lib/onos-gui2-npm-install.log 2>&1 && jar Mcf $ROOT/bazel-out/k8-fastbuild/bin/web/gui2-fw-lib/onos-gui2-npm-install.jar node_modules && touch $ROOT/bazel-out/k8-fastbuild/bin/web/gui2-fw-lib/onos-gui2-npm-install.log'): linux-sandbox failed: error executing command
(cd /home/stack/.cache/bazel/_bazel_stack/8768f012864786bba03af85ab03e2f26/sandbox/linux-sandbox/21/execroot/org_onosproject_onos && \
exec env - \
PATH=/bin:/usr/bin \
TMPDIR=/tmp \
/home/stack/.cache/bazel/_bazel_stack/install/6d3fb10895e05e30e7c0d70ff072919e/_embedded_binaries/linux-sandbox -t 15 -w /home/stack/.cache/bazel/_bazel_stack/8768f012864786bba03af85ab03e2f26/sandbox/linux-sandbox/21/execroot/org_onosproject_onos -w /tmp -w /dev/shm -D -- /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; ROOT=`pwd` && export HOME=. && export XDG_CONFIG_HOME=bazel-out/k8-fastbuild/bin/web/gui2-fw-lib/config && export BABEL_DISABLE_CACHE=1 && if [[ ! -z ${HTTP_PROXY-} ]]; then NPM_ARGS="--proxy $HTTP_PROXY --without-ssl --insecure"; else NPM_ARGS=""; fi && NPM=external/nodejs/bin/npm && export PATH=$ROOT/$(dirname ${NPM}):$PATH && npm -v > $ROOT/bazel-out/k8-fastbuild/bin/web/gui2-fw-lib/onos-gui2-npm-install.log 2>&1 && cd web/gui2-fw-lib && npm $NPM_ARGS install --no-cache >> $ROOT/bazel-out/k8-fastbuild/bin/web/gui2-fw-lib/onos-gui2-npm-install.log 2>&1 && jar Mcf $ROOT/bazel-out/k8-fastbuild/bin/web/gui2-fw-lib/onos-gui2-npm-install.jar node_modules && touch $ROOT/bazel-out/k8-fastbuild/bin/web/gui2-fw-lib/onos-gui2-npm-install.log')
src/main/tools/linux-sandbox.cc:154: linux-sandbox-pid1 has PID 2136
src/main/tools/linux-sandbox-pid1.cc:175: working dir: /home/stack/.cache/bazel/_bazel_stack/8768f012864786bba03af85ab03e2f26/sandbox/linux-sandbox/21/execroot/org_onosproject_onos
src/main/tools/linux-sandbox-pid1.cc:194: writable: /home/stack/.cache/bazel/_bazel_stack/8768f012864786bba03af85ab03e2f26/sandbox/linux-sandbox/21/execroot/org_onosproject_onos
--
You received this message because you are subscribed to the Google Groups "ONOS Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+u...@onosproject.org.
To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/onos-dev/65da2a20-2d32-43bb-9c28-87313eb82121%40onosproject.org.
--
You received this message because you are subscribed to the Google Groups "ONOS Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+u...@onosproject.org.
To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/onos-dev/0236b65c-4a81-4af3-ad83-e6b8ef6cb903%40onosproject.org.
--
You received this message because you are subscribed to the Google Groups "ONOS Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+u...@onosproject.org.
To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/onos-dev/d9d0b756-3fd5-4d08-8499-90a59922ea7d%40onosproject.org.
--
You received this message because you are subscribed to the Google Groups "ONOS Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+u...@onosproject.org.
To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/onos-dev/b0453c08-2e98-4bb4-8eaf-9da93d3fee77%40onosproject.org.
--
You received this message because you are subscribed to the Google Groups "ONOS Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+u...@onosproject.org.
To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/onos-dev/43a164b7-13c7-42e0-b8bd-318638a8aa8d%40onosproject.org.
To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+u...@onosproject.org.
To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/onos-dev/a32582c3-fb87-4030-bed5-2af8fadaf083%40onosproject.org.
Hi AnkurI'm surprised you're still having problems with this.There was a message a couple of weeks ago about some error on web/gui building.Kieran found that bzip2 was required for the install.Also see the message from Devesh atHe did "bazel clean --expunge" and after that the build worked.
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/onos-dev/a32582c3-fb87-4030-bed5-2af8fadaf083%40onosproject.org.