lucasjones / cpuminer-multi

Multi-algo CPUMiner & Reference Cryptonote Miner (JSON-RPC 2.0)
Other
638 stars 1.5k forks source link

undef: _freshhash #38

Closed foxinni closed 6 years ago

foxinni commented 7 years ago

After quite some tinkering it's seems I have unique error right at the end of my make process. Something about _freshhash...


make
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
Making all in compat
Making all in jansson
make[3]: Nothing to be done for 'all'.
make[3]: Nothing to be done for 'all-am'.
gcc -Ofast -flto -fuse-linker-plugin -march=native -pthread  -o minerd minerd-cpu-miner.o minerd-util.o minerd-sha2.o minerd-scrypt.o minerd-keccak.o minerd-heavy.o minerd-quark.o minerd-skein.o minerd-ink.o minerd-blake.o minerd-cryptonight.o minerd-fresh.o minerd-x11.o minerd-x13.o minerd-x14.o minerd-x15.o sha3/minerd-sph_keccak.o sha3/minerd-sph_hefty1.o sha3/minerd-sph_groestl.o sha3/minerd-sph_skein.o sha3/minerd-sph_bmw.o sha3/minerd-sph_jh.o sha3/minerd-sph_shavite.o sha3/minerd-sph_blake.o sha3/minerd-sph_luffa.o sha3/minerd-sph_cubehash.o sha3/minerd-sph_simd.o sha3/minerd-sph_echo.o sha3/minerd-sph_hamsi.o sha3/minerd-sph_fugue.o sha3/minerd-sph_shabal.o sha3/minerd-sph_whirlpool.o crypto/minerd-oaes_lib.o crypto/minerd-c_keccak.o crypto/minerd-c_groestl.o crypto/minerd-c_blake256.o crypto/minerd-c_jh.o crypto/minerd-c_skein.o crypto/minerd-hash.o crypto/minerd-aesb.o  minerd-sha2-x64.o minerd-scrypt-x64.o minerd-aesb-x64.o  -L/usr/local/Cellar/curl/7.53.1/lib -lcurl -lldap -lz compat/jansson/libjansson.a -lpthread  -lcrypto
clang: warning: argument unused during compilation: '-pthread'
undef: _freshhash
Undefined symbols for architecture x86_64:
  "_freshhash", referenced from:
      _miner_thread in lto.o
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]: *** [minerd] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2```

Any ideas?
jaredallard commented 7 years ago

Running into this too...

After getting curl & openssl to work, sucks to be stopped here.

lucasjones commented 7 years ago

Ah I think I see the issue you're running into, the function freshhash here should be static inline, otherwise the compiler will expect another non-inline version of the function, which doesn't exist - leading to the "Undefined symbols" error.

Can you try recompiling it with this change? (I've updated the dev branch)

jaredallard commented 7 years ago

I just removed fresh.c and it's references. I'll check it out in a bit when I'm not on a bus.

jaredallard commented 7 years ago

On this topic... Would it be useful to submit a PR with instructions on how to make this work on Mac?

lucasjones commented 7 years ago

Yeah, go for it, sounds like that could be helpful for some people

lucasjones commented 7 years ago

If there are any other major issues you run into during compilation let me know, ideally not too much extra work should be required to compile on OS X

zone117x commented 7 years ago

@lucasjones Hey could you Skype or email me? I need your advice on a project and I have no idea how to get a hold of you! Apologies for making an comment here unrelated to the issue. Wish github had a private message feature :p

elisaado commented 6 years ago

Had this too on ARM, fixed by

I just removed fresh.c and it's references.

Neuroelectric86 commented 4 years ago

On this topic... Would it be useful to submit a PR with instructions on how to make this work on Mac?

Are any instructions for Mac?

soha1410 commented 3 years ago

On this topic... Would it be useful to submit a PR with instructions on how to make this work on Mac?

Are any instructions for Mac?

Ah I think I see the issue you're running into, the function freshhash here should be static inline, otherwise the compiler will expect another non-inline version of the function, which doesn't exist - leading to the "Undefined symbols" error.

Can you try recompiling it with this change? (I've updated the dev branch)

this works for me on Big Sur.

Neuroelectric86 commented 3 years ago

Yea, I couldn't get it good hashrates

On Saturday, August 21, 2021, saeed seyyed hashemi @.***> wrote:

On this topic... Would it be useful to submit a PR with instructions on how to make this work on Mac?

Are any instructions for Mac?

Ah I think I see the issue you're running into, the function freshhash here https://github.com/lucasjones/cpuminer-multi/blob/4c9b1e4a5fa2fd6ae755e0a1a87dc3bfd187415f/fresh.c#L14 should be static inline, otherwise the compiler will expect another non-inline version of the function, which doesn't exist - leading to the "Undefined symbols" error.

Can you try recompiling it with this change? (I've updated the dev branch)

this works for me on Big Sur.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lucasjones/cpuminer-multi/issues/38#issuecomment-903115465, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANRTXUOW6E3KKN2VVYL2THTT56RT5ANCNFSM4DCDKQAA .