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

Doesn't build on Centos 5.5 / node 0.4.8 / npm 1.0.6 #1

Closed
JulesAU opened this issue Sep 6, 2011 · 2 comments
Closed

Doesn't build on Centos 5.5 / node 0.4.8 / npm 1.0.6 #1

JulesAU opened this issue Sep 6, 2011 · 2 comments
Labels

Comments

@JulesAU
Copy link

JulesAU commented Sep 6, 2011

Trying to install via npm:
$] npm install deflate

deflate@1.0.1 install nodejs/director/node_modules/deflate
./build.sh

Setting srcdir to : nodejs/director/node_modules/deflate
Setting blddir to : nodejs/director/node_modules/deflate/build
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /home/jules
Checking for library z : yes
'configure' finished successfully (0.525s)
Waf: Entering directory nodejs/director/node_modules/deflate/build' [1/2] cxx: src/deflate.cc -> build/default/src/deflate_1.o ../src/deflate.cc:591:2: warning: no newline at end of file ../src/deflate.cc: In static member function ‘static v8::Handle<v8::Value> Flater::SetInput(const v8::Arguments&)’: ../src/deflate.cc:218: error: ‘realloc’ was not declared in this scope ../src/deflate.cc:231: error: ‘malloc’ was not declared in this scope ../src/deflate.cc: In static member function ‘static v8::Handle<v8::Value> Flater::GetOutput(const v8::Arguments&)’: ../src/deflate.cc:339: error: ‘free’ was not declared in this scope ../src/deflate.cc: In function ‘v8::Handle<v8::Value> OnePassDeflate(const v8::Arguments&)’: ../src/deflate.cc:439: error: ‘malloc’ was not declared in this scope ../src/deflate.cc:460: error: ‘free’ was not declared in this scope ../src/deflate.cc: In function ‘v8::Handle<v8::Value> OnePassInflate(const v8::Arguments&)’: ../src/deflate.cc:531: error: ‘malloc’ was not declared in this scope ../src/deflate.cc:546: error: ‘realloc’ was not declared in this scope ../src/deflate.cc:568: error: ‘free’ was not declared in this scope Waf: Leaving directorynodejs/director/node_modules/deflate/build'
Build failed: -> task failed (err #1):
{task: cxx deflate.cc -> deflate_1.o}
npm ERR! error installing deflate@1.0.1 Error: deflate@1.0.1 install: ./build.sh
npm ERR! error installing deflate@1.0.1 sh "-c" "./build.sh" failed with 1
npm ERR! error installing deflate@1.0.1 at ChildProcess. (/home/jules/lib/node_modules/npm/lib/utils/exec.js:49:20)
npm ERR! error installing deflate@1.0.1 at ChildProcess.emit (events.js:67:17)
npm ERR! error installing deflate@1.0.1 at ChildProcess.onexit (child_process.js:192:12)
npm ERR! deflate@1.0.1 install: ./build.sh
npm ERR! sh "-c" "./build.sh" failed with 1
npm ERR!
npm ERR! Failed at the deflate@1.0.1 install script.
npm ERR! This is most likely a problem with the deflate package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ./build.sh
npm ERR! You can get their info via:
npm ERR! npm owner ls deflate
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Linux 2.6.18-194.32.1.el5
npm ERR! command "node" "/home/jules/bin/npm" "install" "deflate"
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! nodejs/director/npm-debug.log
npm not ok

@nornagon
Copy link

nornagon commented Sep 7, 2011

I have the same issue with ubuntu.

Here's a patch:

diff --git a/src/deflate.cc b/src/deflate.cc
index a18240e..ba6dcad 100644
--- a/src/deflate.cc
+++ b/src/deflate.cc
@@ -24,6 +24,7 @@
 #include <string.h>
 
 #include <stdio.h>
+#include <stdlib.h>
 
 using namespace v8;
 using namespace node;

@jahewson
Copy link
Owner

jahewson commented Sep 7, 2011

Thanks @nornagon, I'll push out 1.0.2 with this in.

@jahewson jahewson closed this as completed Sep 7, 2011
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants