calmh / node-snmp-native

Native Javascript SNMP library for Node.js
MIT License
252 stars 65 forks source link

Build fails on Windows because of node-waf #3

Closed mgcrea closed 12 years ago

mgcrea commented 12 years ago

Does this package is intended to run on Windows? Looks like node team has decided to switch from waf to gyp for building native modules (cf. http://botsikas.blogspot.fr/2011/12/nodejs-modules-cross-platform.html).

Any chance you would update this very promising plugin so that it can be built on windows?

Edit: Looks like you are indeed using gyp & it's just a dependency that fails to build (dtrace-provider). So this issue is probably irrelevant.

Edit2: Maybe you could do some npm tweaking to consider dtrace as optional (check : https://github.com/mcavage/node-restify/issues/100#issuecomment-4686124)

Regards!

calmh commented 12 years ago

Hmm. I haven't tested it on Windows, but I see no reason why it wouldn't work. It doesn't contain any code that needs to be built, only JavaScript.

//jb

(Sent from my phone - please excuse brevity and typos.)

On 9 maj 2012, at 16:54, Olivier Louvignes reply@reply.github.com wrote:

Does this package is intended to run on Windows? Looks like node team has decided to switch from waf to gyp for building native modules (cf. http://botsikas.blogspot.fr/2011/12/nodejs-modules-cross-platform.html).

Any chance you would update this very promising plugin so that it can be built on windows?

Regards!


Reply to this email directly or view it on GitHub: https://github.com/calmh/node-snmp-native/issues/3

mgcrea commented 12 years ago

Yes, but it does require the package "dtrace-provider" that requires compilation via "node-waf".

calmh commented 12 years ago

Dtrace-provider will likely not build on Windows, but it's just a dependency of one of the devdependencies (snmpjs). These should not be pulled in at all when snmp-native is used as a dependency itself. If it's anyway problematic, feel free to edit package.json to remove snmpjs - it's only used for the integration tests.

On 10 maj 2012, at 19:32, Olivier Louvignes reply@reply.github.com wrote:

Yes, but it does require the package "dtrace-provider" that requires compilation via "node-waf".


Reply to this email directly or view it on GitHub: https://github.com/calmh/node-snmp-native/issues/3#issuecomment-5631373

calmh commented 12 years ago

To clarify;

Using snmp-native as a dependency on Windows should work just fine. If it doesn't open an issue on whatever happens.

Manually installing snmp-native on Windows might fail because npm will try to install the devDependencies, which require dtrace-provider. To get around that, edit node_modules/snmp-native/package.json to remove the snmpjs devDependency, rerun npm install in node_modules/snmp-native.

calmh commented 12 years ago

I pushed a version 1.0.5 that doesn't include the dev dependencies in the shrinkwrap; possibly that is what you were hitting. Also, if installing locally, a "npm install --no-dev" will avoid pulling in the dev dependencies, avoiding the dtrace issue.