Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 7 Node v0.8.2 Build Fails #38

Closed
No9 opened this issue Jul 10, 2012 · 16 comments
Closed

Windows 7 Node v0.8.2 Build Fails #38

No9 opened this issue Jul 10, 2012 · 16 comments

Comments

@No9
Copy link

No9 commented Jul 10, 2012

Fresh install of 0.8.2

npm http GET https://registry.npmjs.org/mdns
npm http 200 https://registry.npmjs.org/mdns

> mdns@0.0.7 install C:\Users\ANTON\node_modules\mdns
> node-gyp rebuild


C:\Users\ANTON\node_modules\mdns>node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
  txt_record_get_length.cpp
c:\users\anton\documents\github\node_mdns\src\mdns.hpp(15): fatal error C1083: Cannot open include file: 'dns_sd.h': No such file or directory [C:\Users\ANTON\Documents\GitHub\node_mdns\build\dns_sd_bindings.vcxproj]
  txt_record_buffer_to_object.cpp
c:\users\anton\documents\github\node_mdns\src\mdns.hpp(15): fatal error C1083: Cannot open include file: 'dns_sd.h': No such file or directory [C:\Users\ANTON\Documents\GitHub\node_mdns\build\dns_sd_bindings.vcxproj]
  dns_service_process_result.cpp
c:\users\anton\documents\github\node_mdns\src\mdns.hpp(15): fatal error C1083: Cannot open include file: 'dns_sd.h': No such file or directory [C:\Users\ANTON\Documents\GitHub\node_mdns\build\dns_sd_bindings.vcxproj]
  txt_record_deallocate.cpp
c:\users\anton\documents\github\node_mdns\src\mdns.hpp(15): fatal error C1083: Cannot open include file: 'dns_sd.h': No such file or directory [C:\Users\ANTON\Documents\GitHub\node_mdns\build\dns_sd_bindings.vcxproj]
  dns_service_browse.cpp
c:\users\anton\documents\github\node_mdns\src\mdns.hpp(15): fatal error C1083: Cannot open include file: 'dns_sd.h': No such file or directory [C:\Users\ANTON\Documents\GitHub\node_mdns\build\dns_sd_bindings.vcxproj]
  dns_service_enumerate_domains.cpp
c:\users\anton\documents\github\node_mdns\src\mdns.hpp(15): fatal error C1083: Cannot open include file: 'dns_sd.h': No such file or directory [C:\Users\ANTON\Documents\GitHub\node_mdns\build\dns_sd_bindings.vcxproj]
  dns_service_register.cpp
c:\users\anton\documents\github\node_mdns\src\mdns.hpp(15): fatal error C1083: Cannot open include file: 'dns_sd.h': No such file or directory [C:\Users\ANTON\Documents\GitHub\node_mdns\build\dns_sd_bindings.vcxproj]
  dns_service_ref_sock_fd.cpp
c:\users\anton\documents\github\node_mdns\src\mdns.hpp(15): fatal error C1083: Cannot open include file: 'dns_sd.h': No such file or directory [C:\Users\ANTON\Documents\GitHub\node_mdns\build\dns_sd_bindings.vcxproj]
  dns_service_resolve.cpp
c:\users\anton\documents\github\node_mdns\src\mdns.hpp(15): fatal error C1083: Cannot open include file: 'dns_sd.h': No such file or directory [C:\Users\ANTON\Documents\GitHub\node_mdns\build\dns_sd_bindings.vcxproj]
  mdns_utils.cpp
c:\users\anton\documents\github\node_mdns\src\mdns.hpp(15): fatal error C1083: Cannot open include file: 'dns_sd.h': No such file or directory [C:\Users\ANTON\Documents\GitHub\node_mdns\build\dns_sd_bindings.vcxproj]
  dns_service_ref.cpp
c:\users\anton\documents\github\node_mdns\src\mdns.hpp(15): fatal error C1083: Cannot open include file: 'dns_sd.h': No such file or directory [C:\Users\ANTON\Documents\GitHub\node_mdns\build\dns_sd_bindings.vcxproj]
  winsock_watcher.cpp
