Author

Topic: static cpuminer / cpuminer-opt compilation? (Read 197 times)

newbie
Activity: 23
Merit: 0
November 24, 2017, 09:59:46 AM
#2
Replying to myself - I've found a very good howto which explains how to build a static version of cpuminer:

https://lxadm.com/Static_compilation_of_cpuminer
newbie
Activity: 23
Merit: 0
November 24, 2017, 08:07:15 AM
#1
I'm trying to build a static binary for cpuminer-opt, however, it fails in curl.

Does anyone know how to make a static cpuminer-opt binary?

Code:
g++  -O3 -march=native -Wall -std=gnu++11 -static -L/usr/local/lib  -static -L/usr/local/lib  -o cpuminer cpuminer-cpu-miner.o cpuminer-util.o cpuminer-uint256.o cpuminer-api.o cpuminer-sysinfos.o cpuminer-algo-gate-api.o algo/groestl/cpuminer-sph_groestl.o algo/bmw/cpuminer-sph_bmw.o algo/shavite/cpuminer-sph_shavite.o algo/shavite/cpuminer-shavite.o algo/echo/cpuminer-sph_echo.o algo/heavy/cpuminer-sph_hefty1.o algo/luffa/cpuminer-sph_luffa.o algo/cubehash/cpuminer-sph_cubehash.o algo/simd/cpuminer-sph_simd.o algo/hamsi/cpuminer-sph_hamsi.o algo/fugue/cpuminer-sph_fugue.o algo/gost/cpuminer-sph_gost.o algo/jh/cpuminer-sph_jh.o algo/sha/cpuminer-sph_sha2.o algo/sha/cpuminer-sph_sha2big.o algo/shabal/cpuminer-sph_shabal.o algo/sm3/cpuminer-sm3.o algo/whirlpool/cpuminer-sph_whirlpool.o crypto/cpuminer-blake2s.o crypto/cpuminer-oaes_lib.o crypto/cpuminer-c_keccak.o crypto/cpuminer-c_groestl.o crypto/cpuminer-c_blake256.o crypto/cpuminer-c_jh.o crypto/cpuminer-c_skein.o crypto/cpuminer-hash.o crypto/cpuminer-aesb.o crypto/cpuminer-magimath.o algo/argon2/cpuminer-argon2a.o algo/argon2/ar2/cpuminer-argon2.o algo/argon2/ar2/cpuminer-opt.o algo/argon2/ar2/cpuminer-cores.o algo/argon2/ar2/cpuminer-ar2-scrypt-jane.o algo/argon2/ar2/cpuminer-blake2b.o algo/cpuminer-axiom.o algo/blake/cpuminer-sph_blake.o algo/blake/cpuminer-blake-hash-4way.o algo/blake/cpuminer-blake-gate.o algo/blake/cpuminer-blake.o algo/blake/cpuminer-blake-4way.o algo/blake/cpuminer-sph_blake2b.o algo/blake/cpuminer-blake2b.o algo/blake/cpuminer-blake2s.o algo/blake/cpuminer-mod_blakecoin.o algo/blake/cpuminer-blakecoin.o algo/blake/cpuminer-decred.o algo/blake/cpuminer-pentablake.o algo/bmw/cpuminer-bmw256.o algo/cubehash/sse2/cpuminer-cubehash_sse2.o algo/cryptonight/cpuminer-cryptolight.o algo/cryptonight/cpuminer-cryptonight-common.o algo/cryptonight/cpuminer-cryptonight-aesni.o algo/cryptonight/cpuminer-cryptonight.o algo/cpuminer-drop.o algo/echo/aes_ni/cpuminer-hash.o algo/cpuminer-fresh.o algo/groestl/cpuminer-groestl.o algo/groestl/cpuminer-myr-groestl.o algo/groestl/aes_ni/cpuminer-hash-groestl.o algo/groestl/aes_ni/cpuminer-hash-groestl256.o algo/haval/cpuminer-haval.o algo/heavy/cpuminer-heavy.o algo/heavy/cpuminer-bastion.o algo/cpuminer-hmq1725.o algo/hodl/cpuminer-aes.o algo/hodl/cpuminer-hodl-gate.o algo/hodl/cpuminer-hodl-wolf.o algo/hodl/cpuminer-sha512_avx.o algo/hodl/cpuminer-sha512_avx2.o algo/jh/cpuminer-jha.o algo/keccak/cpuminer-sph_keccak.o algo/keccak/cpuminer-keccak.o algo/keccak/cpuminer-keccak-hash-4way.o algo/keccak/cpuminer-keccak-4way.o algo/keccak/cpuminer-keccak-gate.o algo/keccak/sse2/cpuminer-keccak.o algo/cpuminer-lbry.o algo/luffa/cpuminer-luffa.o algo/luffa/sse2/cpuminer-luffa_for_sse2.o algo/lyra2/cpuminer-lyra2.o algo/lyra2/cpuminer-sponge.o algo/lyra2/cpuminer-lyra2rev2.o algo/lyra2/cpuminer-lyra2re.o algo/lyra2/cpuminer-zcoin.o algo/lyra2/cpuminer-lyra2z330.o algo/cpuminer-m7m.o algo/cpuminer-neoscrypt.o algo/cpuminer-nist5.o algo/cpuminer-pluck.o algo/polytimos/cpuminer-polytimos-gate.o algo/polytimos/cpuminer-polytimos.o algo/quark/cpuminer-quark.o algo/qubit/cpuminer-qubit.o algo/qubit/cpuminer-deep.o algo/ripemd/cpuminer-sph_ripemd.o algo/cpuminer-scrypt.o algo/scryptjane/cpuminer-scrypt-jane.o algo/sha/cpuminer-sha2.o algo/sha/cpuminer-sha256t.o algo/simd/sse2/cpuminer-nist.o algo/simd/sse2/cpuminer-vector.o algo/skein/cpuminer-sph_skein.o algo/skein/cpuminer-skein-hash-4way.o algo/skein/cpuminer-skein.o algo/skein/cpuminer-skein-4way.o algo/skein/cpuminer-skein-gate.o algo/skein/cpuminer-skein2.o algo/skein/cpuminer-skein2-4way.o algo/skein/cpuminer-skein2-gate.o algo/cpuminer-skunk.o algo/tiger/cpuminer-sph_tiger.o algo/cpuminer-timetravel.o algo/cpuminer-timetravel10.o algo/cpuminer-tribus.o algo/cpuminer-veltor.o algo/whirlpool/cpuminer-whirlpool.o algo/whirlpool/cpuminer-whirlpoolx.o algo/x11/cpuminer-phi1612.o algo/x11/cpuminer-x11.o algo/x11/cpuminer-x11evo.o algo/x11/cpuminer-x11gost.o algo/x11/cpuminer-c11.o algo/x13/cpuminer-x13.o algo/x13/cpuminer-x13sm3.o algo/x14/cpuminer-x14.o algo/x15/cpuminer-x15.o algo/x17/cpuminer-x17.o algo/cpuminer-xevan.o algo/yescrypt/cpuminer-yescrypt.o algo/yescrypt/cpuminer-sha256_Y.o algo/yescrypt/cpuminer-yescrypt-simd.o algo/cpuminer-zr5.o asm/cpuminer-neoscrypt_asm.o  asm/cpuminer-sha2-x64.o asm/cpuminer-scrypt-x64.o asm/cpuminer-aesb-x64.o   compat/jansson/libjansson.a -lpthread  -lssl -lcrypto -lgmp 
cpuminer-cpu-miner.o: In function `longpoll_thread':
cpu-miner.c:(.text+0x12fa): undefined reference to `curl_easy_init'
cpu-miner.c:(.text+0x1664): undefined reference to `curl_easy_cleanup'
cpuminer-cpu-miner.o: In function `workio_thread':
cpu-miner.c:(.text+0x290a): undefined reference to `curl_easy_init'
cpu-miner.c:(.text+0x2975): undefined reference to `curl_easy_cleanup'
cpuminer-cpu-miner.o: In function `show_version_and_exit':
cpu-miner.c:(.text+0x68a4): undefined reference to `curl_version'
cpuminer-cpu-miner.o: In function `main':
cpu-miner.c:(.text.startup+0x20f): undefined reference to `curl_global_init'
cpuminer-util.o: In function `json_rpc_call':
util.c:(.text+0xf43): undefined reference to `curl_easy_setopt'
util.c:(.text+0xf5e): undefined reference to `curl_easy_setopt'
util.c:(.text+0xf74): undefined reference to `curl_easy_setopt'
util.c:(.text+0xf8a): undefined reference to `curl_easy_setopt'
util.c:(.text+0xf9b): undefined reference to `curl_easy_setopt'
cpuminer-util.o:util.c:(.text+0xfaf): more undefined references to `curl_easy_setopt' follow
cpuminer-util.o: In function `json_rpc_call':
util.c:(.text+0x1176): undefined reference to `curl_slist_append'
util.c:(.text+0x1181): undefined reference to `curl_slist_append'
util.c:(.text+0x1190): undefined reference to `curl_slist_append'
util.c:(.text+0x119f): undefined reference to `curl_slist_append'
util.c:(.text+0x11b6): undefined reference to `curl_easy_setopt'
util.c:(.text+0x11be): undefined reference to `curl_easy_perform'
util.c:(.text+0x1501): undefined reference to `curl_slist_free_all'
util.c:(.text+0x1509): undefined reference to `curl_easy_reset'
util.c:(.text+0x163a): undefined reference to `curl_easy_setopt'
util.c:(.text+0x1658): undefined reference to `curl_easy_setopt'
util.c:(.text+0x1678): undefined reference to `curl_easy_setopt'
util.c:(.text+0x18bb): undefined reference to `curl_slist_free_all'
util.c:(.text+0x18c3): undefined reference to `curl_easy_reset'
util.c:(.text+0x18fe): undefined reference to `curl_easy_getinfo'
cpuminer-util.o: In function `json_load_url':
util.c:(.text+0x1a40): undefined reference to `curl_easy_init'
util.c:(.text+0x1a5e): undefined reference to `curl_easy_setopt'
util.c:(.text+0x1a72): undefined reference to `curl_easy_setopt'
util.c:(.text+0x1a86): undefined reference to `curl_easy_setopt'
util.c:(.text+0x1a98): undefined reference to `curl_easy_setopt'
util.c:(.text+0x1aac): undefined reference to `curl_easy_setopt'
cpuminer-util.o:util.c:(.text+0x1ac0): more undefined references to `curl_easy_setopt' follow
cpuminer-util.o: In function `json_load_url':
util.c:(.text+0x1b25): undefined reference to `curl_easy_perform'
util.c:(.text+0x1b58): undefined reference to `curl_easy_cleanup'
util.c:(.text+0x1be0): undefined reference to `curl_easy_setopt'
util.c:(.text+0x1c52): undefined reference to `curl_easy_setopt'
cpuminer-util.o: In function `stratum_connect':
util.c:(.text+0x3179): undefined reference to `curl_easy_cleanup'
util.c:(.text+0x317e): undefined reference to `curl_easy_init'
util.c:(.text+0x3236): undefined reference to `curl_easy_setopt'
util.c:(.text+0x324a): undefined reference to `curl_easy_setopt'
util.c:(.text+0x325e): undefined reference to `curl_easy_setopt'
util.c:(.text+0x3270): undefined reference to `curl_easy_setopt'
util.c:(.text+0x3284): undefined reference to `curl_easy_setopt'
cpuminer-util.o:util.c:(.text+0x3298): more undefined references to `curl_easy_setopt' follow
cpuminer-util.o: In function `stratum_connect':
util.c:(.text+0x333b): undefined reference to `curl_easy_perform'
util.c:(.text+0x335f): undefined reference to `curl_easy_cleanup'
util.c:(.text+0x3390): undefined reference to `curl_easy_setopt'
cpuminer-util.o: In function `stratum_disconnect':
util.c:(.text+0x3422): undefined reference to `curl_easy_cleanup'
cpuminer-util.o: In function `stratum_handle_method':
util.c:(.text+0x4f41): undefined reference to `curl_easy_cleanup'
collect2: error: ld returned 1 exit status
Makefile:1397: recipe for target 'cpuminer' failed
make[2]: *** [cpuminer] Error 1
make[2]: Leaving directory '/home/cpuminer/cpuminer-opt-master'
Makefile:3772: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/cpuminer/cpuminer-opt-master'
Makefile:696: recipe for target 'all' failed
make: *** [all] Error 2
strip: 'cpuminer': No such file
Jump to: