make broken on older red hat (node v0.6.5) #2319

Closed
nemophrost opened this Issue Dec 12, 2011 · 13 comments

Projects

None yet

3 participants

@nemophrost

I get the following errors when after running configure and make:

node/out/Release/obj.target/uv/deps/uv/src/unix/core.o
../deps/uv/src/unix/core.c: In function ‘uv_timer_start’:
../deps/uv/src/unix/core.c:559: warning: dereferencing type-punned pointer will break strict-aliasing rules
../deps/uv/src/unix/core.c: In function ‘uv__accept’:
../deps/uv/src/unix/core.c:739: error: ‘SOCK_NONBLOCK’ undeclared (first use in this function)
../deps/uv/src/unix/core.c:739: error: (Each undeclared identifier is reported only once
../deps/uv/src/unix/core.c:739: error: for each function it appears in.)
../deps/uv/src/unix/core.c:739: error: ‘SOCK_CLOEXEC’ undeclared (first use in this function)

This is running on Red Hat 4.1.2.
Doing some googling around it looks like the errors could be due to an old version of glibc (2.5 in this case)

I downloaded node v0.6.0 and it makes just fine.

@bnoordhuis
Node.js Foundation member

Can you try the master branch of joyent/libuv?

rm -rf deps/uv \
  && git clone https://github.com/joyent/libuv.git deps/uv \
  && make distclean \
  && ./configure \
  && make
@nemophrost

Same errors

@bnoordhuis
Node.js Foundation member

That can't be, the code that is failing to build for you doesn't exist in libuv's master branch. Can you post the build log?

@nemophrost

me@example.com [~/bar/git/node]# make
make -C out BUILDTYPE=Release
make[1]: Entering directory /foo/bar/git/node/out'
CC(target) /foo/bar/git/node/out/Release/obj.target/http_parser/deps/http_parser/http_parser.o
AR(target) /foo/bar/git/node/out/Release/obj.target/deps/http_parser/libhttp_parser.a
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/uv-common.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_cancel.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares__close_sockets.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_data.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_destroy.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_expand_name.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_expand_string.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_fds.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_free_hostent.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_free_string.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_gethostbyaddr.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_gethostbyname.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares__get_hostent.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_getnameinfo.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_getopt.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_getsock.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_init.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_library_init.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_llist.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_mkquery.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_nowarn.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_options.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_parse_aaaa_reply.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_parse_a_reply.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_parse_mx_reply.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_parse_ns_reply.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_parse_ptr_reply.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_parse_srv_reply.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_parse_txt_reply.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_process.o
../deps/uv/src/ares/ares_process.c: In function ‘read_udp_packets’:
../deps/uv/src/ares/ares_process.c:481: warning: pointer targets in passing argument 6 of ‘recvfrom’ differ in signedness
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_query.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares__read_line.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_search.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_send.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_strcasecmp.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_strdup.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_strerror.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_timeout.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares__timeval.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_version.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/ares_writev.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/bitncmp.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/inet_net_pton.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/inet_ntop.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/ares/windows_port.o
CC(target) /foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/unix/core.o
../deps/uv/src/unix/core.c: In function ‘uv_timer_start’:
../deps/uv/src/unix/core.c:559: warning: dereferencing type-punned pointer will break strict-aliasing rules
../deps/uv/src/unix/core.c: In function ‘uv__accept’:
../deps/uv/src/unix/core.c:739: error: ‘SOCK_NONBLOCK’ undeclared (first use in this function)
../deps/uv/src/unix/core.c:739: error: (Each undeclared identifier is reported only once
../deps/uv/src/unix/core.c:739: error: for each function it appears in.)
../deps/uv/src/unix/core.c:739: error: ‘SOCK_CLOEXEC’ undeclared (first use in this function)
make[1]: *** [/foo/bar/git/node/out/Release/obj.target/uv/deps/uv/src/unix/core.o] Error 1
make[1]: Leaving directory
/foo/bar/git/node/out'
make: *** [all] Error 2

@bnoordhuis
Node.js Foundation member

Okay, there are two things here:

  1. Use the v0.6 branch or the v0.6.5 tag of joyent/node, master is undergoing extensive reconstruction.

  2. Replace the bundled libuv with the master branch from joyent/libuv.

Right now, you're compiling the master branch of node with the bundled version of libuv, which is a number of commits behind the joyent/libuv master.

@nemophrost

So I downloaded 0.6.5 from http://nodejs.org/dist/v0.6.5/node-v0.6.5.tar.gz and replaced libuv as you suggested, so now I don't get the first error, but the get the rest as follows:

me@example [~/downloads/node-v0.6.5]# make
Waf: Entering directory /foo/bar/downloads/node-v0.6.5/out'
DEST_OS: linux
DEST_CPU: x64
Parallel Jobs: 1
Product type: program
[ 4/35] uv: deps/uv/include/uv.h -> out/Release/deps/uv/uv.a
make[1]: Entering directory
/foo/bar/downloads/node-v0.6.5/out/Release/deps/uv'
rm -f src/ares/.o
rm -f src/unix/ev/
.o
rm -f src/unix/eio/.o
rm -f src/unix/
.o
rm -rf test/run-tests.dSYM run-benchmarks.dSYM
rm -f -f src/.o *.a test/run-tests test/run-benchmarks
make[1]: Leaving directory /foo/bar/downloads/node-v0.6.5/out/Release/deps/uv'
make[1]: Entering directory
/foo/bar/downloads/node-v0.6.5/out/Release/deps/uv'
/usr/bin/gcc --std=c89 -pedantic -Wall -Wextra -Wno-unused-parameter -D_GNU_SOURCE -Iinclude -Iinclude/uv-private -Isrc/unix/ev -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Isrc/ares/config_linux -Isrc -g -c src/unix/core.c -o src/unix/core.o
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 /foo/bar/downloads/node-v0.6.5/out/Release/deps/uv'
Waf: Leaving directory
/foo/bar/downloads/node-v0.6.5/out'
Build failed: -> task failed (err #2):
{task: uv uv.h -> uv.a}
make: *** [program] Error 1

@bnoordhuis
Node.js Foundation member

You're still compiling the old version of libuv (joyent/libuv@0db3274) but you need joyent/libuv@d5b2615.

@nemophrost

I got the latest code again and checked against the changes in the commit from joyent/libuv@d5b2615 and they are all there. I get the same errors when I make though.

@bnoordhuis
Node.js Foundation member

Sorry, this got lost in the noise. Do you still have trouble compiling?

@nemophrost nemophrost closed this Dec 31, 2011
@nemophrost nemophrost reopened this Dec 31, 2011
@nemophrost

Thanks for following up. I downloaded 0.6.6 and it compiles just fine. Thanks!

@nemophrost nemophrost closed this Dec 31, 2011
@nielsm

It's broken again in 0.6.7. Do we still need to use the un-bundled version of libuv?

@bnoordhuis
Node.js Foundation member

@nielsm: Please see here.

@nielsm

That worked for me. Thanks!

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