Closed Gozala closed 13 years ago
Same error here on Lion (10.7.1) when building the master branch (24dabec039a83b52ebe1d8ff971caceda26b948e)
Can you guys post the output of mdfind ev.h
? I suspect that you have libev headers somewhere on your include path (probably in /usr/include) that override the bundled libev.
s060833t:node.git tommy$ mdfind ev.h
/Users/tommy/Code/node.git/out/Release/deps/uv/uv.gyp
/Users/tommy/Code/node.git/build/default/deps/uv/include/ev.h
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/ev.h
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/ev.h
/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/ev.h
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/ev.h
/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/ev.h
/Users/tommy/Code/node.git/out/Release/deps/uv/include/uv-private/ev.h
/System/Library/Frameworks/Tk.framework/Versions/8.5/Resources/Documentation/Reference/Tk/TkLib/RestrictEv.htm
/usr/local/include/node/ev.h
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/include/sys/ev.h
/Users/tommy/Code/node.git/out/Release/deps/uv/include/ev.h
/Developer/SDKs/MacOSX10.6.sdk/usr/include/sys/ev.h
/Developer/SDKs/MacOSX10.7.sdk/usr/include/sys/ev.h
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/usr/include/sys/ev.h
/usr/include/sys/ev.h
/Users/tommy/Code/node.git/deps/uv/include/uv-private/ev.h
/Users/tommy/Code/node.git/out/Release/deps/uv/src/unix/ev/Makefile.in
/Users/tommy/Code/node.git/out/Release/deps/uv/src/unix/ev/Makefile.am
/Users/tommy/Code/node.git/out/Release/deps/uv/src/unix/ev/event.h
/Users/tommy/Code/node.git/out/Release/deps/uv/src/unix/ev/ev.pod
/Users/tommy/Code/node.git/out/Release/deps/uv/src/unix/ev/ev.c
/Users/tommy/Code/node.git/out/Release/deps/uv/src/unix/ev/ev.3
/Users/tommy/Code/node.git/out/Release/deps/uv/src/unix/ev/ev++.h
/Users/tommy/Code/node.git/out/Release/deps/uv/src/unix/ev/configure.ac
/Users/tommy/Code/node.git/out/Release/deps/uv/src/unix/ev/Changes
/Users/tommy/Code/node.git/out/Release/deps/uv/src/unix/eio/eio.3
/Users/tommy/Code/node.git/out/Release/deps/uv/include/uv-private/uv-unix.h
/Users/tommy/Code/node.git/src/node_timer.h
/Users/tommy/Code/node.git/src/node_stat_watcher.h
/Users/tommy/Code/node.git/src/node_signal_watcher.h
/Users/tommy/Code/node.git/src/node_io_watcher.h
/Users/tommy/Code/node.git/src/node_child_process.h
/Users/tommy/Code/node.git/deps/uv/uv.gyp
/Users/tommy/Code/node.git/deps/uv/src/unix/ev/event.h
/Users/tommy/Code/node.git/deps/uv/src/unix/ev/ev.pod
/Users/tommy/Code/node.git/deps/uv/src/unix/ev/ev.c
/Users/tommy/Code/node.git/deps/uv/src/unix/ev/ev.3
/Users/tommy/Code/node.git/deps/uv/src/unix/ev/ev++.h
/Users/tommy/Code/node.git/deps/uv/src/unix/ev/configure.ac
/Users/tommy/Code/node.git/deps/uv/src/unix/ev/Makefile.in
/Users/tommy/Code/node.git/deps/uv/src/unix/ev/Makefile.am
/Users/tommy/Code/node.git/deps/uv/src/unix/ev/Changes
/Users/tommy/Code/node.git/deps/uv/src/unix/eio/eio.3
/Users/tommy/Code/node.git/deps/uv/include/uv-private/uv-unix.h
/opt/local/var/macports/sources/rsync.macports.org/release/ports/devel/nodejs/Portfile
/opt/local/var/macports/sources/rsync.macports.org/release/ports/devel/nodejs-devel/Portfile
/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/socketvar.h
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/socketvar.h
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/usr/include/sys/socketvar.h
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/usr/include/sys/pipe.h
/Developer/SDKs/MacOSX10.7.sdk/usr/include/sys/socketvar.h
/Developer/SDKs/MacOSX10.7.sdk/usr/include/sys/pipe.h
/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/socketvar.h
/Developer/SDKs/MacOSX10.6.sdk/usr/include/sys/socketvar.h
/Developer/SDKs/MacOSX10.6.sdk/usr/include/sys/pipe.h
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/socketvar.h
/Users/tommy/Code/node.git/out/Release/deps/uv/src/ev/Makefile.in
/Users/tommy/Code/node.git/out/Release/deps/uv/src/ev/Makefile.am
/Users/tommy/Code/node.git/out/Release/deps/uv/src/ev/event.h
/Users/tommy/Code/node.git/out/Release/deps/uv/src/ev/ev.pod
/Users/tommy/Code/node.git/out/Release/deps/uv/src/ev/ev.c
/Users/tommy/Code/node.git/out/Release/deps/uv/src/ev/ev.3
/Users/tommy/Code/node.git/out/Release/deps/uv/src/ev/ev++.h
/Users/tommy/Code/node.git/out/Release/deps/uv/src/ev/configure.ac
/Users/tommy/Code/node.git/out/Release/deps/uv/src/ev/Changes
/Users/tommy/Code/node.git/out/Release/deps/uv/src/eio/eio.3
/Users/tommy/Code/node.git/out/Release/deps/uv/include/uv-unix.h
/Users/tommy/Code/node.git/build/default/deps/uv/src/ev/Makefile.in
/Users/tommy/Code/node.git/build/default/deps/uv/src/ev/Makefile.am
/Users/tommy/Code/node.git/build/default/deps/uv/src/ev/event.h
/Users/tommy/Code/node.git/build/default/deps/uv/src/ev/ev.pod
/Users/tommy/Code/node.git/build/default/deps/uv/src/ev/ev.c
/Users/tommy/Code/node.git/build/default/deps/uv/src/ev/ev.3
/Users/tommy/Code/node.git/build/default/deps/uv/src/ev/ev++.h
/Users/tommy/Code/node.git/build/default/deps/uv/src/ev/configure.ac
/Users/tommy/Code/node.git/build/default/deps/uv/src/ev/Changes
/Users/tommy/Code/node.git/build/default/deps/uv/src/eio/eio.3
/Users/tommy/Code/node.git/build/default/deps/uv/include/uv-unix.h
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/socketvar.h
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/include/sys/socketvar.h
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/include/sys/pipe.h
/Users/tommy/Code/nginx/src/os/unix/ngx_process_cycle.c
/Users/tommy/Code/node.git/doc/api/addons.markdown
➜ node (v0.5.9) mdfind ev.h ✱
/Users/gozala/Projects/node/out/Release/deps/uv/src/unix/ev/Makefile.in
/Users/gozala/Projects/node/out/Release/deps/uv/src/unix/ev/Makefile.am
/usr/local/include/node/uv-private/ev.h
/Users/gozala/Projects/node/out/Release/deps/uv/include/uv-private/ev.h
/Users/gozala/Projects/node/deps/uv/include/uv-private/ev.h
/Users/gozala/Projects/node/out/Release/deps/uv/src/unix/ev/event.h
/Users/gozala/Projects/node/out/Release/deps/uv/src/unix/ev/ev.pod
/Users/gozala/Projects/node/out/Release/deps/uv/src/unix/ev/ev.c
/Users/gozala/Projects/node/out/Release/deps/uv/src/unix/ev/ev.3
/Users/gozala/Projects/node/out/Release/deps/uv/src/unix/ev/ev++.h
/Users/gozala/Projects/node/out/Release/deps/uv/src/unix/ev/configure.ac
/Users/gozala/Projects/node/out/Release/deps/uv/src/unix/ev/Changes
/Users/gozala/Projects/node/out/Release/deps/uv/src/unix/eio/eio.3
/Users/gozala/Projects/node/out/Release/deps/uv/include/uv-private/uv-unix.h
/Users/gozala/Projects/node/deps/uv/uv.gyp
/Users/gozala/Projects/node/deps/uv/src/unix/ev/ev.c
/Users/gozala/Projects/node/deps/uv/include/uv-private/uv-unix.h
/Users/gozala/Projects/node/src/node_timer.h
/Users/gozala/Projects/node/src/node_stat_watcher.h
/Users/gozala/Projects/node/src/node_signal_watcher.h
/Users/gozala/Projects/node/src/node_io_watcher.h
/Users/gozala/Projects/node/src/node_child_process.h
/Users/gozala/Projects/node/deps/uv/src/unix/ev/event.h
/Users/gozala/Projects/node/deps/uv/src/unix/ev/ev.pod
/Users/gozala/Projects/node/deps/uv/src/unix/ev/ev.3
/Users/gozala/Projects/node/deps/uv/src/unix/ev/ev++.h
/Users/gozala/Projects/node/deps/uv/src/unix/ev/configure.ac
/Users/gozala/Projects/node/deps/uv/src/unix/ev/Makefile.in
/Users/gozala/Projects/node/deps/uv/src/unix/ev/Makefile.am
/Users/gozala/Projects/node/deps/uv/src/unix/ev/Changes
/Users/gozala/Projects/node/deps/uv/src/unix/eio/eio.3
/Users/gozala/Library/Mail/V2/IMAP-rfobic@imap.gmail.com/[Gmail].mbox/Important.mbox/4AB82385-F876-471A-A330-8BD75600D50A/Data/8/5/Messages/58958.emlx
/Users/gozala/Projects/node/build/default/deps/uv/ev/ev.h
/Library/Frameworks/Tk.framework/Versions/8.5/Resources/Documentation/Reference/Tk/TkLib/RestrictEv.htm
/usr/local/include/node/ev/ev.h
/System/Library/Frameworks/Tk.framework/Versions/8.5/Resources/Documentation/Reference/Tk/TkLib/RestrictEv.htm
/Developer/SDKs/MacOSX10.6.sdk/usr/include/sys/ev.h
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/ev.h
/Developer/SDKs/MacOSX10.7.sdk/usr/include/sys/ev.h
/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/ev.h
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/include/sys/ev.h
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/ev.h
/usr/include/sys/ev.h
/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/ev.h
/usr/local/include/node/ev.h
/Users/gozala/Projects/node/build/default/deps/uv/include/ev.h
/Users/gozala/Projects/node/out/Release/deps/uv/include/ev.h
/Users/gozala/Projects/node/out/Release/deps/uv/src/ev/Makefile.in
/Users/gozala/Projects/node/out/Release/deps/uv/src/ev/Makefile.am
/Users/gozala/Projects/node/out/Release/deps/uv/src/ev/event.h
/Users/gozala/Projects/node/out/Release/deps/uv/src/ev/ev.pod
/Users/gozala/Projects/node/out/Release/deps/uv/src/ev/ev.c
/Users/gozala/Projects/node/out/Release/deps/uv/src/ev/ev.3
/Users/gozala/Projects/node/out/Release/deps/uv/src/ev/ev++.h
/Users/gozala/Projects/node/out/Release/deps/uv/src/ev/configure.ac
/Users/gozala/Projects/node/out/Release/deps/uv/src/ev/Changes
/Users/gozala/Projects/node/out/Release/deps/uv/src/eio/eio.3
/Users/gozala/Projects/node/out/Release/deps/uv/include/uv-unix.h
/Users/gozala/Library/Mail/V2/IMAP-rfobic@imap.gmail.com/[Gmail].mbox/Important.mbox/4AB82385-F876-471A-A330-8BD75600D50A/Data/8/5/Messages/58950.emlx
/Users/gozala/Projects/node/build/default/deps/uv/src/ev/Makefile.in
/Users/gozala/Projects/node/build/default/deps/uv/src/ev/Makefile.am
/Users/gozala/Projects/node/build/default/deps/uv/src/ev/event.h
/Users/gozala/Projects/node/build/default/deps/uv/src/ev/ev.pod
/Users/gozala/Projects/node/build/default/deps/uv/src/ev/ev.c
/Users/gozala/Projects/node/build/default/deps/uv/src/ev/ev.3
/Users/gozala/Projects/node/build/default/deps/uv/src/ev/ev++.h
/Users/gozala/Projects/node/build/default/deps/uv/src/ev/configure.ac
/Users/gozala/Projects/node/build/default/deps/uv/src/ev/Changes
/Users/gozala/Projects/node/build/default/deps/uv/src/eio/eio.3
/Users/gozala/Projects/node/build/default/deps/uv/include/uv-unix.h
/Users/gozala/Projects/node/build/default/deps/uv/all.gyp
/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/socketvar.h
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/socketvar.h
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/include/sys/socketvar.h
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/include/sys/pipe.h
/Developer/SDKs/MacOSX10.7.sdk/usr/include/sys/socketvar.h
/Developer/SDKs/MacOSX10.7.sdk/usr/include/sys/pipe.h
/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/socketvar.h
/Developer/SDKs/MacOSX10.6.sdk/usr/include/sys/socketvar.h
/Developer/SDKs/MacOSX10.6.sdk/usr/include/sys/pipe.h
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/socketvar.h
/Users/gozala/Projects/node/build/default/deps/uv/ev/Makefile
/Users/gozala/Projects/node/build/default/deps/uv/uv-unix.h
/Users/gozala/Projects/node/build/default/deps/uv/ev/Makefile.in
/Users/gozala/Projects/node/build/default/deps/uv/ev/Makefile.am
/Users/gozala/Projects/node/build/default/deps/uv/ev/event.h
/Users/gozala/Projects/node/build/default/deps/uv/ev/ev.pod
/Users/gozala/Projects/node/build/default/deps/uv/ev/ev.c
/Users/gozala/Projects/node/build/default/deps/uv/ev/ev.3
/Users/gozala/Projects/node/build/default/deps/uv/ev/ev++.h
/Users/gozala/Projects/node/build/default/deps/uv/ev/configure.ac
/Users/gozala/Projects/node/build/default/deps/uv/ev/Changes
/Users/gozala/Projects/node/doc/api/addons.markdown
/Users/gozala/Library/Application Support/Sparrow/rfobic@gmail.com.sparrowdb/Cache/node.js/3367/preview
/Users/gozala/Library/Application Support/Sparrow/rfobic@gmail.com.sparrowdb/Cache/node.js/16741/preview
/Users/gozala/Library/Application Support/Sparrow/rfobic@gmail.com.sparrowdb/Cache/node.js/17723/preview
/Users/gozala/Library/Application Support/Sparrow/rfobic@gmail.com.sparrowdb/Cache/%5BGmail%5D%2FAll%20Mail/47271/preview
/Users/gozala/Library/Application Support/Sparrow/rfobic@gmail.com.sparrowdb/Cache/%5BGmail%5D%2FImportant/2874/preview
/Users/gozala/Library/Application Support/Sparrow/rfobic@gmail.com.sparrowdb/Cache/%5BGmail%5D%2FAll%20Mail/86632/preview
/Users/gozala/Library/Application Support/Sparrow/rfobic@gmail.com.sparrowdb/Cache/%5BGmail%5D%2FAll%20Mail/89175/preview
/Users/gozala/Library/Application Support/Sparrow/rfobic@gmail.com.sparrowdb/Cache/%5BGmail%5D%2FAll%20Mail/47271/2/data
/Users/gozala/Library/Application Support/Sparrow/rfobic@gmail.com.sparrowdb/Cache/%5BGmail%5D%2FAll%20Mail/47611/2/data
/Users/gozala/Library/Application Support/Sparrow/rfobic@gmail.com.sparrowdb/Cache/node.js/3367/2/data
/Users/gozala/Library/Application Support/Sparrow/rfobic@gmail.com.sparrowdb/Cache/node.js/3466/2/data
/Users/gozala/Library/Application Support/Sparrow/rfobic@gmail.com.sparrowdb/Cache/node.js/16741/1/data
/Users/gozala/Library/Application Support/Sparrow/rfobic@gmail.com.sparrowdb/Cache/node.js/16744/1/data
/Users/gozala/Library/Application Support/Sparrow/rfobic@gmail.com.sparrowdb/Cache/%5BGmail%5D%2FImportant/2874/1/data
/Users/gozala/Library/Application Support/Sparrow/rfobic@gmail.com.sparrowdb/Cache/%5BGmail%5D%2FImportant/2882/1/data
/Users/gozala/Library/Application Support/Sparrow/rfobic@gmail.com.sparrowdb/Cache/node.js/17723/1/data
/Users/gozala/Library/Application Support/Sparrow/rfobic@gmail.com.sparrowdb/Cache/%5BGmail%5D%2FAll%20Mail/86632/1/data
/Users/gozala/Library/Application Support/Sparrow/rfobic@gmail.com.sparrowdb/Cache/%5BGmail%5D%2FAll%20Mail/86643/1/data
/Users/gozala/Library/Application Support/Sparrow/rfobic@gmail.com.sparrowdb/Cache/%5BGmail%5D%2FAll%20Mail/89175/1/data
Thanks. You both have ev.h in /usr/include/sys so that's probably the culprit. Does it work when you apply the below patch?
diff --git a/deps/uv/src/unix/ev/ev.c b/deps/uv/src/unix/ev/ev.c
index a3bec43..4de879b 100644
--- a/deps/uv/src/unix/ev/ev.c
+++ b/deps/uv/src/unix/ev/ev.c
@@ -37,6 +37,8 @@
* either the BSD or the GPL.
*/
+#include "ev.h"
+
/* this big block deduces configuration from config.h */
#ifndef EV_STANDALONE
# ifdef EV_CONFIG_H
diff --git a/deps/uv/src/unix/ev/ev_kqueue.c b/deps/uv/src/unix/ev/ev_kqueue.c
index 212ca29..ac77eaf 100644
--- a/deps/uv/src/unix/ev/ev_kqueue.c
+++ b/deps/uv/src/unix/ev/ev_kqueue.c
@@ -37,6 +37,8 @@
* either the BSD or the GPL.
*/
+#include "ev.h"
+
#include <sys/types.h>
#include <sys/time.h>
#include <sys/event.h>
s060833t:node.git tommy$ git apply --stat test.patch
deps/uv/src/unix/ev/ev.c | 2 ++
deps/uv/src/unix/ev/ev_kqueue.c | 2 ++
Followed by a ./configure, make still fails:
gcc -Iinclude -Iinclude/uv-private -Isrc/unix/ev -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Isrc/ares/config_darwin -g -c src/unix/ev/ev.c -o src/unix/ev/ev.o -DEV_CONFIG_H=\"config_darwin.h\"
In file included from src/unix/ev/ev.c:1538:
src/unix/ev/ev_kqueue.c: In function ‘kqueue_modify’:
src/unix/ev/ev_kqueue.c:87: error: ‘EV_LIBUV_KQUEUE_HACK’ undeclared (first use in this function)
src/unix/ev/ev_kqueue.c:87: error: (Each undeclared identifier is reported only once
src/unix/ev/ev_kqueue.c:87: error: for each function it appears in.)
src/unix/ev/ev_kqueue.c: In function ‘kqueue_poll’:
src/unix/ev/ev_kqueue.c:157: error: ‘EV_LIBUV_KQUEUE_HACK’ undeclared (first use in this function)
src/unix/ev/ev.c: In function ‘ev_io_start’:
src/unix/ev/ev.c:2666: error: ‘EV_LIBUV_KQUEUE_HACK’ undeclared (first use in this function)
make[1]: *** [src/unix/ev/ev.o] Error 1
Waf: Leaving directory `/Users/tommy/Code/node.git/out'
Build failed: -> task failed (err #2):
{task: uv uv.h -> uv.a}
make: *** [program] Error 1
Not for me, I get exact same error (as originally reported) but with a diff line numbers
Hmm, too bad. The patch below should fix it but it's so ugly it barely bears contemplating...
diff --git a/deps/uv/include/uv-private/ev.h b/deps/uv/include/uv-private/ev.h
index 5d2d7a1..6c5809d 100644
--- a/deps/uv/include/uv-private/ev.h
+++ b/deps/uv/include/uv-private/ev.h
@@ -208,6 +208,7 @@ enum {
EV_READ = 0x01, /* ev_io detected read will not block */
EV_WRITE = 0x02, /* ev_io detected write will not block */
EV_LIBUV_KQUEUE_HACK = 0x40,
+#define EV_LIBUV_KQUEUE_HACK EV_LIBUV_KQUEUE_HACK
EV__IOFDSET = 0x80, /* internal use only */
EV_IO = EV_READ, /* alias for type-detection */
EV_TIMER = 0x00000100, /* timer timed out */
diff --git a/deps/uv/src/unix/ev/ev.c b/deps/uv/src/unix/ev/ev.c
index a3bec43..ed4c213 100644
--- a/deps/uv/src/unix/ev/ev.c
+++ b/deps/uv/src/unix/ev/ev.c
@@ -180,6 +180,10 @@
# include "ev.h"
#endif
+#ifndef EV_LIBUV_KQUEUE_HACK
+# define EV_LIBUV_KQUEUE_HACK 0x40
+#endif
+
EV_CPP(extern "C" {)
#ifndef _WIN32
diff --git a/deps/uv/src/unix/ev/ev_kqueue.c b/deps/uv/src/unix/ev/ev_kqueue.c
index 212ca29..91aef2f 100644
--- a/deps/uv/src/unix/ev/ev_kqueue.c
+++ b/deps/uv/src/unix/ev/ev_kqueue.c
@@ -43,6 +43,10 @@
#include <string.h>
#include <errno.h>
+#ifndef EV_LIBUV_KQUEUE_HACK
+# define EV_LIBUV_KQUEUE_HACK 0x40
+#endif
+
extern void
uv__kqueue_hack (EV_P_ int fflags, ev_io *w);
Not only is it ugly, it also doesn't seem to fix the problem...
s060833t:node.git tommy$ git reset --hard
HEAD is now at 24dabec now working on v0.5.10
s060833t:node.git tommy$ git apply --stat test2.patch
deps/uv/include/uv-private/ev.h | 1 +
deps/uv/src/unix/ev/ev.c | 4 ++++
deps/uv/src/unix/ev/ev_kqueue.c | 4 ++++
3 files changed, 9 insertions(+), 0 deletions(-)
Followed by ./configure && make:
gcc -Iinclude -Iinclude/uv-private -Isrc/unix/ev -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Isrc/ares/config_darwin -g -c src/unix/ev/ev.c -o src/unix/ev/ev.o -DEV_CONFIG_H=\"config_darwin.h\"
In file included from src/unix/ev/ev.c:1538:
src/unix/ev/ev_kqueue.c: In function ‘kqueue_modify’:
src/unix/ev/ev_kqueue.c:87: error: ‘EV_LIBUV_KQUEUE_HACK’ undeclared (first use in this function)
src/unix/ev/ev_kqueue.c:87: error: (Each undeclared identifier is reported only once
src/unix/ev/ev_kqueue.c:87: error: for each function it appears in.)
src/unix/ev/ev_kqueue.c: In function ‘kqueue_poll’:
src/unix/ev/ev_kqueue.c:157: error: ‘EV_LIBUV_KQUEUE_HACK’ undeclared (first use in this function)
src/unix/ev/ev.c: In function ‘ev_io_start’:
src/unix/ev/ev.c:2666: error: ‘EV_LIBUV_KQUEUE_HACK’ undeclared (first use in this function)
make[1]: *** [src/unix/ev/ev.o] Error 1
Waf: Leaving directory `/Users/tommy/Code/node.git/out'
Build failed: -> task failed (err #2):
{task: uv uv.h -> uv.a}
make: *** [program] Error 1
Also no luck with both patches applied...
@pixelspark: You probably need to do a make distclean
first.
yep, that fixes it. I didn't do a distclean when I tried building the original version, would that have made the difference?
with make distclean
first patch worked as well. I'll try it on non-modified version now and will post results.
It looks like make distclean
was fixing problem without patching anything. Thanks a lot @bnoordhuis!
I'm closing this issue assuming that it works for @pixelspark as well.
It does, thanks for your help!
Here is an output: