dazoe / ed25519

An Ed25519 implementation for node.js
BSD 2-Clause "Simplified" License
116 stars 49 forks source link

Path for "C:\OpenSSL-Win64\lib\libeay32.lib" is hard-coded. #22

Closed NatoBoram closed 4 years ago

NatoBoram commented 5 years ago

Now, I don't know if this is the right place, but someone, somewhere along the twisted chain of NodeJS dependencies, decided it was a good idea to hard-code a library's path.

I installed OpenSSL, yet I got an error.

LINK : fatal error LNK1181: cannot open input file 'C:\OpenSSL-Win64\lib\libeay32.lib' [C:\Users\natob\Documents\GitHub\GetEpona\Epona-js\node_modules\ed25519\build\ed25519.vcxproj]

Moreover, the library changed name with an updated OpenSSL version. Even if one was to install OpenSSL the way you want, it still wouldn't work because they'd need to install that one version that works.

Here's the full logs.

yarn install v1.15.2
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.4: The platform "win32" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@1.2.8: The platform "win32" is incompatible with this module.
info "fsevents@1.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "react-markdown-editor > reflux@6.4.1" has incorrect peer dependency "react@^15.0.2".
warning " > react-moment@0.8.4" has unmet peer dependency "prop-types@^15.6.0".
warning " > electron-builder-squirrel-windows@20.40.0" has unmet peer dependency "app-builder-lib@~20.40.0".
[4/4] Building fresh packages...
[1/3] ⡀ tiny-secp256k1
[2/3] ⢀ ed25519
error C:\Users\natob\Documents\GitHub\GetEpona\Epona-js\node_modules\ed25519: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: C:\Users\natob\Documents\GitHub\GetEpona\Epona-js\node_modules\ed25519
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@11.14.0 | win32 | x64
gyp info spawn C:\Users\natob\.windows-build-tools\python27\python.exe
gyp info spawn args [ 'C:\\Users\\natob\\AppData\\Local\\Yarn\\Data\\global\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-G',
gyp info spawn args   'msvs_version=2015',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\natob\\Documents\\GitHub\\GetEpona\\Epona-js\\node_modules\\ed25519\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\natob\\AppData\\Local\\Yarn\\Data\\global\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\natob\\.node-gyp\\11.14.0\\include\\node\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\natob\\.node-gyp\\11.14.0',
gyp info spawn args   '-Dnode_gyp_dir=C:\\Users\\natob\\AppData\\Local\\Yarn\\Data\\global\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=C:\\Users\\natob\\.node-gyp\\11.14.0\\<(target_arch)\\node.lib',
gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\natob\\Documents\\GitHub\\GetEpona\\Epona-js\\node_modules\\ed25519',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\\Users\\natob\\Documents\\GitHub\\GetEpona\\Epona-js\\node_modules\\ed25519\\build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args   '/clp:Verbosity=minimal',
gyp info spawn args   '/nologo',
gyp info spawn args   '/p:Configuration=Release;Platform=x64' ]
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  keypair.c
  sign.c
  open.c
  crypto_verify_32.c
  ge_double_scalarmult.c
  ge_frombytes.c
  ge_scalarmult_base.c
  ge_precomp_0.c
  ge_p2_0.c
  ge_p2_dbl.c
  ge_p3_0.c
  ge_p3_dbl.c
  ge_p3_to_p2.c
  ge_p3_to_cached.c
  ge_p3_tobytes.c
  ge_madd.c
  ge_add.c
  ge_msub.c
  ge_sub.c
  ge_p1p1_to_p3.c
  ge_p1p1_to_p2.c
  ge_tobytes.c
  fe_0.c
  fe_1.c
  fe_cmov.c
c:\users\natob\documents\github\getepona\epona-js\node_modules\ed25519\src\ed25519\fe_cmov.c(42): warning C4146: unary minus operator applied to unsigned type, result
still unsigned [C:\Users\natob\Documents\GitHub\GetEpona\Epona-js\node_modules\ed25519\build\ed25519.vcxproj]
  fe_copy.c
  fe_neg.c
  fe_add.c
  fe_sub.c
  fe_mul.c
  fe_sq.c
  fe_sq2.c
  fe_invert.c
  fe_tobytes.c
  fe_isnegative.c
  fe_isnonzero.c
  fe_frombytes.c
  fe_pow22523.c
  sc_reduce.c
  sc_muladd.c
  ed25519.cc
  win_delay_load_hook.cc
c:\users\natob\documents\github\getepona\epona-js\node_modules\ed25519\src\ed25519.cc(19): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\natob\Documents\GitHub\GetEpona\Epona-js\node_modules\ed25519\build\ed25519.vcxproj]
  c:\users\natob\.node-gyp\11.14.0\include\node\v8.h(10257): note: see declaration of 'v8::Value::ToObject'
c:\users\natob\documents\github\getepona\epona-js\node_modules\ed25519\src\ed25519.cc(22): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\natob\Documents\GitHub\GetEpona\Epona-js\node_modules\ed25519\build\ed25519.vcxproj]
  c:\users\natob\.node-gyp\11.14.0\include\node\v8.h(10257): note: see declaration of 'v8::Value::ToObject'
