Open Wayho opened 6 years ago
salv
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.
cpuminer-util.o:util.c:(.text+0x3966): more undefined references to curl_easy_setopt' follow cpuminer-util.o: In function
stratum_connect':
util.c:(.text+0x3a98): undefined reference to curl_easy_perform' util.c:(.text+0x3acc): undefined reference to
curl_easy_cleanup'
cpuminer-util.o: In function stratum_disconnect': util.c:(.text+0x3b21): undefined reference to
curl_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
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
Static miner for 64-bit and 32-bit... https://github.com/lotus1313/xmrig
./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!