c:\users\anton\documents\github\node_mdns\src\mdns.hpp(15): fatal error C1083: Cannot open include file: 'dns_sd.h': No such file or directory [C:\Users\ANTON\Documents\GitHub\node_mdns\build\dns_sd_bindings.vcxproj]
  txt_record_ref.cpp
c:\users\anton\documents\github\node_mdns\src\mdns.hpp(15): fatal error C1083: Cannot open include file: 'dns_sd.h': No such file or directory [C:\Users\ANTON\Documents\GitHub\node_mdns\build\dns_sd_bindings.vcxproj]
  dns_service_ref_deallocate.cpp
c:\users\anton\documents\github\node_mdns\src\mdns.hpp(15): fatal error C1083: Cannot open include file: 'dns_sd.h': No such file or directory [C:\Users\ANTON\Documents\GitHub\node_mdns\build\dns_sd_bindings.vcxproj]
  txt_record_set_value.cpp
c:\users\anton\documents\github\node_mdns\src\mdns.hpp(15): fatal error C1083: Cannot open include file: 'dns_sd.h': No such file or directory [C:\Users\ANTON\Documents\GitHub\node_mdns\build\dns_sd_bindings.vcxproj]
  txt_record_create.cpp
c:\users\anton\documents\github\node_mdns\src\mdns.hpp(15): fatal error C1083: Cannot open include file: 'dns_sd.h': No such file or directory [C:\Users\ANTON\Documents\GitHub\node_mdns\build\dns_sd_bindings.vcxproj]
  dns_service_get_addr_info.cpp
c:\users\anton\documents\github\node_mdns\src\mdns.hpp(15): fatal error C1083: Cannot open include file: 'dns_sd.h': No such file or directory [C:\Users\ANTON\Documents\GitHub\node_mdns\build\dns_sd_bindings.vcxproj]
  dns_sd.cpp
c:\users\anton\documents\github\node_mdns\src\mdns.hpp(15): fatal error C1083: Cannot open include file: 'dns_sd.h': No such file or directory [C:\Users\ANTON\Documents\GitHub\node_mdns\build\dns_sd_bindings.vcxproj]
  Generating Code...
