lucasjones / cpuminer-multi

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

static build #90

Open Wayho opened 6 years ago

Wayho commented 6 years ago

./configure CFLAGS="-static" checking for curl-config... /usr/bin/curl-config checking for the version of libcurl... 7.47.0 checking for libcurl >= version 7.15.2... yes checking whether libcurl is usable... no configure: error: Missing required libcurl >= 7.15.2

./configure CFLAGS="-static" LDFLAGS="-L/usr/local/lib/x86_64-linux-gnu/libcurl.a" LIBS="-lssl -lcrypto -lssl -lcrypto -lz" CFLAGS="-DCURL_STATICLIB" NO ERRORS!

saguiferpa commented 6 years ago

salv

mtl1979 commented 6 years ago

In the second example you are replacing previous value of CFLAGS... All environment variables should be set before "./configure" instead of after... just changing CFLAGS and LDFLAGS doesn't actually instruct configure to configure for a static build.

f0r34chb3t4 commented 6 years ago

cpuminer-util.o:util.c:(.text+0x3966): more undefined references to curl_easy_setopt' follow cpuminer-util.o: In functionstratum_connect': util.c:(.text+0x3a98): undefined reference to curl_easy_perform' util.c:(.text+0x3acc): undefined reference tocurl_easy_cleanup' cpuminer-util.o: In function stratum_disconnect': util.c:(.text+0x3b21): undefined reference tocurl_easy_cleanup' collect2: error: ld returned 1 exit status Makefile:912: recipe for target 'cpuminer' failed make[2]: [cpuminer] Error 1 make[2]: Leaving directory '/root/cpuminer-multi' Makefile:2602: recipe for target 'all-recursive' failed make[1]: [all-recursive] Error 1 make[1]: Leaving directory '/root/cpuminer-multi' Makefile:574: recipe for target 'all' failed make: *** [all] Error 2

DarrenRainey commented 6 years ago

after allot of work I was able to make a static binary.

You need to manually edit the make file and replace a few options with -lcurl after statically compiling libcurl

ghost commented 5 years ago

Static miner for 64-bit and 32-bit... https://github.com/lotus1313/xmrig