hey @Alko89
i keep getting node-gyp rebuild failures when i follow instructions posted around here.
i tried npm install bcoin, which appeared to give me what filip got in the setup lecture; however, running the address.js script threw an error about being unable to find bcrypto.node. when i try manually moving files/folders into bcoin or node_modules and retry, then i usually get something like can’t find bcoin module.
there was a mac specific tutorial up above us somewhere here, but that’s no longer hosted, the script you suggested that involved python gave me the heeby jeebies because last time i installed python it took me a week, and your more recent points seem specific to windows/ubuntu
the main error i keep getting:
clang: error: no such file or directory: ‘1/Library/Caches/node-gyp/14.18.0/include/node’
clang: error: no such file or directory: ‘1/Library/Caches/node-gyp/14.18.0/src’
clang: error: no such file or directory: ‘1/Library/Caches/node-gyp/14.18.0/deps/openssl/config’
clang: error: no such file or directory: ‘1/Library/Caches/node-gyp/14.18.0/deps/openssl/openssl/include’
clang: error: no such file or directory: ‘1/Library/Caches/node-gyp/14.18.0/deps/uv/include’
clang: error: no such file or directory: ‘1/Library/Caches/node-gyp/14.18.0/deps/zlib’
clang: error: no such file or directory: ‘1/Library/Caches/node-gyp/14.18.0/deps/v8/include’
make: *** [Release/obj.target/torsion/deps/torsion/src/aead.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:400:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:282:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild”
gyp ERR! cwd /Users/weakuser 1/Documents/crypto training/BTC scripting/bcoin/node_modules/bcoin/node_modules/bcrypto
gyp ERR! node -v v14.18.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
if you have any other pointers, i’ll be glad to try them
thanks for considering
edits:
found somewhere that i might have to use
sudo apt-get install build-essential
but apt-get not found
then i realized the computer isn’t escaping the space in my user name … in what file can i manually specify the file-location?
commetnary from the nake-file in the bcrypto folder:
# We have to do some pretty insane escaping to get those backslashes
# and dollar signs past make, the shell, and sed at the same time.
# Doesn't work with spaces, but that's fine: .d files have spaces in
# their names replaced with other characters.
define fixup_dep
# The depfile may not exist if the input file didn't have any #includes.
touch $(depfile).raw
# Fixup path as in (1).
sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile)
# Add extra rules as in (2).
# We remove slashes and replace spaces with new lines;
# remove blank lines;
# delete the first line and append a colon to the remaining lines.
sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\
grep -v '^$$' |\
sed -e 1d -e 's|$$|:|' \
>> $(depfile)
rm $(depfile).raw
endef
changing the config.gypi file’s “nadedir” field to just escape the space from there did NOT work…
changing every instance of a space i could find in that folder did NOT work either…
in the documentation, there is this piece of info
## Requirements
- Linux, macOS, or Windows (\*)
- node.js >=v10.0.0
- gpk >= v2 or npm >= v6
- python2 or python3 (for node-gyp)
- gcc/g++ (for leveldb/bdb and secp256k1/bcrypto)
- git
(\*): Note that Bcoin works best with unix-like OSes, and has not yet been
thoroughly tested on Windows. The BSDs and Solaris have also not been tested
yet, but should work in theory.
maybe this is too advanced for me