c:\users\natob\documents\github\getepona\epona-js\node_modules\ed25519\src\ed25519.cc(53): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\natob\Documents\GitHub\GetEpona\Epona-js\node_modules\ed25519\build\ed25519.vcxproj]
  c:\users\natob\.node-gyp\11.14.0\include\node\v8.h(10257): note: see declaration of 'v8::Value::ToObject'
c:\users\natob\documents\github\getepona\epona-js\node_modules\ed25519\src\ed25519.cc(56): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\natob\Documents\GitHub\GetEpona\Epona-js\node_modules\ed25519\build\ed25519.vcxproj]
  c:\users\natob\.node-gyp\11.14.0\include\node\v8.h(10257): note: see declaration of 'v8::Value::ToObject'
c:\users\natob\documents\github\getepona\epona-js\node_modules\ed25519\src\ed25519.cc(57): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\natob\Documents\GitHub\GetEpona\Epona-js\node_modules\ed25519\build\ed25519.vcxproj]
  c:\users\natob\.node-gyp\11.14.0\include\node\v8.h(10257): note: see declaration of 'v8::Value::ToObject'
c:\users\natob\documents\github\getepona\epona-js\node_modules\ed25519\src\ed25519.cc(65): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\natob\Documents\GitHub\GetEpona\Epona-js\node_modules\ed25519\build\ed25519.vcxproj]
  c:\users\natob\.node-gyp\11.14.0\include\node\v8.h(10257): note: see declaration of 'v8::Value::ToObject'
c:\users\natob\documents\github\getepona\epona-js\node_modules\ed25519\src\ed25519.cc(66): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\natob\Documents\GitHub\GetEpona\Epona-js\node_modules\ed25519\build\ed25519.vcxproj]
  c:\users\natob\.node-gyp\11.14.0\include\node\v8.h(10257): note: see declaration of 'v8::Value::ToObject'
c:\users\natob\documents\github\getepona\epona-js\node_modules\ed25519\src\ed25519.cc(68): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\natob\Documents\GitHub\GetEpona\Epona-js\node_modules\ed25519\build\ed25519.vcxproj]
  c:\users\natob\.node-gyp\11.14.0\include\node\v8.h(10257): note: see declaration of 'v8::Value::ToObject'
c:\users\natob\documents\github\getepona\epona-js\node_modules\ed25519\src\ed25519.cc(76): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\natob\Documents\GitHub\GetEpona\Epona-js\node_modules\ed25519\build\ed25519.vcxproj]
  c:\users\natob\.node-gyp\11.14.0\include\node\v8.h(10257): note: see declaration of 'v8::Value::ToObject'
c:\users\natob\documents\github\getepona\epona-js\node_modules\ed25519\src\ed25519.cc(101): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\natob\Documents\GitHub\GetEpona\Epona-js\node_modules\ed25519\build\ed25519.vcxproj]
  c:\users\natob\.node-gyp\11.14.0\include\node\v8.h(10257): note: see declaration of 'v8::Value::ToObject'
c:\users\natob\documents\github\getepona\epona-js\node_modules\ed25519\src\ed25519.cc(102): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\natob\Documents\GitHub\GetEpona\Epona-js\node_modules\ed25519\build\ed25519.vcxproj]
  c:\users\natob\.node-gyp\11.14.0\include\node\v8.h(10257): note: see declaration of 'v8::Value::ToObject'
c:\users\natob\documents\github\getepona\epona-js\node_modules\ed25519\src\ed25519.cc(105): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\natob\Documents\GitHub\GetEpona\Epona-js\node_modules\ed25519\build\ed25519.vcxproj]
  c:\users\natob\.node-gyp\11.14.0\include\node\v8.h(10257): note: see declaration of 'v8::Value::ToObject'
c:\users\natob\documents\github\getepona\epona-js\node_modules\ed25519\src\ed25519.cc(106): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\natob\Documents\GitHub\GetEpona\Epona-js\node_modules\ed25519\build\ed25519.vcxproj]
  c:\users\natob\.node-gyp\11.14.0\include\node\v8.h(10257): note: see declaration of 'v8::Value::ToObject'
c:\users\natob\documents\github\getepona\epona-js\node_modules\ed25519\src\ed25519.cc(107): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\natob\Documents\GitHub\GetEpona\Epona-js\node_modules\ed25519\build\ed25519.vcxproj]
  c:\users\natob\.node-gyp\11.14.0\include\node\v8.h(10257): note: see declaration of 'v8::Value::ToObject'
LINK : fatal error LNK1181: cannot open input file 'C:\OpenSSL-Win64\lib\libeay32.lib' [C:\Users\natob\Documents\GitHub\GetEpona\Epona-js\node_modules\ed25519\build\ed25519.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\natob\AppData\Local\Yarn\Data\global\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:193:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:255:12)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\\ProgramData\\scoop\\apps\\nodejs\\current\\node.exe" "C:\\Users\\natob\\AppData\\Local\\Yarn\\Data\\global\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\natob\Documents\GitHub\GetEpona\Epona-js\node_modules\ed25519
gyp ERR! node -v v11.14.0
gyp ERR! node-gyp -v v3.8.0
gaoxiangxyz commented 5 years ago

@NatoBoram See this repo which removing dependency on openssl base on this repo.

erikmav commented 4 years ago

I merged commits from a fork that remove OpenSSL dependencies. See commit 8900a825370393ec723f88f74d63d16c509343c2. Updated published package coming when I get permissions.