cpuminer-multi icon indicating copy to clipboard operation
cpuminer-multi copied to clipboard

Does this work on Apple M1 chip??

Open ebbsanchez opened this issue 3 years ago • 5 comments

After I run ./build.sh, it gives me this. i've been trouble shoot for hours but can't get a work around. I'm pretty sure i have gcc installed and compiler worked.


Making clean in compat
Making clean in jansson
test -z "libjansson.a" || rm -f libjansson.a
rm -f *.o
make[2]: Nothing to be done for `clean-am'.
test -z "cpuminer" || rm -f cpuminer
rm -f *.o
rm -f algo/*.o
rm -f asm/*.o
rm -f compat/*.o
rm -f crypto/*.o
rm -f lyra2/*.o
rm -f sha3/*.o
rm -f yescrypt/*.o
configure.ac:4: warning: The macro `AC_CANONICAL_SYSTEM' is obsolete.
configure.ac:4: You should run autoupdate.
./lib/autoconf/general.m4:2081: AC_CANONICAL_SYSTEM is expanded from...
configure.ac:4: the top level
configure.ac:15: warning: The macro `AC_PROG_CC_C99' is obsolete.
configure.ac:15: You should run autoupdate.
./lib/autoconf/c.m4:1659: AC_PROG_CC_C99 is expanded from...
configure.ac:15: the top level
configure.ac:23: warning: The macro `AC_HEADER_STDC' is obsolete.
configure.ac:23: You should run autoupdate.
./lib/autoconf/headers.m4:704: AC_HEADER_STDC is expanded from...
configure.ac:23: the top level
checking build system type... aarch64-apple-darwin20.3.0
checking host system type... aarch64-apple-darwin20.3.0
checking target system type... aarch64-apple-darwin20.3.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/Users/jacklin/Documents/min_bin/cpuminer-multi':
configure: error: C compiler cannot create executables
See `config.log' for more details
/bin/sh ./config.status --recheck
/bin/sh: ./config.status: No such file or directory
make: *** [config.status] Error 127
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: can't open file: cpuminer (No such file or directory)

I've tried ./configure CFLAGS="-arch x86_64" CXXFLAGS="-arch x86_64" --with-crypto=/opt/homebrew/opt/[email protected] --with-curl

I'm not sure this is right, i'm not familiar with c compiling. but this will give me

...
checking for EVP_DigestFinal_ex in -lcrypto... no
configure: error: OpenSSL crypto library required

OpenSSL is also installed... is there anything I can do?

ebbsanchez avatar Apr 04 '21 14:04 ebbsanchez

It looks like gcc isn't working for the selected architecture. I don't have a Mac (M1 or otherwise) to test; is that architecture definitely correct?

litecoincash-project avatar May 24 '21 12:05 litecoincash-project

@litecoincash-project If you need temporary access to an Apple M1 to develop, I can give you access with a .pub authorized_user blurb from you.

risner avatar Jul 27 '21 14:07 risner

Were you able to solve this problem?

ikolubr avatar Oct 23 '21 16:10 ikolubr

In build.sh, change -march=native to -mcpu=apple-m1 Boom Screen Shot 2021-10-23 at 2 34 23 PM !

ikolubr avatar Oct 23 '21 18:10 ikolubr

Снимок экрана 2021-12-15 в 04 40 06

dropdeadrus avatar Dec 15 '21 17:12 dropdeadrus