JayDDee / cpuminer-opt

Optimized multi algo CPU miner
Other
775 stars 545 forks source link

Libcurl should be a mandatory dependency in configure #126

Closed ghost closed 6 years ago

ghost commented 6 years ago

Without running --with-curl the generated Makefile will not contain -lcurl in the LDFLAGS. This should be mandatory, since the miner requires it to compile.

https://github.com/JayDDee/cpuminer-opt/blob/dd5e5523572b56905da55cec24640c74d2163d2c/configure#L6061-L6066

Effect:

cpuminer-cpu-miner.o: In function `longpoll_thread':
~/cpuminer-opt/cpu-miner.c:2080: undefined reference to `curl_easy_init'
~/cpuminer-opt/cpu-miner.c:2199: undefined reference to `curl_easy_cleanup'
cpuminer-cpu-miner.o: In function `workio_thread':
~/cpuminer-opt/cpu-miner.c:1410: undefined reference to `curl_easy_init'
~/cpuminer-opt/cpu-miner.c:1447: undefined reference to `curl_easy_cleanup'
cpuminer-cpu-miner.o: In function `show_version_and_exit':
~/cpuminer-opt/cpu-miner.c:2515: undefined reference to `curl_version'
cpuminer-cpu-miner.o: In function `main':
~/cpuminer-opt/cpu-miner.c:3261: undefined reference to `curl_global_init'
cpuminer-util.o: In function `json_load_url':
~/cpuminer-opt/util.c:631: undefined reference to `curl_easy_init'
~/cpuminer-opt/util.c:636: undefined reference to `curl_easy_setopt'
~/cpuminer-opt/util.c:637: undefined reference to `curl_easy_setopt'
~/cpuminer-opt/util.c:638: undefined reference to `curl_easy_setopt'
~/cpuminer-opt/util.c:639: undefined reference to `curl_easy_setopt'
~/cpuminer-opt/util.c:640: undefined reference to `curl_easy_setopt'
cpuminer-util.o:~/cpuminer-opt/util.c:641: more undefined references to `curl_easy_setopt' follow
cpuminer-util.o: In function `json_load_url':
~/cpuminer-opt/util.c:655: undefined reference to `curl_easy_perform'
~/cpuminer-opt/util.c:667: undefined reference to `curl_easy_cleanup'
~/cpuminer-opt/util.c:651: undefined reference to `curl_easy_setopt'
~/cpuminer-opt/util.c:653: undefined reference to `curl_easy_setopt'
cpuminer-util.o: In function `stratum_connect':
~/cpuminer-opt/util.c:1137: undefined reference to `curl_easy_cleanup'
~/cpuminer-opt/util.c:1138: undefined reference to `curl_easy_init'
~/cpuminer-opt/util.c:1161: undefined reference to `curl_easy_setopt'
~/cpuminer-opt/util.c:1162: undefined reference to `curl_easy_setopt'
~/cpuminer-opt/util.c:1163: undefined reference to `curl_easy_setopt'
~/cpuminer-opt/util.c:1164: undefined reference to `curl_easy_setopt'
~/cpuminer-opt/util.c:1165: undefined reference to `curl_easy_setopt'
cpuminer-util.o:~/cpuminer-opt/util.c:1166: more undefined references to `curl_easy_setopt' follow
cpuminer-util.o: In function `stratum_connect':
~/cpuminer-opt/util.c:1181: undefined reference to `curl_easy_perform'
~/cpuminer-opt/util.c:1184: undefined reference to `curl_easy_cleanup'
~/cpuminer-opt/util.c:1160: undefined reference to `curl_easy_setopt'
cpuminer-util.o: In function `stratum_disconnect':
~/cpuminer-opt/util.c:1201: undefined reference to `curl_easy_cleanup'
cpuminer-util.o: In function `json_rpc_call':
~/cpuminer-opt/util.c:464: undefined reference to `curl_easy_setopt'
~/cpuminer-opt/util.c:466: undefined reference to `curl_easy_setopt'
~/cpuminer-opt/util.c:468: undefined reference to `curl_easy_setopt'
~/cpuminer-opt/util.c:470: undefined reference to `curl_easy_setopt'
~/cpuminer-opt/util.c:471: undefined reference to `curl_easy_setopt'
cpuminer-util.o:~/cpuminer-opt/util.c:472: more undefined references to `curl_easy_setopt' follow
cpuminer-util.o: In function `json_rpc_call':
~/cpuminer-opt/util.c:511: undefined reference to `curl_slist_append'
~/cpuminer-opt/util.c:512: undefined reference to `curl_slist_append'
~/cpuminer-opt/util.c:513: undefined reference to `curl_slist_append'
~/cpuminer-opt/util.c:514: undefined reference to `curl_slist_append'
~/cpuminer-opt/util.c:518: undefined reference to `curl_easy_setopt'
~/cpuminer-opt/util.c:520: undefined reference to `curl_easy_perform'
~/cpuminer-opt/util.c:611: undefined reference to `curl_slist_free_all'
~/cpuminer-opt/util.c:612: undefined reference to `curl_easy_reset'
~/cpuminer-opt/util.c:484: undefined reference to `curl_easy_setopt'
~/cpuminer-opt/util.c:463: undefined reference to `curl_easy_setopt'
~/cpuminer-opt/util.c:498: undefined reference to `curl_easy_setopt'
~/cpuminer-opt/util.c:620: undefined reference to `curl_slist_free_all'
~/cpuminer-opt/util.c:621: undefined reference to `curl_easy_reset'
~/cpuminer-opt/util.c:524: undefined reference to `curl_easy_getinfo'
collect2: error: ld returned 1 exit status
Makefile:1834: recipe for target 'cpuminer' failed
make[2]: *** [cpuminer] Error 1
make[2]: Leaving directory '~/cpuminer-opt'
Makefile:5697: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '~/cpuminer-opt'
Makefile:906: recipe for target 'all' failed
make: *** [all] Error 2
JayDDee commented 6 years ago

Do you have a solution?

g1itch commented 6 years ago

I used this patch and autoreconf earlier.

JayDDee commented 6 years ago

@g1itch Thanks for the input. I'm a newbie with autoconf but it looks like your patch will only report an error if curl is missing, It doesn't appear to eliminate the need to specify ./configure --with-curl.

JayDDee commented 6 years ago

No solution was offered.