I get these linker errors when making an attempt to construct cgminer
in Mac OS 12.3.1
for antminer s2
with these choices:
./autogeh.sh
export CFLAGS="-O2"
./configure --enable-ants2
Undefined symbols for structure arm64:
"_opt_bitmain_auto", referenced from:
_opt_config_table in cgminer-cgminer.o
"_opt_bitmain_beeper", referenced from:
_opt_config_table in cgminer-cgminer.o
"_opt_bitmain_checkall", referenced from:
_opt_config_table in cgminer-cgminer.o
"_opt_bitmain_checkn2diff", referenced from:
_opt_config_table in cgminer-cgminer.o
"_opt_bitmain_hwerror", referenced from:
_opt_config_table in cgminer-cgminer.o
"_opt_bitmain_overheat", referenced from:
_opt_config_table in cgminer-cgminer.o
"_opt_bitmain_temp", referenced from:
_opt_config_table in cgminer-cgminer.o
"_opt_bitmain_tempoverctrl", referenced from:
_opt_config_table in cgminer-cgminer.o
"_opt_bitmain_workdelay", referenced from:
_opt_config_table in cgminer-cgminer.o
"_set_bitmain_fan", referenced from:
_opt_config_table in cgminer-cgminer.o
ld: image(s) not discovered for structure arm64
I’ve added --enable-bitmain
however nonetheless get the identical error.
I used to be in a position to make use of this codebase to construct for the Gekko miner with --enable-gekko
so the codebase is in tact and works. I’ve seemed contained in the supply code and these variables are outlined inside driver-bitmain.c
. When wanting on the output of make
there’s a cgminer-driver-bitmain.o
object file inbuilt ccan
so I am guessing that driver-bitmain.c
is picked-up, and but it seems it isn’t. The codebase I am utilizing is from https://github.com/vthoang/cgminer.git
which is the codebase utilized by the gekko miner.
Making all in ccan
CC choose/libccan_a-helpers.o
CC choose/libccan_a-opt.o
CC choose/libccan_a-parse.o
CC choose/libccan_a-usage.o
AR libccan.a
CC cgminer-cgminer.o
CC cgminer-util.o
CC cgminer-sha2.o
CC cgminer-api.o
CC cgminer-logging.o
CC cgminer-klist.o
CC cgminer-noncedup.o
CC cgminer-driver-bitmain.o
CCLD cgminer
Can anybody assist me make sense of this / how you can make this compile with the --enable-ants2
choice? I am both not configuring the surroundings effectively (very seemingly) or the make course of is damaged (unlikely). Right here is the output of make:
/Library/Developer/CommandLineTools/usr/bin/make all-recursive
Making all in lib
GEN c++defs.h
GEN arg-nonnull.h
GEN warn-on-use.h
GEN sign.h
GEN string.h
/Library/Developer/CommandLineTools/usr/bin/make all-recursive
CC dummy.o
CC memmem.o
AR libgnu.a
Making all in compat
Making all in jansson-2.9
/Library/Developer/CommandLineTools/usr/bin/make all-recursive
Making all in doc
make[5]: Nothing to be completed for `all'.
Making all in src
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT dump.lo -MD -MP -MF .deps/dump.Tpo -c -o dump.lo dump.c
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT error.lo -MD -MP -MF .deps/error.Tpo -c -o error.lo error.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT error.lo -MD -MP -MF .deps/error.Tpo -c error.c -fno-common -DPIC -o .libs/error.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT dump.lo -MD -MP -MF .deps/dump.Tpo -c dump.c -fno-common -DPIC -o .libs/dump.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT error.lo -MD -MP -MF .deps/error.Tpo -c error.c -o error.o >/dev/null 2>&1
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT dump.lo -MD -MP -MF .deps/dump.Tpo -c dump.c -o dump.o >/dev/null 2>&1
mv -f .deps/error.Tpo .deps/error.Plo
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT hashtable.lo -MD -MP -MF .deps/hashtable.Tpo -c -o hashtable.lo hashtable.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT hashtable.lo -MD -MP -MF .deps/hashtable.Tpo -c hashtable.c -fno-common -DPIC -o .libs/hashtable.o
mv -f .deps/dump.Tpo .deps/dump.Plo
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT hashtable_seed.lo -MD -MP -MF .deps/hashtable_seed.Tpo -c -o hashtable_seed.lo hashtable_seed.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT hashtable_seed.lo -MD -MP -MF .deps/hashtable_seed.Tpo -c hashtable_seed.c -fno-common -DPIC -o .libs/hashtable_seed.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT hashtable.lo -MD -MP -MF .deps/hashtable.Tpo -c hashtable.c -o hashtable.o >/dev/null 2>&1
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT hashtable_seed.lo -MD -MP -MF .deps/hashtable_seed.Tpo -c hashtable_seed.c -o hashtable_seed.o >/dev/null 2>&1
mv -f .deps/hashtable_seed.Tpo .deps/hashtable_seed.Plo
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT load.lo -MD -MP -MF .deps/load.Tpo -c -o load.lo load.c
mv -f .deps/hashtable.Tpo .deps/hashtable.Plo
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT reminiscence.lo -MD -MP -MF .deps/reminiscence.Tpo -c -o reminiscence.lo reminiscence.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT load.lo -MD -MP -MF .deps/load.Tpo -c load.c -fno-common -DPIC -o .libs/load.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT reminiscence.lo -MD -MP -MF .deps/reminiscence.Tpo -c reminiscence.c -fno-common -DPIC -o .libs/reminiscence.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT reminiscence.lo -MD -MP -MF .deps/reminiscence.Tpo -c reminiscence.c -o reminiscence.o >/dev/null 2>&1
mv -f .deps/reminiscence.Tpo .deps/reminiscence.Plo
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT pack_unpack.lo -MD -MP -MF .deps/pack_unpack.Tpo -c -o pack_unpack.lo pack_unpack.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT load.lo -MD -MP -MF .deps/load.Tpo -c load.c -o load.o >/dev/null 2>&1
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT pack_unpack.lo -MD -MP -MF .deps/pack_unpack.Tpo -c pack_unpack.c -fno-common -DPIC -o .libs/pack_unpack.o
mv -f .deps/load.Tpo .deps/load.Plo
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT strbuffer.lo -MD -MP -MF .deps/strbuffer.Tpo -c -o strbuffer.lo strbuffer.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT strbuffer.lo -MD -MP -MF .deps/strbuffer.Tpo -c strbuffer.c -fno-common -DPIC -o .libs/strbuffer.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT pack_unpack.lo -MD -MP -MF .deps/pack_unpack.Tpo -c pack_unpack.c -o pack_unpack.o >/dev/null 2>&1
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT strbuffer.lo -MD -MP -MF .deps/strbuffer.Tpo -c strbuffer.c -o strbuffer.o >/dev/null 2>&1
mv -f .deps/strbuffer.Tpo .deps/strbuffer.Plo
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT strconv.lo -MD -MP -MF .deps/strconv.Tpo -c -o strconv.lo strconv.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT strconv.lo -MD -MP -MF .deps/strconv.Tpo -c strconv.c -fno-common -DPIC -o .libs/strconv.o
mv -f .deps/pack_unpack.Tpo .deps/pack_unpack.Plo
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT utf.lo -MD -MP -MF .deps/utf.Tpo -c -o utf.lo utf.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT strconv.lo -MD -MP -MF .deps/strconv.Tpo -c strconv.c -o strconv.o >/dev/null 2>&1
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT utf.lo -MD -MP -MF .deps/utf.Tpo -c utf.c -fno-common -DPIC -o .libs/utf.o
mv -f .deps/strconv.Tpo .deps/strconv.Plo
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT worth.lo -MD -MP -MF .deps/worth.Tpo -c -o worth.lo worth.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT utf.lo -MD -MP -MF .deps/utf.Tpo -c utf.c -o utf.o >/dev/null 2>&1
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT worth.lo -MD -MP -MF .deps/worth.Tpo -c worth.c -fno-common -DPIC -o .libs/worth.o
mv -f .deps/utf.Tpo .deps/utf.Plo
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -O2 -MT worth.lo -MD -MP -MF .deps/worth.Tpo -c worth.c -o worth.o >/dev/null 2>&1
mv -f .deps/worth.Tpo .deps/worth.Plo
/bin/sh ../libtool --tag=CC --mode=hyperlink gcc -Wall -Wextra -Wdeclaration-after-statement -O2 -no-undefined -export-symbols-regex '^json_' -version-info 13:0:9 -o libjansson.la -rpath /usr/native/lib dump.lo error.lo hashtable.lo hashtable_seed.lo load.lo reminiscence.lo pack_unpack.lo strbuffer.lo strconv.lo utf.lo worth.lo
libtool: hyperlink: /usr/bin/nm -B .libs/dump.o .libs/error.o .libs/hashtable.o .libs/hashtable_seed.o .libs/load.o .libs/reminiscence.o .libs/pack_unpack.o .libs/strbuffer.o .libs/strconv.o .libs/utf.o .libs/worth.o | sed -n -e 's/^.*[ ]([BCDEGRST][BCDEGRST]*)[ ][ ]*_([_A-Za-z][_A-Za-z0-9]*)$/1 _2 2/p' | sed '/ __gnu_lto/d' | /usr/bin/sed 's/.* //' | type | uniq > .libs/libjansson.exp
libtool: hyperlink: /usr/bin/grep -E -e "^json_" ".libs/libjansson.exp" > ".libs/libjansson.expT"
libtool: hyperlink: mv -f ".libs/libjansson.expT" ".libs/libjansson.exp"
libtool: hyperlink: sed 's|^|_|' < .libs/libjansson.exp > .libs/libjansson-symbols.expsym
libtool: hyperlink: gcc -dynamiclib -o .libs/libjansson.4.dylib .libs/dump.o .libs/error.o .libs/hashtable.o .libs/hashtable_seed.o .libs/load.o .libs/reminiscence.o .libs/pack_unpack.o .libs/strbuffer.o .libs/strconv.o .libs/utf.o .libs/worth.o -O2 -install_name /usr/native/lib/libjansson.4.dylib -compatibility_version 14 -current_version 14.0 -Wl,-single_module -Wl,-exported_symbols_list,.libs/libjansson-symbols.expsym
libtool: hyperlink: (cd ".libs" && rm -f "libjansson.dylib" && ln -s "libjansson.4.dylib" "libjansson.dylib")
libtool: hyperlink: ar cru .libs/libjansson.a dump.o error.o hashtable.o hashtable_seed.o load.o reminiscence.o pack_unpack.o strbuffer.o strconv.o utf.o worth.o
libtool: hyperlink: ranlib .libs/libjansson.a
libtool: hyperlink: ( cd ".libs" && rm -f "libjansson.la" && ln -s "../libjansson.la" "libjansson.la" )
Making all in check
Making all in bin
make[6]: Nothing to be completed for `all'.
Making all in suites
Making all in api
make[7]: Nothing to be completed for `all'.
make[7]: Nothing to be completed for `all-am'.
make[6]: Nothing to be completed for `all-am'.
make[3]: Nothing to be completed for `all-am'.
Making all in ccan
CC choose/libccan_a-helpers.o
CC choose/libccan_a-opt.o
CC choose/libccan_a-parse.o
CC choose/libccan_a-usage.o
AR libccan.a
CC cgminer-cgminer.o
CC cgminer-util.o
util.c:3583:31: warning: tackle of operate 'interrupted' will at all times consider to 'true' [-Wpointer-bool-conversion]
else if (unlikely(ret < 0 && interrupted))
~~ ^~~~~~~~~~~
./miner.h:203:45: word: expanded from macro 'unlikely'
#outline unlikely(expr) (__builtin_expect(!!(expr), 0))
^~~~
util.c:3583:31: word: prefix with the address-of operator to silence this warning
else if (unlikely(ret < 0 && interrupted))
^
&
./miner.h:203:45: word: expanded from macro 'unlikely'
#outline unlikely(expr) (__builtin_expect(!!(expr), 0))
^
util.c:3583:31: word: suffix with parentheses to show this right into a operate name
util.c:3595:31: warning: tackle of operate 'interrupted' will at all times consider to 'true' [-Wpointer-bool-conversion]
else if (unlikely(ret < 0 && interrupted))
~~ ^~~~~~~~~~~
./miner.h:203:45: word: expanded from macro 'unlikely'
#outline unlikely(expr) (__builtin_expect(!!(expr), 0))
^~~~
util.c:3595:31: word: prefix with the address-of operator to silence this warning
else if (unlikely(ret < 0 && interrupted))
^
&
./miner.h:203:45: word: expanded from macro 'unlikely'
#outline unlikely(expr) (__builtin_expect(!!(expr), 0))
^
util.c:3595:31: word: suffix with parentheses to show this right into a operate name
2 warnings generated.
CC cgminer-sha2.o
CC cgminer-api.o
CC cgminer-logging.o
CC cgminer-klist.o
CC cgminer-noncedup.o
CC cgminer-driver-bitmain.o
CCLD cgminer
Undefined symbols for structure arm64:
"_opt_bitmain_auto", referenced from:
_opt_config_table in cgminer-cgminer.o
"_opt_bitmain_beeper", referenced from:
_opt_config_table in cgminer-cgminer.o
"_opt_bitmain_checkall", referenced from:
_opt_config_table in cgminer-cgminer.o
"_opt_bitmain_checkn2diff", referenced from:
_opt_config_table in cgminer-cgminer.o
"_opt_bitmain_hwerror", referenced from:
_opt_config_table in cgminer-cgminer.o
"_opt_bitmain_overheat", referenced from:
_opt_config_table in cgminer-cgminer.o
"_opt_bitmain_temp", referenced from:
_opt_config_table in cgminer-cgminer.o
"_opt_bitmain_tempoverctrl", referenced from:
_opt_config_table in cgminer-cgminer.o
"_opt_bitmain_workdelay", referenced from:
_opt_config_table in cgminer-cgminer.o
"_set_bitmain_fan", referenced from:
_opt_config_table in cgminer-cgminer.o
ld: image(s) not discovered for structure arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [cgminer] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2