diodechain / diode_client

Diode client written in GO that runs the Blockquick™ algorithm and a socks server to transmit data through diodechain.
https://diode.io/download
Other
65 stars 23 forks source link

M1 MAC Arm compile Dependency Error #104

Closed jimthedj65 closed 1 year ago

jimthedj65 commented 1 year ago

Compiling on an Apple Mac M1 Max starting with openssl, we get an error which is resolved. sudo make openssl go mod download bash "/Users/james/go/pkg/mod/github.com/diodechain/openssl@v1.0.20/install_openssl.sh" Build and install openssl...... --2022-11-28 11:56:13-- https://www.openssl.org/source/openssl-1.1.1k.tar.gz Resolving www.openssl.org (www.openssl.org)... 104.70.110.18 Connecting to www.openssl.org (www.openssl.org)|104.70.110.18|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 9823400 (9.4M) [application/x-gzip] Saving to: ‘openssl-1.1.1k.tar.gz’

openssl-1.1.1k.tar. 100%[===================>] 9.37M 4.19MB/s in 2.2s

2022-11-28 11:56:16 (4.19 MB/s) - ‘openssl-1.1.1k.tar.gz’ saved [9823400/9823400]

/Users/james/go/pkg/mod/github.com/diodechain/openssl@v1.0.20/install_openssl.sh: line 13: sha256sum: command not found make: *** [openssl] Error 1

resolved by brew install coreutils sudo ln -s /usr/local/bin/gsha256sum /usr/local/bin/sha256sum

When moving to the next step of compiling diode and executing a test, we get a dependency error highlighted below in bold.

make test returns ╰─➤ make test go test -race github.com/diodechain/diode_client/accounts/abi github.com/diodechain/diode_client/blockquick github.com/diodechain/diode_client/command github.com/diodechain/diode_client/config github.com/diodechain/diode_client/contract github.com/diodechain/diode_client/crypto github.com/diodechain/diode_client/crypto/bn256 github.com/diodechain/diode_client/crypto/bn256/cloudflare github.com/diodechain/diode_client/crypto/bn256/google github.com/diodechain/diode_client/crypto/ecies github.com/diodechain/diode_client/crypto/secp256k1 github.com/diodechain/diode_client/db github.com/diodechain/diode_client/edge github.com/diodechain/diode_client/rlp github.com/diodechain/diode_client/rpc github.com/diodechain/diode_client/staticserver github.com/diodechain/diode_client/util

github.com/diodechain/diode_client/crypto/bn256/cloudflare

**crypto/bn256/cloudflare/gfp_arm64.s:109: illegal or missing addressing mode for symbol R18 asm: assembly of crypto/bn256/cloudflare/gfp_arm64.s failed**

@knusperhaus commented on twitter that this is a known dependency issue. https://github.com/cloudflare/bn256/issues/5

github.com/diodechain/openssl

shim.c:76:12: warning: assigning to 'char ' from 'unsigned char ' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign] ok github.com/diodechain/diode_client/accounts/abi (cached) ? github.com/diodechain/diode_client/blockquick [no test files] ? github.com/diodechain/diode_client/command [no test files] ? github.com/diodechain/diode_client/config [no test files] ? github.com/diodechain/diode_client/contract [no test files] ? github.com/diodechain/diode_client/crypto [no test files] FAIL github.com/diodechain/diode_client/crypto/bn256/cloudflare [build failed] ok github.com/diodechain/diode_client/crypto/bn256/google (cached) ok github.com/diodechain/diode_client/crypto/ecies (cached) ok github.com/diodechain/diode_client/crypto/secp256k1 (cached) ok github.com/diodechain/diode_client/db (cached) ok github.com/diodechain/diode_client/edge (cached) ok github.com/diodechain/diode_client/rlp (cached) ok github.com/diodechain/diode_client/rpc (cached) ok github.com/diodechain/diode_client/staticserver (cached) ok github.com/diodechain/diode_client/util (cached) make: *** [test] Error 2

Resolution is pending resolving the dependency issue with bn256 code.

jimthedj65 commented 1 year ago

resolved with https://github.com/diodechain/diode_client/pull/105