-
Notifications
You must be signed in to change notification settings - Fork 7.3k
node 0.6.7 and CentOS 5.x #2484
Comments
I could bring node 0.6.7 to compile and run nodejs.org's home page script with python 2.4.3 and CentOS 5.7. Tomorrow I will try other scripts I have written. Warning: Awful hack below, I am NOT a programmer. It seems to be that the problem in compiling lies in calls to glibc. According to http://lists.ofono.org/pipermail/ofono/2009-August/000339.html, ..."SOCK_NONBLOCK and SOCK_CLOEXEC are only available on kernel >= 2.6.28 & glibc >= 2.9"...
|
I've committed a patch to that effect in 472a72d.
Can you try the patch below? diff --git a/deps/uv/src/unix/internal.h b/deps/uv/src/unix/internal.h
index 1adb5f2..3ae5d05 100644
--- a/deps/uv/src/unix/internal.h
+++ b/deps/uv/src/unix/internal.h
@@ -59,6 +59,18 @@
# define HAVE_SYS_ACCEPT4 1
# endif
+# ifndef O_CLOEXEC
+# define O_CLOEXEC 02000000
+# endif
+
+# ifndef SOCK_CLOEXEC
+# define SOCK_CLOEXEC O_CLOEXEC
+# endif
+
+# ifndef SOCK_NONBLOCK
+# define SOCK_NONBLOCK O_NONBLOCK
+# endif
+
# if HAVE_SYS_UTIMESAT
inline static int sys_utimesat(int dirfd,
const char* path, |
Hey, thanks for this!. I will be trying your patch in the next hours when I find a moment. |
|
Python again. For tomorrow: How do I test it? I don't mean using non-standard python path, or virtualenv. I mean, waf does not seem to be dependent on python 2.5.x (is it?), and I did a quick scan in the documentation from node but I could not find any relevant place where python 2.5.+ is needed. Is there some library or function, that can only be served by Python 2.5.+, so I can script against it? Maybe I am asking the obvious... |
We're not actively <2.5 incompatible, it's that we don't guarantee that the build scripts work with older versions of python. There are only so many configurations you can reasonably test and python 2.5 to 2.7 covers about 97% of the market. That figure is made up but you get my point. |
Detail: You can imagine I installed and reinstalled and cleaned things up many times. npm (which now comes with node): 3 directories remain after node uninstall. Is this intentional? Shouldn't "make uninstall" "know" if npm was installed by itself and if, remove npm and its manually installed modules? I am going to close this issue. Thank you very much bnoordhuis; I own you a beer. I hope both patches make it into node 0.6.8. If you need me to test something / whatever, let me know. |
@isaacs: Is that a bug or a safeguard?
Yep, they will. |
Great, Thanks. |
I was able to finally get it to install by using the CentOS repo here: |
@bnoordhuis: I can say that node.js 0.6.8 can be built from source and runs without any obvious problems with different modules under CentOS 5.7. Python 2.4.3 was used. Thanks for pushing the patch(es). |
Hi. By definition, node 0.6.7 cannot be built on CentOS 5.x since node requires python >= 2.5.2, CentOS 5.x comes with Python 2.4.3. There may be (I think there are) other problems. CentOS 6.2 works. Is there a chance of adding an argument to configure like --with-python=/path/to/non-standard/python or other arguments, so it works with CentOS 5.x? Below the error message I receive after starting make, in a virgin CentOS 5.7, node 0.6.7. Thanks.
src/unix/core.c: In function uv__accept:
src/unix/core.c:739: error: SOCK_NONBLOCK undeclared (first use in this function)
src/unix/core.c:739: error: (Each undeclared identifier is reported only once
src/unix/core.c:739: error: for each function it appears in.)
src/unix/core.c:739: error: âSOCK_CLOEXECâ undeclared (first use in this function)
make[1]: *** [src/unix/core.o] Error 1
make[1]: Leaving directory
/opt/node-v0.6.7/out/Release/deps/uv' Waf: Leaving directory
/opt/node-v0.6.7/out'Build failed: -> task failed (err #2):
{task: uv uv.h -> uv.a}
make: *** [program] Error 1
The text was updated successfully, but these errors were encountered: