Open ghost opened 12 years ago
try checking out the 'win-binary' branch of buffertools at https://github.com/springmeyer/node-buffertools. If that works for you I will check with @bnoordhuis about creating a pull request with the gyp file and patch referenced at #19.
yep, it works fine is gyp windows compatible?
+1 for windows builds. We are running exactly in the same problem when using emailjs.
+1; I am trying to use ldapjs which has buffertools as a dependancy as well... would be nice if the npm script would just work on windows (maybe by detecting if it is windows and use the prebuilt version automatically...) somehow?
npm output on windows:
C:\Development\cc>npm install buffertools npm http GET https://registry.npmjs.org/buffertools npm http 304 https://registry.npmjs.org/buffertools
buffertools@1.0.7 preinstall C:\Development\cc\node_modules\buffertools ./build-wrapper
'.' is not recognized as an internal or external command, operable program or batch file. npm ERR! error installing buffertools@1.0.7
npm ERR! buffertools@1.0.7 preinstall: ./build-wrapper
npm ERR! cmd "/c" "./build-wrapper"
failed with 1
npm ERR!
npm ERR! Failed at the buffertools@1.0.7 preinstall script.
npm ERR! This is most likely a problem with the buffertools package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ./build-wrapper
npm ERR! You can get their info via:
npm ERR! npm owner ls buffertools
npm ERR! There is likely additional logging output above.
npm ERR!
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" "i
l" "buffertools"
npm ERR! cwd C:\Development\cc
npm ERR! node -v v0.6.10
npm ERR! npm -v 1.1.0-3
npm ERR! code ELIFECYCLE
npm ERR! message buffertools@1.0.7 preinstall: ./build-wrapper
npm ERR! message cmd "/c" "./build-wrapper"
failed with 1
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Development\cc\npm-debug.log
npm not ok
@springmeyer Sorry, I'm a node.js noob. I've downloaded the win-binary branch and placed it within my node_modules directory, but now I'm getting a error when npm tries to run node-waf when I do a "npm install ldapjs". As far as I can figure, it looks like it's trying to run the vcbuild.bat within springmeyer-node-buffertools as part of the install process. Is there something I need to do to build this before installing ldapjs (I assumed that the binary was already built)? Thanks for your assistance.
Sorry, I'm the ghost... I decided to recreate my account.
@toddharrison - #23 added a new, better approach for windows. So, ideally you could build yourself following the new instructions: https://github.com/TooTallNate/node-buffertools/commit/914f50676083debd1f02955fa4196e451949cb4c
Dane-
The main problem there is that I can't install python and the Microsoft C++ compiler at this point (on this machine). I was hoping for a precompiled solution. I'll look into what I can do. Thanks!
-Todd
-----Original Message----- From: Dane Springmeyer [mailto:reply@reply.github.com] Sent: Monday, April 09, 2012 2:20 PM To: Harrison, Todd Subject: EXTERNAL: Re: [node-buffertools] pre-built download? (#21)
@toddharrison - #23 added a new, better approach for windows. So, ideally you could build yourself following the new instructions: https://github.com/TooTallNate/node-buffertools/commit/914f50676083debd1f02955fa4196e451949cb4c
Reply to this email directly or view it on GitHub: https://github.com/bnoordhuis/node-buffertools/issues/21#issuecomment-5032859
@toddharrison - as a stopgap you could due npm install ldapjs --force
and then manually place the https://github.com/springmeyer/node-buffertools/tree/win-binary
into your node_modules folder.
a year later, I've the same problem trying to install docpad-plugin-minicms under windows 7. there is no up to date prebuild package ?
I've made some compiling attempt but it doesn't work.
there is no up to date prebuild package ?
Not at the moment. I don't have a real interest in maintaining one myself (I don't use Windows. At all.) but if someone like @springmeyer volunteers, I'd be happy to give him access to the repo.
I also rarely use Windows. I only use it to package http://tilemill.com. But, I've pushed a new windows binary of node-buffertools to my branch at https://github.com/springmeyer/node-buffertools/tree/win-binary. I also removed the binding.gyp
file so anyone should simply be able to download this branch rename it to buffertools
and it should work without problems in 32 bit windows.
Not sure if this is the right place to ask, but should I worry about these warnings?
buffertools.cc
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xlocale(336): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc [C:\development\gts-user-service\node_modules\ldapjs\node_modules\buffertools\build\buffertools.vcxproj]
c:\development\gts-user-service\node_modules\ldapjs\node_modules\buffertools\BoyerMoore.h(35): warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data [C:\development\gts-user-service\node_modules\ldapjs\node_modules\buffertools\build\buffertools.vcxproj]
c:\development\gts-user-service\node_modules\ldapjs\node_modules\buffertools\BoyerMoore.h(57): warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data [C:\development\gts-user-service\node_modules\ldapjs\node_modules\buffertools\build\buffertools.vcxproj]
c:\development\gts-user-service\node_modules\ldapjs\node_modules\buffertools\BoyerMoore.h(61): warning C4267: 'initializing' : conversion from 'size_t' to 'const int', possible loss of data [C:\development\gts-user-service\node_modules\ldapjs\node_modules\buffertools\build\buffertools.vcxproj]
c:\development\gts-user-service\node_modules\ldapjs\node_modules\buffertools\BoyerMoore.h(62): warning C4267: 'initializing' : conversion from 'size_t' to 'const int', possible loss of data [C:\development\gts-user-service\node_modules\ldapjs\node_modules\buffertools\build\buffertools.vcxproj]
c:\development\gts-user-service\node_modules\ldapjs\node_modules\buffertools\BoyerMoore.h(110): warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data [C:\development\gts-user-service\node_modules\ldapjs\node_modules\buffertools\build\buffertools.vcxproj]
..\buffertools.cc(79): warning C4267: 'initializing' : conversion from 'size_t' to 'const int', possible loss of data [C:\development\gts-user-service\node_modules\ldapjs\node_modules\buffertools\build\buffertools.vcxproj]
..\buffertools.cc(80): warning C4267: 'initializing' : conversion from 'size_t' to 'const int', possible loss of data [C:\development\gts-user-service\node_modules\ldapjs\node_modules\buffertools\build\buffertools.vcxproj]
..\buffertools.cc(168): warning C4267: '=' : conversion from 'size_t' to 'int32_t', possible loss of data [C:\development\gts-user-service\node_modules\ldapjs\node_modules\buffertools\build\buffertools.vcxproj]
..\buffertools.cc(170): warning C4267: '=' : conversion from 'size_t' to 'int32_t', possible loss of data [C:\development\gts-user-service\node_modules\ldapjs\node_modules\buffertools\build\buffertools.vcxproj]
..\buffertools.cc(176): warning C4244: 'argument' : conversion from 'const ptrdiff_t' to 'int32_t', possible loss of data [C:\development\gts-user-service\node_modules\ldapjs\node_modules\buffertools\build\buffertools.vcxproj]
..\buffertools.cc(248): warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data [C:\development\gts-user-service\node_modules\ldapjs\node_modules\buffertools\build\buffertools.vcxproj]
C:\Users\ <myusername> .node-gyp\0.10.22\deps\v8\include\v8.h(184): warning C4506: no definition for inline function 'v8::Persistent
This happens when npm install ldapjs after npm install -g node-gyp --msvs_version=2012
@igorpupkinable - that looks fine. The C++ exception
warnings would be a problem if node-buffertools was using C++ exceptions, but it is not.
now in 2015 - is there any way to get movement on this? I'm trying to use flowdock on a build server, and its failing due to the age old node-gyp issues. hopefully one day that will get resolved.. but in the meantime is there any reason not to include a /dist folder and avoid the runtime python dependency (dev dependency - fine, its just when you want to use npm as a way to install a package + deps)
I don't use Windows myself but if anyone is willing to do the work on that, then sure.
sure, any preference on the approach? I'd assume node-pre-gyp, and travis / appveyor to publish the prebuilt dist? here is a detailed guide on that
It would be helpful to state in the readme that this package is not compatible with Windows.
@Matthew-Davey It's compatible, but you need a C++ compiler to build it. Most platforms install one by default, Windows doesn't. It's not a requirement unique to node-buffertools, all native node add-ons have the same dependency (although some publish pre-compiled binaries.)
Hi there, thanks for the help. Here is the error I get when I npm install buffertools
. Please note that I do use some other packages with native add-ons, eg Nokogiri.
$>npm install buffertools
> buffertools@2.1.4 install C:\...\node_modules\buffertools
> node-gyp rebuild
C:\...\node_modules\buffertools>if not defined npm_config_node_gyp (node "C:\...\AppData\Roaming\nvm\v6.3.1\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
buffertools.cc
c:\...\node_modules\buffertools\BoyerMoore.h(35): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data [C:\...\node_modules\buffertools\build\buffertools.vc xproj]
c:\...\node_modules\buffertools\BoyerMoore.h(57): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data [C:\...\node_modules\buffertools\build\buffertools.vc xproj]
c:\...\node_modules\buffertools\BoyerMoore.h(61): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [C:\...\node_modules\buffertools\build\buf fertools.vcxproj]
c:\...\node_modules\buffertools\BoyerMoore.h(61): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [C:\...\node_modules\buffertools\bui ld\buffertools.vcxproj]
c:\...\node_modules\buffertools\BoyerMoore.h(62): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [C:\...\node_modules\buffertools\build\buf fertools.vcxproj]
c:\...\node_modules\buffertools\BoyerMoore.h(62): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [C:\...\node_modules\buffertools\bui ld\buffertools.vcxproj]
c:\...\node_modules\buffertools\BoyerMoore.h(110): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data [C:\...\node_modules\buffertools\build\buffertools.v cxproj]
..\buffertools.cc(219): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [C:\...\node_modules\buffertools\build\buffertools.vcxproj]
..\buffertools.cc(219): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [C:\...\node_modules\buffertools\build\buffertools.vcxproj]
..\buffertools.cc(220): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [C:\...\node_modules\buffertools\build\buffertools.vcxproj]
..\buffertools.cc(220): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data [C:\...\node_modules\buffertools\build\buffertools.vcxproj]
..\buffertools.cc(332): warning C4267: '=': conversion from 'size_t' to 'int32_t', possible loss of data [C:\...\node_modules\buffertools\build\buffertools.vcxproj]
..\buffertools.cc(334): warning C4267: '=': conversion from 'size_t' to 'int32_t', possible loss of data [C:\...\node_modules\buffertools\build\buffertools.vcxproj]
..\buffertools.cc(340): warning C4244: 'argument': conversion from 'const ptrdiff_t' to 'int32_t', possible loss of data [C:\...\node_modules\buffertools\build\buffertools.vcxproj]
..\buffertools.cc(419): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data [C:\...\node_modules\buffertools\build\buffertools.vcxproj]
win_delay_load_hook.c
C:\...\Roaming\nvm\v6.3.1\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.c(34): error C2373: '__pfnDliNotifyHook2': redefinition; different type modifiers [C:\...\node_modules\buffertools\build\buffertools.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\delayimp.h(134): note: see declaration of '__pfnDliNotifyHook2'
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\...\AppData\Roaming\nvm\v6.3.1\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\...\\AppData\\Roaming\\nvm\\v6.3.1\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\...\node_modules\buffertools
gyp ERR! node -v v6.3.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open 'C:\...\package.json'
npm WARN Desktop No description
npm WARN Desktop No repository field.
npm WARN Desktop No README data
npm WARN Desktop No license field.
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "buffertools"
npm ERR! node v6.3.1
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! buffertools@2.1.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the buffertools@2.1.4 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the buffertools 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 information on how to open an issue for this project with:
npm ERR! npm bugs buffertools
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls buffertools
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\...\npm-debug.log
@Matthew-Davey Upgrade to node-gyp@3.4.0, that will fix the __pfnDliNotifyHook2 error.
Compilation issue for Windows should be solved by installing Visual C++ 2015 Build Tools.
Please see comment from Microsoft team for more details. Download latest Visual C++ 2015 Build Tools for Windows.
can you offer a pre-built download for buffertools, so that those of us on windows can just download and use it? i actually just wanna use 'https://github.com/eleith/emailjs' but it requires this module
edit: it seems that 'emailjs' only requires the 'buffertools.concat' function, so if its not possible to provide a pre-built download, can you please tell me what's the difference between 'buffertools.concat' and 'Array.prototype.concat'?