gyp ERR! rebuild error Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! rebuild error     at ChildProcess.onExit (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:214:23)
gyp ERR! rebuild error     at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! rebuild error     at Process._handle.onexit (child_process.js:674:10)
gyp ERR! not ok
npm ERR! mdns@0.0.7 install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the mdns@0.0.7 install script.
npm ERR! This is most likely a problem with the mdns package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls mdns
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "link"
npm ERR! cwd C:\Users\ANTON\Documents\GitHub\node_mdns
npm ERR! node -v v0.8.2
npm ERR! npm -v 1.1.36
npm ERR! code ELIFECYCLE
npm ERR! message mdns@0.0.7 install: `node-gyp rebuild`
npm ERR! message `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\ANTON\Documents\GitHub\node_mdns\npm-debug.log
npm ERR! not ok code 0
@agnat
Copy link
Owner

agnat commented Jul 10, 2012

I'm sorry but the windows port is not finished yet. The missing header file dns_sd.h comes with apples bonjour SDK for windows. It compiles just fine after installing it. But even then WinsockWatcher is still unimplemented and it will not do anything useful.

@No9
Copy link
Author

No9 commented Jul 10, 2012

Not a major issue.
I was just logged into my windows box so I thought I would give it a spin.

@nickminutello
Copy link

Has the windows port progressed?

@agnat
Copy link
Owner

agnat commented Aug 29, 2012

Nope. No commits, no progress. ;-)

On Aug 29, 2012, at 18:45, nickminutello notifications@github.com wrote:

Has the windows port progressed?


Reply to this email directly or view it on GitHub.

@No9
Copy link
Author

No9 commented Aug 29, 2012

I had a look at this two nights ago
Got the build up and started to get into the windows bonjour samples.
Had node.js servers appearing in the test clients.
@agnat can you describe what you had in mind for the winsock_watcher or should I start a fresh?

@agnat
Copy link
Owner

agnat commented Aug 29, 2012

The Windows port boils down to writing a drop-in replacement for IOWatcher (which is deprecated). On the node/libuv side there is a new handle type: poll handles. So, what is needed is something that behaves like the old IOWatcher but uses the new libuv poll code. You can implement that on any platform and just make sure it works on windows afterwards (that's what I would do). The WinsockWatcher already has some of the structure, but should be renamed to SocketWatcher at some point because it will not be windows specific. That is the general plan.

Thanks for looking into it!

On Aug 29, 2012, at 20:03, Anton Whalley notifications@github.com wrote:

I had a look at this two nights ago
Got the build up and started to get into the windows bonjour samples.
Had node.js servers appearing in the test clients.
@agnat can you describe what you had in mind for the winsock_watcher or should I start a fresh?


Reply to this email directly or view it on GitHub.

@croteb
Copy link

croteb commented Nov 15, 2012

So, I started to try to flush out the winsockwatcher as you had started with and stated above, but I seem to have hit a wall for some reason.

https://gist.github.com/4082355 -- the .hpp and .cpp I'm trying with (I basically hacked together a bunch of kludges from various sources as well as their own emulator layers to get it to compile and it appears like it SHOULD work)

Ultimately I get this error:
Assertion failed: 0, file c:\node-v0.8.14\deps\uv\src\win\req-inl.h, line 220

I'm on node v0.8.14.

Not being overly familiar with the node internals, is there something simple I seem to be missing?

@ziransun
Copy link

Any further progress on this?

@agnat
Copy link
Owner

agnat commented Nov 29, 2012

Thanks @croteb.

It's kind of hard to follow whats going on, mostly because of the "emulator layer". Looks like an attempt to make it compatible with old ev_* based code. We're not going to need that. I'd try to strip all the compatibility stuff and only use uv_* calls. Maybe it becomes more obvious what the problem is. I'd also try to follow existing uv_ based code as close as possible (e.g. tcp_wrap from node core).

@agnat
Copy link
Owner

agnat commented Nov 29, 2012

@croteb, could you paste some links to the "various sources"?

@croteb
Copy link

croteb commented Dec 3, 2012

I pulled a large majority of the emulation shim framework from joyent themselves (it looks like they were expecting there to be a bunch of 'old way' versus 'new way' and tried to help):
https://github.com/joyent/node/blob/master/src/ev-emul.h

I haven't had a chance to get back to this recently -- hopefully in the near future -- , but I did try and comment out a bunch of the code and just do the uv_* calls without much luck.

@agnat
Copy link
Owner

agnat commented Dec 13, 2012

Fixed in ef89787 (v1.0.0). mdns now works on windows. Please refer to the installation section of the README for details.

Thanks @TobyEalden for providing the PR. Thanks @croteb for putting together the initial gist.

@agnat agnat closed this as completed Dec 13, 2012
@rowntreerob
Copy link

and on (3.7.5-030705-generic)linux? (dns_sd.h) not found...

make: Entering directory /home/rob/node_modules/mdns/build' CXX(target) Release/obj.target/dns_sd_bindings/src/dns_sd.o In file included from ../src/dns_sd.cpp:1:0: ../src/mdns.hpp:31:20: fatal error: dns_sd.h: No such file or directory compilation terminated. make: *** [Release/obj.target/dns_sd_bindings/src/dns_sd.o] Error 1 make: Leaving directory/home/rob/node_modules/mdns/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/nodejs/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:686:10)
gyp ERR! System Linux 3.7.5-030705-generic
gyp ERR! command "node" "/usr/lib/nodejs/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
g

@rowntreerob
Copy link

@qdk0901
Copy link

qdk0901 commented Apr 12, 2015

still report missing "dns_sd.h" error when built under windows 8.1

@agnat
Copy link
Owner

agnat commented Apr 13, 2015

Please see the section on installation in the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants