Skip to content
This repository has been archived by the owner on Jan 27, 2019. It is now read-only.

Error executing action run on resource 'bash[compile node.js (on 8 cpu)]' #14

Closed
tomschlick opened this issue May 3, 2013 · 1 comment

Comments

@tomschlick
Copy link

This is on 12.10. Its happened the same way on 3 different machines.

Here is the relevant dump: (FYI I removed a bunch of similar lines in the areas indicated because the text was too large for github to post an issue)


Recipe: nodejs::install_from_source
  * package[libssl-dev] action install (up to date)
  * remote_file[/usr/local/src/node-v0.10.2.tar.gz] action create_if_missing
    - copy file downloaded from [] into /usr/local/src/node-v0.10.2.tar.gz
        (file sizes exceed 10000000 bytes, diff output suppressed)
    - change mode from '' to '0644'

  * execute[tar --no-same-owner -zxf node-v0.10.2.tar.gz] action run
    - execute tar --no-same-owner -zxf node-v0.10.2.tar.gz

  * bash[compile node.js (on 8 cpu)] action run
================================================================================
Error executing action `run` on resource 'bash[compile node.js (on 8 cpu)]'
================================================================================


Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '2'
---- Begin output of "bash"  "/tmp/chef-script20130503-20241-1ttfn22" ----
STDOUT: { 'target_defaults': { 'cflags': [],
                       'default_configuration': 'Release',
                       'defines': [],
                       'include_dirs': [],
                       'libraries': []},
  'variables': { 'clang': 0,
                 'gcc_version': 47,
                 'host_arch': 'x64',
                 'node_install_npm': 'true',
                 'node_prefix': '/usr/local',
                 'node_shared_cares': 'false',
                 'node_shared_http_parser': 'false',
                 'node_shared_libuv': 'false',
                 'node_shared_openssl': 'false',
                 'node_shared_v8': 'false',
                 'node_shared_zlib': 'false',
                 'node_tag': '',
                 'node_unsafe_optimizations': 0,
                 'node_use_dtrace': 'false',
                 'node_use_etw': 'false',
                 'node_use_openssl': 'true',
                 'node_use_perfctr': 'false',
                 'node_use_systemtap': 'false',
                 'python': '/usr/bin/python',
                 'target_arch': 'x64',
                 'v8_enable_gdbjit': 0,
                 'v8_no_strict_aliasing': 1,
                 'v8_use_snapshot': 'true'}}
creating  ./config.gypi
creating  ./config.mk
make -C out BUILDTYPE=Release V=1
make[1]: Entering directory `/usr/local/src/node-v0.10.2/out'
  cc '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_GNU_SOURCE' '-DHAVE_CONFIG_H' '-DCARES_STATICLIB' -I../deps/cares/include -I../deps/cares/src -I../deps/cares/config/linux  -Wall -Wextra -Wno-unused-parameter -pthread -m64 -g --std=gnu89 -pedantic -Wall -Wextra -Wno-unused-parameter -O2 -fno-strict-aliasing -fno-tree-vrp  -MMD -MF /usr/local/src/node-v0.10.2/out/Release/.deps//usr/local/src/node-v0.10.2/out/Release/obj.target/cares/deps/cares/src/ares_cancel.o.d.raw  -c -o /usr/local/src/node-v0.10.2/out/Release/obj.target/cares/deps/cares/src/ares_cancel.o ../deps/cares/src/ares_cancel.c


******* REMOVED A BUNCH OF SIMILAR LINES TO THE ONE ABOVE BECAUSE GITHUB DOENST LIKE AN ISSUE BODY THAT IS THAT BIG ********


make[1]: Leaving directory `/usr/local/src/node-v0.10.2/out'
STDERR: ../deps/cares/src/ares_options.c: In function 'ares_set_servers_csv':
../deps/cares/src/ares_options.c:187:9: warning: ignoring return value of 'strtol', declared with attribute warn_unused_result [-Wunused-result]
../deps/cares/src/ares_process.c: In function 'read_udp_packets':
../deps/cares/src/ares_process.c:481:35: warning: pointer targets in passing argument 6 of 'recvfrom' differ in signedness [-Wpointer-sign]
In file included from /usr/include/x86_64-linux-gnu/sys/socket.h:251:0,
                 from ../deps/cares/src/ares_process.c:21:
