HTMLCOIN / HTML5

The HTML5 Coin Repository
32 stars 19 forks source link

Make doesn't work on Mac #15

Closed dakrulski closed 6 years ago

dakrulski commented 6 years ago
$ make
Making all in src
  CXX      crypto/libbitcoinconsensus_la-aes.lo
  CXX      crypto/libbitcoinconsensus_la-chacha20.lo
  CXX      crypto/libbitcoinconsensus_la-ripemd160.lo
  CXX      crypto/libbitcoinconsensus_la-sha1.lo
  CXX      crypto/libbitcoinconsensus_la-sha256.lo
  CXX      crypto/libbitcoinconsensus_la-sha512.lo
  CXX      libbitcoinconsensus_la-arith_uint256.lo
  CXX      consensus/libbitcoinconsensus_la-merkle.lo
  CXX      libbitcoinconsensus_la-hash.lo
  CXX      primitives/libbitcoinconsensus_la-block.lo
  CXX      primitives/libbitcoinconsensus_la-transaction.lo
  CXX      libbitcoinconsensus_la-pubkey.lo
  CXX      script/libbitcoinconsensus_la-bitcoinconsensus.lo
  CXX      script/libbitcoinconsensus_la-interpreter.lo
  CXX      script/libbitcoinconsensus_la-script.lo
  CXX      libbitcoinconsensus_la-uint256.lo
  CXXLD    libbitcoinconsensus.la
clang: warning: argument unused during compilation: '-pthread'
clang: warning: argument unused during compilation: '-pthread'
Undefined symbols for architecture x86_64:
  "_SHA512_Final", referenced from:
      HMAC_SHA512_Init(HMAC_SHA512_CTX*, void const*, unsigned long) in libbitcoinconsensus_la-hash.o
      HMAC_SHA512_Final(unsigned char*, HMAC_SHA512_CTX*) in libbitcoinconsensus_la-hash.o
     (maybe you meant: __Z17HMAC_SHA512_FinalPhP15HMAC_SHA512_CTX)
  "_SHA512_Init", referenced from:
      HMAC_SHA512_Init(HMAC_SHA512_CTX*, void const*, unsigned long) in libbitcoinconsensus_la-hash.o
     (maybe you meant: __Z16HMAC_SHA512_InitP15HMAC_SHA512_CTXPKvm)
  "_SHA512_Update", referenced from:
      HMAC_SHA512_Init(HMAC_SHA512_CTX*, void const*, unsigned long) in libbitcoinconsensus_la-hash.o
      HMAC_SHA512_Update(HMAC_SHA512_CTX*, void const*, unsigned long) in libbitcoinconsensus_la-hash.o
      HMAC_SHA512_Final(unsigned char*, HMAC_SHA512_CTX*) in libbitcoinconsensus_la-hash.o
     (maybe you meant: __Z18HMAC_SHA512_UpdateP15HMAC_SHA512_CTXPKvm)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libbitcoinconsensus.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

I followed your instructions but it doesn't build. Maybe there is something wrong with my openssl? I tried to change: -I/usr/local/opt/openssl/include to: -I/usr/local/Cellar/openssl/1.0.2n/include and: -L/usr/local/opt/openssl/lib to: -L/usr/local/Cellar/openssl/1.0.2n/lib But that doesn't help.

Bushstar commented 6 years ago

Use the depends folder provided with the source code. Just run make in the depends folder and use whatever subfolder it creates.

https://github.com/HTMLCOIN/HTMLCOIN/tree/master/depends

I think I remember having that same issue even with the depends folder and had to switch to Macports.

fogoat commented 6 years ago

The Mac binaries already exist. The DMG is the GUI. The Mac.tar.gz has the command line. I asked @bushstar to make them for us over a month ago. Look under releases and you'll see them. Worked fine for me on Marcos 10.10 and 10.12

matthewclower commented 6 years ago

Thanks! I had removed my comment because I noticed just as I posted that they are there.

hnstbndr commented 6 years ago

@Bushstar @sunk818 compiling and using the depends folder did not solve the issue for me. any ideas?

Bushstar commented 6 years ago

Two things, firstly try using this with configure including the prefix to the compiled dependencies foler...

--enable-static --disable-shared

Then run make clean and make. Complete steps should look something like the following though you will need to update the prefix to your version of the compiled deps folder.

git clone https://github.com/HTMLCOIN/HTMLCOIN.git
cd HTMLCOIN/
cd depends/
make
cd ..
rm -Rf src/cpp-ethereum/
git submodule update --init --recursive
./autogen.sh
./configure --prefix=`pwd`/depends/x86_64-apple-darwin11 --disable-tests --disable-bench --enable-static --disable-shared
make

Secondly I did hit errors myself and used Macports instead of Homebrew, if the above fails give Macports a try.