MyHush / hush

Hush is a fork of Zcash focused on secure communications
https://myhush.org
Other
67 stars 37 forks source link

./zcutil/build-mac.sh problem #130

Closed leto closed 5 years ago

leto commented 6 years ago

Describe the issue

macOS 10.13.4 (17E199)

checking whether we are cross compiling... no
checking for suffix of object files... configure: error: in `/Users/jonathanleto/git/hush':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details

Can you reliably reproduce the issue?

Yes

If so, please list the steps to reproduce below:

  1. Checkout dev branch (I used b1806a7)
  2. ./zcutil/build-mac.sh
  3. Observe error

Expected behaviour

The compile succeeds and I get a working hushd.

Actual behaviour + errors

More output:

configure:3975: checking for suffix of object files
configure:3997: /Library/Developer/CommandLineTools/usr/bin/clang++ -mmacosx-version-min=10.8 -stdlib=libc++ -c -pipe -O2 -arch x86_64 -I/usr/local/Cellar/gcc5/5.4.0/include/c++/5.4.0 -I$PREFIX/include -fwrapv -fno-strict-aliasing -Werror -g -Wl,-undefined -Wl,dynamic_lookup -I/Users/jonathanleto/git/hush/depends/x86_64-apple-darwin17.5.0/share/../include/ -I/Users/jonathanleto/git/hush/depends/x86_64-apple-darwin17.5.0/include -arch x86_64 conftest.cpp >&5
clang: error: -Wl,-undefined: 'linker' input unused [-Werror,-Wunused-command-line-argument]
clang: error: -Wl,dynamic_lookup: 'linker' input unused [-Werror,-Wunused-command-line-argument]
configure:4001: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Hush"
| #define PACKAGE_TARNAME "hush"
| #define PACKAGE_VERSION "1.0.14"
| #define PACKAGE_STRING "Hush 1.0.14"
| #define PACKAGE_BUGREPORT "https://github.com/MyHush/hush/issues"
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:4015: error: in `/Users/jonathanleto/git/hush':
configure:4017: error: cannot compute suffix of object files: cannot compile
$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.1.0 (clang-902.0.39.1)
Target: x86_64-apple-darwin17.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

@FireMartZ @radix42 any idea about this?

leto commented 6 years ago

Latest komodo dev branch does not seem to have this problem, in case that helps

FireMartZ commented 6 years ago

I'm using this https://github.com/FireMartZ/hush-apple/tree/v1.0.14h to compile for Mac.

Edit hush-apple/zcash/Makefile to adjust the REPO and VERSION (branch) on lines 6 and 7.

leto commented 6 years ago

@FireMartZ thanks for the heads up!! I am giving that a look.

Since komodo.git has the latest Zcash upstream merged in (up to 1.0.14-ish), it seems that build-mac.sh should work, but perhaps it was broken in the 1.0.15 merge you just did? I am now trying build-mac.sh on 1.0.14-dev branch and it seems to be getting further

leto commented 6 years ago

I can confirm that 72e2e60fe8 on 1.0.14-dev branch worked on macOS 10.13.4, using only ./zcutil/build-mac.sh . Perhaps we can grab some fixes from KMD to make the latest dev branch work on Mac

FireMartZ commented 6 years ago

I can give it a look, but ./zcutil/build-mac.sh disadvantage is that the binaries are not portable (they depend on brew), while the "hush-apple" way makes a portable binaries.

leto commented 6 years ago

It turns out that 1.0.14-dev was actually just a local branch on my machine that didn't actually have 1.0.14 merged in yet, so I am now trying the dev branch, which I don't think has had 1.0.15 merged in yet