Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Can't update NPM and compile addons #2868

Closed
vodolaz095 opened this Issue Oct 9, 2012 · 4 comments

Comments

Projects
None yet
3 participants

gcc version 4.7.2 20120921 (Red Hat 4.7.2-2) (GCC)

[nap@vodolaz095 ~]$ cat /etc/issue
Fedora release 17 (Beefy Miracle)

[nap@vodolaz095 ~]$ uname -a
Linux vodolaz095 3.5.5-2.fc17.x86_64 #1 SMP Wed Oct 3 13:20:37 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

[nap@vodolaz095 ~]$ npm update
npm http GET https://registry.npmjs.org/socket.io
npm http 304 https://registry.npmjs.org/socket.io
npm http GET https://registry.npmjs.org/socket.io-client/0.9.10
npm http GET https://registry.npmjs.org/policyfile/0.0.4
npm http GET https://registry.npmjs.org/redis/0.7.2
npm http 304 https://registry.npmjs.org/socket.io-client/0.9.10
npm http GET https://registry.npmjs.org/uglify-js/1.2.5
npm http GET https://registry.npmjs.org/xmlhttprequest/1.4.2
npm http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http GET https://registry.npmjs.org/ws
npm http 304 https://registry.npmjs.org/redis/0.7.2
npm http GET https://registry.npmjs.org/hiredis
npm http 304 https://registry.npmjs.org/policyfile/0.0.4
npm http 304 https://registry.npmjs.org/ws
npm http 304 https://registry.npmjs.org/hiredis
npm http GET https://registry.npmjs.org/tinycolor
npm http GET https://registry.npmjs.org/options
npm http GET https://registry.npmjs.org/commander
npm http 304 https://registry.npmjs.org/uglify-js/1.2.5
npm http 304 https://registry.npmjs.org/xmlhttprequest/1.4.2
npm http 304 https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http GET https://registry.npmjs.org/zeparser/0.0.5
npm http 304 https://registry.npmjs.org/tinycolor
npm http 304 https://registry.npmjs.org/commander
npm http 304 https://registry.npmjs.org/options
npm http 304 https://registry.npmjs.org/zeparser/0.0.5
npm http GET https://registry.npmjs.org/hiredis/0.1.14
npm http 200 https://registry.npmjs.org/hiredis/0.1.14
npm http GET https://registry.npmjs.org/hiredis/-/hiredis-0.1.14.tgz

hiredis@0.1.14 preinstall /home/nap/node_modules/socket.io/node_modules/redis/node_modules/hiredis
make || gmake