/usr/include/x86_64-linux-gnu/bits/socket2.h:65:1: note: expected 'socklen_t * __restrict__' but argument is of type 'ares_socklen_t *'
../deps/uv/src/unix/core.c:69:1: warning: ISO C forbids zero-size array 'static_assert_failed' [-pedantic]
../deps/uv/src/unix/core.c:70:1: warning: ISO C forbids zero-size array 'static_assert_failed' [-pedantic]
../deps/uv/src/unix/core.c:72:1: warning: ISO C forbids zero-size array 'static_assert_failed' [-pedantic]
../deps/uv/src/unix/core.c:74:1: warning: ISO C forbids zero-size array 'static_assert_failed' [-pedantic]
../deps/uv/src/unix/core.c:74:1: warning: ISO C90 forbids array 'static_assert_failed' whose size can't be evaluated [-Wvla]
../deps/uv/src/unix/core.c:76:1: warning: ISO C forbids zero-size array 'static_assert_failed' [-pedantic]
../deps/uv/src/unix/core.c:76:1: warning: ISO C90 forbids array 'static_assert_failed' whose size can't be evaluated [-Wvla]
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
make[1]: *** [/usr/local/src/node-v0.10.2/out/Release/obj.target/v8_base/deps/v8/src/hydrogen.o] Error 4
make[1]: *** Waiting for unfinished jobs....
make: *** [node] Error 2
---- End output of "bash"  "/tmp/chef-script20130503-20241-1ttfn22" ----
Ran "bash"  "/tmp/chef-script20130503-20241-1ttfn22" returned 2


Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/nodejs/recipes/install_from_source.rb

 52: bash "compile node.js (on #{node['nodejs']['make_threads']} cpu)" do
 53:   # OSX doesn't have the attribute so arbitrarily default 2
 54:   cwd "/usr/local/src/node-v#{node['nodejs']['version']}"
 55:   code <<-EOH
 56:     PATH="/usr/local/bin:$PATH"
 57:     ./configure --prefix=#{node['nodejs']['dir']} && \
 58:     make -j #{node['nodejs']['make_threads']}
 59:   EOH
 60:   creates "/usr/local/src/node-v#{node['nodejs']['version']}/node"
 61: end
 62:
 63: execute "nodejs make install" do
 64:   environment({"PATH" => "/usr/local/bin:/usr/bin:/bin:$PATH"})
 65:   command "make install"
 66:   cwd "/usr/local/src/node-v#{node['nodejs']['version']}"
 67:   not_if {File.exists?("#{node['nodejs']['dir']}/bin/node") && `#{node['nodejs']['dir']}/bin/node --version`.chomp == "v#{node['nodejs']['version']}" }
 68: end



Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/nodejs/recipes/install_from_source.rb:52:in `from_file'

bash("compile node.js (on 8 cpu)") do
  action "run"
  retries 0
  retry_delay 2
  command "\"bash\"  \"/tmp/chef-script20130503-20241-1ttfn22\""
  backup 5
  creates "/usr/local/src/node-v0.10.2/node"
  cwd "/usr/local/src/node-v0.10.2"
  returns 0
  code "    PATH=\"/usr/local/bin:$PATH\"\n    ./configure --prefix=/usr/local &&     make -j 8\n"
  interpreter "bash"
  cookbook_name "nodejs"
  recipe_name "install_from_source"
end



[2013-05-03T19:07:20+00:00] ERROR: Running exception handlers
[2013-05-03T19:07:20+00:00] FATAL: Saving node information to /var/chef/cache/failed-run-data.json
[2013-05-03T19:07:20+00:00] ERROR: Exception handlers complete
Chef Client failed. 20 resources updated
[2013-05-03T19:07:20+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2013-05-03T19:07:20+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: bash[compile node.js (on 8 cpu)] (nodejs::install_from_source line 52) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '2'
---- Begin output of "bash"  "/tmp/chef-script20130503-20241-1ttfn22" ----
STDOUT: { 'target_defaults': { 'cflags': [],
                       'default_configuration': 'Release',
                       'defines': [],
                       'include_dirs': [],
                       'libraries': []},
  'variables': { 'clang': 0,
                 'gcc_version': 47,
                 'host_arch': 'x64',
                 'node_install_npm': 'true',
                 'node_prefix': '/usr/local',
                 'node_shared_cares': 'false',
                 'node_shared_http_parser': 'false',
                 'node_shared_libuv': 'false',
                 'node_shared_openssl': 'false',
                 'node_shared_v8': 'false',
                 'node_shared_zlib': 'false',
                 'node_tag': '',
                 'node_unsafe_optimizations': 0,
                 'node_use_dtrace': 'false',
                 'node_use_etw': 'false',
                 'node_use_openssl': 'true',
                 'node_use_perfctr': 'false',
                 'node_use_systemtap': 'false',
                 'python': '/usr/bin/python',
                 'target_arch': 'x64',
                 'v8_enable_gdbjit': 0,
                 'v8_no_strict_aliasing': 1,
                 'v8_use_snapshot': 'true'}}
creating  ./config.gypi
creating  ./config.mk
make -C out BUILDTYPE=Release V=1
make[1]: Entering directory `/usr/local/src/node-v0.10.2/out'
  cc '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_GNU_SOURCE' '-DHAVE_CONFIG_H' '-DCARES_STATICLIB' -I../deps/cares/include -I../deps/cares/src -I../deps/cares/config/linux  -Wall -Wextra -Wno-unused-parameter -pthread -m64 -g --std=gnu89 -pedantic -Wall -Wextra -Wno-unused-parameter -O2 -fno-strict-aliasing -fno-tree-vrp  -MMD -MF /usr/local/src/node-v0.10.2/out/Release/.deps//usr/local/src/node-v0.10.2/out/Release/obj.target/cares/deps/cares/src/ares_cancel.o.d.raw  -c -o /usr/local/src/node-v0.10.2/out/Release/obj.target/cares/deps/cares/src/ares_cancel.o ../deps/cares/src/ares_cancel.c

  ******* REMOVED A BUNCH OF SIMILAR LINES TO THE ONE ABOVE BECAUSE GITHUB DOENST LIKE AN ISSUE BODY THAT IS THAT BIG ********


