genesismining / sgminer-gm

A multi-algo GPU miner
GNU General Public License v3.0
340 stars 146 forks source link

Multiple undefined reference errors while compiling sgminer-sg on Arch #59

Open ghost opened 7 years ago

ghost commented 7 years ago

Hello! I have this error compiling sgminer-sg on Arch Linux.

…
 CCLD     sgminer
algorithm/sgminer-qubitcoin.o: In function `qubitcoin_test':
qubitcoin.c:(.text+0x72): undefined reference to `qhash'
algorithm/sgminer-qubitcoin.o: In function `qubitcoin_regenhash':
qubitcoin.c:(.text+0xef): undefined reference to `qhash'
algorithm/sgminer-qubitcoin.o: In function `scanhash_qubitcoin':
qubitcoin.c:(.text+0x15b): undefined reference to `qhash'
algorithm/sgminer-quarkcoin.o: In function `quarkcoin_test':
quarkcoin.c:(.text+0x32): undefined reference to `quarkhash'
algorithm/sgminer-quarkcoin.o: In function `quarkcoin_regenhash':
quarkcoin.c:(.text+0xaf): undefined reference to `quarkhash'
algorithm/sgminer-quarkcoin.o: In function `scanhash_quarkcoin':
quarkcoin.c:(.text+0x11b): undefined reference to `quarkhash'
algorithm/sgminer-animecoin.o: In function `animecoin_test':
animecoin.c:(.text+0x32): undefined reference to `animehash'
algorithm/sgminer-animecoin.o: In function `animecoin_regenhash':
animecoin.c:(.text+0xaf): undefined reference to `animehash'
algorithm/sgminer-animecoin.o: In function `scanhash_animecoin':
animecoin.c:(.text+0x11b): undefined reference to `animehash'
algorithm/sgminer-sifcoin.o: In function `sifcoin_test':
sifcoin.c:(.text+0x32): undefined reference to `sifhash'
algorithm/sgminer-sifcoin.o: In function `sifcoin_regenhash':
sifcoin.c:(.text+0xaf): undefined reference to `sifhash'
algorithm/sgminer-sifcoin.o: In function `scanhash_sifcoin':
sifcoin.c:(.text+0x11b): undefined reference to `sifhash'
algorithm/sgminer-twecoin.o: In function `twecoin_test':
twecoin.c:(.text+0x32): undefined reference to `twehash'
algorithm/sgminer-twecoin.o: In function `twecoin_regenhash':
twecoin.c:(.text+0xaf): undefined reference to `twehash'
algorithm/sgminer-twecoin.o: In function `scanhash_twecoin':
twecoin.c:(.text+0x11b): undefined reference to `twehash'
algorithm/sgminer-marucoin.o: In function `marucoin_test':
marucoin.c:(.text+0xc2): undefined reference to `maruhash'
algorithm/sgminer-marucoin.o: In function `marucoin_regenhash':
marucoin.c:(.text+0x13f): undefined reference to `maruhash'
algorithm/sgminer-marucoin.o: In function `scanhash_marucoin':
marucoin.c:(.text+0x1ab): undefined reference to `maruhash'
algorithm/sgminer-talkcoin.o: In function `talkcoin_test':
talkcoin.c:(.text+0x72): undefined reference to `talkhash'
algorithm/sgminer-talkcoin.o: In function `talkcoin_regenhash':
talkcoin.c:(.text+0xef): undefined reference to `talkhash'
algorithm/sgminer-talkcoin.o: In function `scanhash_talkcoin':
talkcoin.c:(.text+0x15b): undefined reference to `talkhash'
algorithm/sgminer-bitblock.o: In function `bitblock_test':
bitblock.c:(.text+0xd2): undefined reference to `bitblockhash'
algorithm/sgminer-bitblock.o: In function `bitblock_regenhash':
bitblock.c:(.text+0x14f): undefined reference to `bitblockhash'
algorithm/sgminer-bitblock.o: In function `scanhash_bitblock':
bitblock.c:(.text+0x1bb): undefined reference to `bitblockhash'
algorithm/sgminer-x14.o: In function `x14_test':
x14.c:(.text+0xd2): undefined reference to `x14hash'
algorithm/sgminer-x14.o: In function `x14_regenhash':
x14.c:(.text+0x14f): undefined reference to `x14hash'
algorithm/sgminer-x14.o: In function `scanhash_x14':
x14.c:(.text+0x1bb): undefined reference to `x14hash'
algorithm/sgminer-fresh.o: In function `fresh_test':
fresh.c:(.text+0x82): undefined reference to `freshHash'
algorithm/sgminer-fresh.o: In function `fresh_regenhash':
fresh.c:(.text+0xff): undefined reference to `freshHash'
algorithm/sgminer-fresh.o: In function `scanhash_fresh':
fresh.c:(.text+0x16b): undefined reference to `freshHash'
algorithm/sgminer-lyra2re.o: In function `lyra2re_regenhash':
lyra2re.c:(.text+0x19f): undefined reference to `lyra2rehash'
algorithm/sgminer-lyra2rev2.o: In function `lyra2rev2_regenhash':
lyra2rev2.c:(.text+0x20f): undefined reference to `lyra2rev2hash'
algorithm/sgminer-pluck.o: In function `pluck_test':
pluck.c:(.text+0x1e72): undefined reference to `pluckrehash'
algorithm/sgminer-pluck.o: In function `pluck_regenhash':
pluck.c:(.text+0x1eef): undefined reference to `pluckrehash'
algorithm/sgminer-pluck.o: In function `scanhash_pluck':
pluck.c:(.text+0x1f5b): undefined reference to `pluckrehash'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:854: sgminer] Error 1
make[2]: Leaving directory '/home/flomop/sgminer-gm'
make[1]: *** [Makefile:1720: all-recursive] Error 1
make[1]: Leaving directory '/home/flomop/sgminer-gm'
make: *** [Makefile:662: all] Error 2

Any ideas?

ghost commented 7 years ago

As suggested in this comment https://github.com/genesismining/sgminer-gm/issues/56#issuecomment-313542946 I managed to compile it, removing inline statement in every corresponding .c file in algorithm folder.

YellowOnion commented 7 years ago

$ sed -i 's/^inline //g' algorithm/*

Works like a charm.

elisaado commented 6 years ago

@YellowOnion Thank you so much!

theassyrian commented 6 years ago

@YellowOnion Thanks bro solved mine also !

ab1jx commented 4 years ago

Yes, sed is probably worth learning for times like this, I wouldn't have thought of it. This only takes out lines beginning with inline though. Same problem with novaspirit's sgminer, it didn't fix that. There's some library missing which contains all these functions, which is also missing from the documentation. Whoever wrote this probably didn't realize they were still accessing it.