Git Product home page Git Product logo

Comments (8)

xraid avatar xraid commented on June 20, 2024 1

To have it build with docs install instructions on OSX with "gpk rebuild"

I had to add :

*** => bcoin/node_modules/bcrypto/src/secp256k1/src/scalar_4x64_impl.h

line 962 => #include "string.h" // *** monkey patch ***

hth
/xraid

it seems memcpy is not declared per default with the OSX toolchain and perhaps same with WIN.
either *NIX toolchain includes the declaration per default or the *NIX setup has access to the declaration of
memcpy without an explicit include ...

from bcrypto.

pinheadmz avatar pinheadmz commented on June 20, 2024

related: kyokan/bob-wallet#142

@chjj any tips?

from bcrypto.

chjj avatar chjj commented on June 20, 2024

This is a strange error:

fatal error C1083: Cannot open compiler generated file: ''

My best guess is that this path is too long:

D:\a\desktop-wallet\desktop-wallet\node_modules\@arkecosystem\platform-sdk-crypto\node_modules\bcrypto\src\secp256k1\src\secp256k1.c

Windows can't handle really long path names. This problem is worsened by older releases of bcrypto setting the msbuild option ObjectFileName to $(IntDir)/%(Directory)/. That essentially doubles the length of the path when creating object files. We can't use the more typical $(IntDir)/%(RelativeDir)/ because node-gyp always builds win_delay_load_hook.cc which resides in the node-gyp workspace, not the bcrypto one.

The good news is that I've removed the ObjectFileName setting because we don't need it anymore. All our object files have unique names. I'm curious whether the current master would produce the same error.

from bcrypto.

chjj avatar chjj commented on June 20, 2024

On a side note, I think we should consider distributing pre-built binaries for windows and apple. Building on windows and apple is an absolute nightmare. Windows requires several gigabytes of disk space to install all of the VS build tools, and it's not something windows users typically have installed. Mac OSX Catalina is having disastrous issues with builds as well. So much so that dozens of programmers couldn't figure out the true source of the issue even after months of researching it.

On the other hand, Linux and the BSDs just work. The compiler and build system is more often than not already installed. The compiler isn't some crazy Apple fork, and it doesn't require 100gb of disk space to install in the first place.

I've been hoping for a node build system that just bundles vanilla clang & make for windows and apple (or auto-downloads & caches them). I feel like this would solve all of the build issues for windows and apple, and would allows us to switch to simple Makefiles instead of using gyp files. For more complex builds, maybe cmake would be added in the future. Maybe someday a zero-headache build system for node will be created, but I guess until then, the only option is prebuilds.

from bcrypto.

faustbrian avatar faustbrian commented on June 20, 2024

The good news is that I've removed the ObjectFileName setting because we don't need it anymore. All our object files have unique names. I'm curious whether the current master would produce the same error.

I'll give it a try with master when I get a chance. Would there be anything else I could do to make it work with windows if that still fails?

from bcrypto.

pinheadmz avatar pinheadmz commented on June 20, 2024

@faustbrian I'm a newb at development in Windows environment but learned last night that I could not build bcrypto unless git-bash was run as Administrator, dunno if that helps.

from bcrypto.

bluelovers avatar bluelovers commented on June 20, 2024
yarn add v1.22.4
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
error T:\download\kkk\node_modules\bcrypto: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments: 
Directory: T:\download\kkk\node_modules\bcrypto
Output:
T:\download\kkk\node_modules\bcrypto>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild ) 
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info find Python using Python version 3.8.5 found at "C:\Python38\python.exe"
gyp info find VS using VS2017 (15.9.28307.423) found at:
gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Python38\python.exe
gyp info spawn args [
gyp info spawn args   'C:\\Program Files\\nodejs\\node_modules\\npm\\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   '-I',
gyp info spawn args   'T:\\download\\kkk\\node_modules\\bcrypto\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\User\\AppData\\Local\\node-gyp\\Cache\\14.8.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\\User\\AppData\\Local\\node-gyp\\Cache\\14.8.0',
gyp info spawn args   '-Dnode_gyp_dir=C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\User\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\14.8.0\\\\<(target_arch)\\\\node.lib',
gyp info spawn args   '-Dmodule_root_dir=T:\\download\\kkk\\node_modules\\bcrypto',
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   'T:\\download\\kkk\\node_modules\\bcrypto\\build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe
gyp info spawn args [
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'
gyp info spawn args ]
�b���ѨM��פ��@���ظm�@�ӱM�סC�Y�n�ҥΥ���ظm�A�зs�W "/m" �ѼơC
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets\Microsoft.Cpp.WindowsSDK.targets(46,5): error MSB8036: �䤣�� Windows SDK ���� 10.0.17763.0�C�w�˩һݪ� Windows SDK �����A���ܧ�b�M���ݩʭ��� SDK �����A�Φb��פW���@�U�ƹ��k��A�ÿ�� [���w��ץؼ�]�C [T:\download\kkk\node_modules\bcrypto\build\torsion.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets\Microsoft.Cpp.WindowsSDK.targets(46,5): error MSB8036: �䤣�� Windows SDK ���� 10.0.17763.0�C�w�˩һݪ� Windows SDK �����A���ܧ�b�M���ݩʭ��� SDK �����A�Φb��פW���@�U�ƹ��k��A�ÿ�� [���w��ץؼ�]�C [T:\download\kkk\node_modules\bcrypto\build\secp256k1.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:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Windows_NT 10.0.19041
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd T:\download\kkk\node_modules\bcrypto
gyp ERR! node -v v14.8.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

from bcrypto.

raulvictorrosa avatar raulvictorrosa commented on June 20, 2024

Find here guys, for me setting python to version 2 worked.

npm config set python /usr/bin/python2

after run yarn install

https://stackoverflow.com/questions/29673365/fails-to-build-node-package-due-to-python

from bcrypto.

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.