cd deps/hiredis && make static
make[1]: Entering directory /home/nap/node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis' cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb hiredis.c cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb sds.c cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb async.c ar rcs libhiredis.a net.o hiredis.o sds.o async.o make[1]: Leaving directory/home/nap/node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis'
node-waf configure build
Setting srcdir to : /home/nap/node_modules/socket.io/node_modules/redis/node_modules/hiredis
Setting blddir to : /home/nap/node_modules/socket.io/node_modules/redis/node_modules/hiredis/build
Checking for program g++ or c++ : not found
Checking for program icpc : not found
Checking for program c++ : not found
/home/nap/node_modules/socket.io/node_modules/redis/node_modules/hiredis/wscript:5: error: could not configure a cxx compiler!
make: *** [all] Error 1
cd deps/hiredis && gmake static
gmake[1]: Entering directory /home/nap/node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis' gmake[1]: Nothing to be done forstatic'.
gmake[1]: Leaving directory `/home/nap/node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis'
node-waf configure build
Setting srcdir to : /home/nap/node_modules/socket.io/node_modules/redis/node_modules/hiredis
Setting blddir to : /home/nap/node_modules/socket.io/node_modules/redis/node_modules/hiredis/build
Checking for program g++ or c++ : not found
Checking for program icpc : not found
Checking for program c++ : not found
/home/nap/node_modules/socket.io/node_modules/redis/node_modules/hiredis/wscript:5: error: could not configure a cxx compiler!
gmake: *** [all] Error 1
npm WARN optional dependency failed, continuing hiredis@0.1.14

npm ERR! TypeError: Cannot call method 'reduce' of undefined
npm ERR! at treeify (/usr/lib/nodejs/npm/lib/install.js:346:29)
npm ERR! at cb (/usr/lib/nodejs/npm/lib/install.js:81:16)
npm ERR! at cb (/usr/lib/nodejs/npm/lib/install.js:381:40)
npm ERR! at cb (/usr/lib/nodejs/slide/lib/async-map.js:48:11)
npm ERR! at /usr/lib/nodejs/npm/lib/install.js:602:5
npm ERR! at /usr/lib/nodejs/npm/lib/install.js:673:24
npm ERR! at /usr/lib/nodejs/slide/lib/chain.js:16:22
npm ERR! at /usr/lib/nodejs/npm/lib/install.js:828:14
npm ERR! at cb (/usr/lib/nodejs/slide/lib/async-map.js:48:11)
npm ERR! at LOOP (/usr/lib/nodejs/slide/lib/chain.js:7:26)
npm ERR! You may report this log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! npm-@googlegroups.com
npm ERR!
npm ERR! System Linux 3.5.5-2.fc17.x86_64
npm ERR! command "nodejs" "/bin/npm" "update"
npm ERR! cwd /home/nap
npm ERR! node -v v0.6.18
npm ERR! npm -v 1.1.19
npm ERR! type non_object_property_call
npm ERR! arguments [ 'reduce', undefined ]
npm ERR! message Cannot call method 'reduce' of undefined
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/nap/npm-debug.log
npm not ok

after installing various c++ and g++ compilers

[nap@vodolaz095 ~]$ npm install socket.io --ws:verbose
npm http GET https://registry.npmjs.org/socket.io
npm http 304 https://registry.npmjs.org/socket.io
npm http GET https://registry.npmjs.org/socket.io-client/0.9.10
npm http GET https://registry.npmjs.org/policyfile/0.0.4
npm http GET https://registry.npmjs.org/redis/0.7.2
npm http 304 https://registry.npmjs.org/policyfile/0.0.4
npm http 304 https://registry.npmjs.org/socket.io-client/0.9.10
npm http 304 https://registry.npmjs.org/redis/0.7.2
npm http GET https://registry.npmjs.org/hiredis
npm http GET https://registry.npmjs.org/uglify-js/1.2.5
npm http GET https://registry.npmjs.org/ws
npm http GET https://registry.npmjs.org/xmlhttprequest/1.4.2
npm http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http 304 https://registry.npmjs.org/hiredis

hiredis@0.1.14 preinstall /home/nap/node_modules/socket.io/node_modules/redis/node_modules/hiredis
make || gmake

cd deps/hiredis && make static
make[1]: Entering directory /home/nap/node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis' cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb hiredis.c npm http 304 https://registry.npmjs.org/xmlhttprequest/1.4.2 npm http 304 https://registry.npmjs.org/ws npm http 304 https://registry.npmjs.org/uglify-js/1.2.5 npm http 304 https://registry.npmjs.org/active-x-obfuscator/0.0.1 npm http GET https://registry.npmjs.org/zeparser/0.0.5 npm http GET https://registry.npmjs.org/tinycolor npm http GET https://registry.npmjs.org/options npm http GET https://registry.npmjs.org/commander cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb sds.c cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb async.c ar rcs libhiredis.a net.o hiredis.o sds.o async.o make[1]: Leaving directory/home/nap/node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis'
node-waf configure build
Setting srcdir to : /home/nap/node_modules/socket.io/node_modules/redis/node_modules/hiredis
Setting blddir to : /home/nap/node_modules/socket.io/node_modules/redis/node_modules/hiredis/build
Checking for program g++ or c++ : /bin/g++
Checking for program cpp : /bin/cpp
Checking for program ar : /bin/ar
Checking for program ranlib : /bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /usr
'configure' finished successfully (0.028s)
Waf: Entering directory /home/nap/node_modules/socket.io/node_modules/redis/node_modules/hiredis/build' [1/3] cxx: hiredis.cc -> build/Release/hiredis_1.o [2/3] cxx: reader.cc -> build/Release/reader_1.o npm http 304 https://registry.npmjs.org/zeparser/0.0.5 [3/3] cxx_link: build/Release/hiredis_1.o build/Release/reader_1.o -> build/Release/hiredis.node Waf: Leaving directory/home/nap/node_modules/socket.io/node_modules/redis/node_modules/hiredis/build'
'build' finished successfully (0.338s)
npm http 304 https://registry.npmjs.org/commander
npm http 304 https://registry.npmjs.org/options
npm http 304 https://registry.npmjs.org/tinycolor

ws@0.4.22 install /home/nap/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
node install.js

[ws v0.4.22] Attempting to compile blazing fast native extensions.
info it worked if it ends with ok
info downloading: http://nodejs.org/dist/v0.6.18/node-v0.6.18.tar.gz
ERR! Error: EXDEV, link '/usr/lib/nodejs/node-gyp/legacy/tools/gyp/buildbot/buildbot_run.pyc'
ERR! not ok
[ws v0.4.22] Native code compile failed (but the module will still work):
[ws v0.4.22] The native extensions are faster, but not required.
[ws v0.4.22] On Windows, native extensions require Visual Studio and Python.
[ws v0.4.22] On Unix, native extensions require Python, make and a C++ compiler.
[ws v0.4.22] Start npm with --ws:verbose to show compilation output (if any).
socket.io@0.9.10 ./node_modules/socket.io
├── policyfile@0.0.4
├── redis@0.7.2 (hiredis@0.1.14)
└── socket.io-client@0.9.10 (xmlhttprequest@1.4.2, uglify-js@1.2.5, active-x-obfuscator@0.0.1, ws@0.4.22)
[nap@vodolaz095 ~]$

I had a similar error running on Fedora 16. I solved it by reinstalling node.js with:
sudo yum localinstall --nogpgcheck http://nodejs.tchol.org/repocfg/fedora/nodejs-stable-release.noarch.rpm
sudo yum install nodejs nodejs-devel nodejs-waf nodejs-doc nodejs-debuginfo

I guess its probably related with nodejs-waf package.

Contributor

ralt commented Apr 19, 2013

I think this version is pretty old since node-waf isn't used anymore.

it works on recent version 0.10.4
please, close issue

@vodolaz095 vodolaz095 closed this Apr 22, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment