bcrypto icon indicating copy to clipboard operation
bcrypto copied to clipboard

Implicitly declaring library function memcpy... on MacOS 10.15.7

Open timi-codes opened this issue 4 years ago • 6 comments
trafficstars

I'm tried to run gpk rebuild rebuild from the /build of the bcrypto because bcrypto.node is missing in the build directory. Here is the error I'm getting.

image

Related to https://github.com/handshake-org/hnsd/issues/28

timi-codes avatar Jan 22 '21 13:01 timi-codes

Having a similar issue, where 'npm rebuild' is reporting errors.

Screen Shot 2021-02-11 at 2 44 09 PM Screen Shot 2021-02-11 at 2 45 06 PM

XCode Version 12.4 (12D4e)

stevebanik avatar Feb 11 '21 20:02 stevebanik

It worked for me after installing running brew update && brew install gmp

timi-codes avatar Feb 26 '21 16:02 timi-codes

Would everyone in this thread mind telling me what versions of everything they have? I tried running a bigger matrix in github actions here: https://github.com/pinheadmz/bcrypto/runs/2015142067 and everything passed. GitHub actions does have OSX version 11 ("Big Sur") available but its in private beta, so...

os: [windows-latest, macos-10.14, macos-10.15, ubuntu-latest]
node: [12.x, 14.x, 15.x]

For example my home system is a bit old but bcrypto compiles fine:

$ node --version
v12.18.0

$ npm --version
6.14.4

$ uname -a
Darwin   18.7.0 Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64 x86_64

$ clang --version
Apple clang version 11.0.0 (clang-1100.0.33.8)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

(of course, we could actually just fix the implicit declaration, but I'm more concerned about how system upgrades are breaking bcrypto)

Everyone try a clean install as well:

$ git clone https://github.com/bcoin-org/bcrypto
$ cd bcrypto
$ npm install

pinheadmz avatar Mar 02 '21 17:03 pinheadmz

stacktrace:xmrig-6.8.2 stacktrace$ node --version v15.8.0 stacktrace:xmrig-6.8.2 stacktrace$ npm --version 7.5.0 stacktrace:xmrig-6.8.2 stacktrace$ uname -a Darwin stacktrace.lan 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:06:51 PST 2021; root:xnu-7195.81.3~1/RELEASE_ARM64_T8101 arm64 stacktrace:xmrig-6.8.2 stacktrace$ clang --version objc[8694]: Class AMSupportURLConnectionDelegate is implemented in both ?? (0x1f1e04188) and ?? (0x1159602b8). One of the two will be used. Which one is undefined. objc[8694]: Class AMSupportURLSession is implemented in both ?? (0x1f1e041d8) and ?? (0x115960308). One of the two will be used. Which one is undefined. Apple clang version 12.0.0 (clang-1200.0.32.29) Target: arm64-apple-darwin20.3.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin stacktrace:xmrig-6.8.2 stacktrace$ cd ~ stacktrace:~ stacktrace$ git clone https://github.com/bcoin-org/bcrypto Cloning into 'bcrypto'... remote: Enumerating objects: 901, done. remote: Counting objects: 100% (901/901), done. remote: Compressing objects: 100% (431/431), done. remote: Total 25008 (delta 553), reused 702 (delta 435), pack-reused 24107 Receiving objects: 100% (25008/25008), 23.94 MiB | 5.31 MiB/s, done. Resolving deltas: 100% (19317/19317), done. stacktrace:~ stacktrace$ cd bcrypto/ stacktrace:bcrypto stacktrace$ npm install

[email protected] install node-gyp rebuild

gyp info it worked if it ends with ok gyp info using [email protected] gyp info using [email protected] | darwin | arm64 gyp info find Python using Python version 3.9.1 found at "/opt/homebrew/opt/[email protected]/bin/python3.9" gyp info spawn /opt/homebrew/opt/[email protected]/bin/python3.9 gyp info spawn args [ gyp info spawn args '/opt/homebrew/lib/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 'make', gyp info spawn args '-I', gyp info spawn args '/Users/stacktrace/bcrypto/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/Users/stacktrace/Library/Caches/node-gyp/15.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=/Users/stacktrace/Library/Caches/node-gyp/15.8.0', gyp info spawn args '-Dnode_gyp_dir=/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/Users/stacktrace/Library/Caches/node-gyp/15.8.0/<(target_arch)/node.lib', gyp info spawn args '-Dmodule_root_dir=/Users/stacktrace/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 'build', gyp info spawn args '-Goutput_dir=.' gyp info spawn args ] gyp info spawn make gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] CC(target) Release/obj.target/torsion/deps/torsion/src/aead.o CC(target) Release/obj.target/torsion/deps/torsion/src/asn1.o CC(target) Release/obj.target/torsion/deps/torsion/src/cipher.o CC(target) Release/obj.target/torsion/deps/torsion/src/drbg.o CC(target) Release/obj.target/torsion/deps/torsion/src/dsa.o CC(target) Release/obj.target/torsion/deps/torsion/src/ecc.o CC(target) Release/obj.target/torsion/deps/torsion/src/encoding.o CC(target) Release/obj.target/torsion/deps/torsion/src/entropy/env.o CC(target) Release/obj.target/torsion/deps/torsion/src/entropy/hw.o CC(target) Release/obj.target/torsion/deps/torsion/src/entropy/sys.o CC(target) Release/obj.target/torsion/deps/torsion/src/hash.o CC(target) Release/obj.target/torsion/deps/torsion/src/ies.o CC(target) Release/obj.target/torsion/deps/torsion/src/internal.o CC(target) Release/obj.target/torsion/deps/torsion/src/kdf.o CC(target) Release/obj.target/torsion/deps/torsion/src/mac.o CC(target) Release/obj.target/torsion/deps/torsion/src/mpi.o CC(target) Release/obj.target/torsion/deps/torsion/src/rand.o CC(target) Release/obj.target/torsion/deps/torsion/src/rsa.o CC(target) Release/obj.target/torsion/deps/torsion/src/stream.o CC(target) Release/obj.target/torsion/deps/torsion/src/util.o LIBTOOL-STATIC Release/torsion.a CC(target) Release/obj.target/secp256k1/deps/secp256k1/contrib/lax_der_parsing.o CC(target) Release/obj.target/secp256k1/deps/secp256k1/src/secp256k1.o LIBTOOL-STATIC Release/secp256k1.a CC(target) Release/obj.target/bcrypto/src/bcrypto.o SOLINK_MODULE(target) Release/bcrypto.node gyp info ok

added 4 packages, and audited 5 packages in 25s

found 0 vulnerabilities npm notice npm notice New minor version of npm available! 7.5.0 -> 7.6.0 npm notice Changelog: https://github.com/npm/cli/releases/tag/v7.6.0 npm notice Run npm install -g [email protected] to update! npm notice stacktrace:bcrypto stacktrace$

stevebanik avatar Mar 02 '21 20:03 stevebanik

@stevebanik so you're good? Doesn't look like an issue for you anymore.

pinheadmz avatar Mar 22 '21 16:03 pinheadmz

It worked for me after installing running brew update && brew install gmp

this worked for me :) not really sure why. would love to know how you got to this solution please?

yashutanna avatar May 04 '21 12:05 yashutanna