Giter Site home page Giter Site logo

Installing on Windows? about node-sodium HOT 8 CLOSED

paixaop avatar paixaop commented on July 3, 2024
Installing on Windows?

from node-sodium.

Comments (8)

paixaop avatar paixaop commented on July 3, 2024

Yes

Today the install process requires automake and make tools. You can try to compile under Cygwin. If you port the build stage to windows I will merge it in.

Pedro

On Aug 6, 2015, at 10:38, Scott [email protected] wrote:

Running npm install sodium doesn't work on Windows. Essentially, it says make not found and aborts.

This will probably require installing libsodium separately first (do we need to install libsodium-net and grab the dll?). I don't know.


Reply to this email directly or view it on GitHub.

from node-sodium.

squirrelsama avatar squirrelsama commented on July 3, 2024

@paragonie-scott I also have a need for MingGW-less Windows builds. Does it sound unreasonable to pull down the pre-built Windows binaries from https://download.libsodium.org/libsodium/releases/ ? Do you know of any other native modules that do this? It might be against the node-gyp way to not compile from source, but it might be simpler to accomplish what we need that way. I'm gonna take a look at either anyway and see what I come up with.

from node-sodium.

paixaop avatar paixaop commented on July 3, 2024

Today the automake is a way around getting the right compilation defines so that libsodium compiles in each platform. If you get libsodium to compile on your windows machine send me a copy of your Makefile, and I'll see if I can include it in the compilation process

from node-sodium.

tommitytom avatar tommitytom commented on July 3, 2024

I notice this has been closed, yet there appears to be no clear way on how to get this working on Windows. Has this actually been resolved?

from node-sodium.

paixaop avatar paixaop commented on July 3, 2024

You can now use a binary distribution of the libsodium library and node sodium will bypass sodium compilation on windows and other platforms.
Check the Manual Build section of the Readme

from node-sodium.

creshal avatar creshal commented on July 3, 2024

NPM deletes the sodium folder between failed builds, so if the automatic build fails, you never get a folder to drop the binary distribution into. So this doesn't really work. Is there a way to specify a binary folder in an outside location?

from node-sodium.

paixaop avatar paixaop commented on July 3, 2024

@creshal for the time being you can download the source from github and run make manually.

from node-sodium.

creshal avatar creshal commented on July 3, 2024

That compiles, after some changes to the makefile (I'll make a pull request for that once everything works), but now Node throws a "cannot find module" error when trying to load sodium or run Mocha:

module.js:568
  return process.dlopen(module, path._makeLong(filename));
             ^


Error: Das angegebene Modul wurde nicht gefunden.
\\?\C:\Users\creshal\Desktop\foo\app\node_modules\sodium\build\Release\sodium.node
at Error (native)
at Object.Module._extensions..node (module.js:568:18)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\Users\creshal\Desktop\foo\app\node_modules\sodium\lib\sodium.js:16:15)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)

The file definitely exists, however.

Edit: Okay, the error message was confusing. I think. Compilation only works with a dynamically linked libsodium.lib; and then needs libsodium.dll both in the manual build folder during compilation and in %PATH% at run time. Some tests still fail, but those failures seem to be in native code and thus a problem of libsodium itself.

I'll prepare a pull request with an updated readme, Makefile (needs to set msvs_version) and binding.gyp.

Edit 2: Made one pull request for each the Windows and the test suite fixes; that should settle this topic.

from node-sodium.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.