make[1]: Leaving directory `/usr/local/src/node-v0.10.2/out'
STDERR: ../deps/cares/src/ares_options.c: In function 'ares_set_servers_csv':
../deps/cares/src/ares_options.c:187:9: warning: ignoring return value of 'strtol', declared with attribute warn_unused_result [-Wunused-result]
../deps/cares/src/ares_process.c: In function 'read_udp_packets':
../deps/cares/src/ares_process.c:481:35: warning: pointer targets in passing argument 6 of 'recvfrom' differ in signedness [-Wpointer-sign]
In file included from /usr/include/x86_64-linux-gnu/sys/socket.h:251:0,
                 from ../deps/cares/src/ares_process.c:21:
/usr/include/x86_64-linux-gnu/bits/socket2.h:65:1: note: expected 'socklen_t * __restrict__' but argument is of type 'ares_socklen_t *'
../deps/uv/src/unix/core.c:69:1: warning: ISO C forbids zero-size array 'static_assert_failed' [-pedantic]
../deps/uv/src/unix/core.c:70:1: warning: ISO C forbids zero-size array 'static_assert_failed' [-pedantic]
../deps/uv/src/unix/core.c:72:1: warning: ISO C forbids zero-size array 'static_assert_failed' [-pedantic]
../deps/uv/src/unix/core.c:74:1: warning: ISO C forbids zero-size array 'static_assert_failed' [-pedantic]
../deps/uv/src/unix/core.c:74:1: warning: ISO C90 forbids array 'static_assert_failed' whose size can't be evaluated [-Wvla]
../deps/uv/src/unix/core.c:76:1: warning: ISO C forbids zero-size array 'static_assert_failed' [-pedantic]
../deps/uv/src/unix/core.c:76:1: warning: ISO C90 forbids array 'static_assert_failed' whose size can't be evaluated [-Wvla]
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
make[1]: *** [/usr/local/src/node-v0.10.2/out/Release/obj.target/v8_base/deps/v8/src/hydrogen.o] Error 4
make[1]: *** Waiting for unfinished jobs....
make: *** [node] Error 2
---- End output of "bash"  "/tmp/chef-script20130503-20241-1ttfn22" ----
Ran "bash"  "/tmp/chef-script20130503-20241-1ttfn22" returned 2

@hectcastro
Copy link
Owner

This appears to be a failure in compiling Node.js v0.10.2 on Ubuntu 12.10. I was able to reproduce your error on Ubuntu 12.10, although it did not occur on Ubuntu 12.04.

To get around this error, I overwrote the version and checksum attributes of the Node.js cookbook (in a Chef role, or something similar) so that it installs version v0.10.5. If you need to use v0.10.2, I recommend opening an issue on the Node.js cookbook [0].

Example of the attribute overrides in a Chef role:

default_attributes(
  "nodejs" => {
    "version" => "0.10.5",
    "checksum" => "1c22bd15cb13b1109610ee256699300ec6999b335f3bc85dc3c0312ec9312cfd",
    "checksum_linux_x64" => "182b0992401ff04a288b5777e2892f14d912a509a6c15edc7c0daded3a20d3c7",
    "checksum_linux_x86" => "c8bb5e5be76b837115a6f581ac5719586da51a8168ead2c0f8e13d9977ab06bb"
  }
)

[0] https://github.com/mdxp/nodejs-cookbook

GUI pushed a commit to NREL-cookbooks/nodejs that referenced this issue Nov 3, 2013
…rror on Ubuntu 12.10)

Added version number and sha256 checksums for nodejs `0.10.6`. Fixes build issue on Ubuntu `12.10`, see hectcastro/chef-statsd#14 (comment)
fredrick pushed a commit to Dwolla/chef-statsd that referenced this issue Jul 21, 2014
Correct whisper_dir attribute references
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants