Author

Topic: Totally static compilation of jgarzic's CPU miner. (Read 3334 times)

newbie
Activity: 23
Merit: 0
Here are well written instructions for a static compilation of cpuminer:

https://lxadm.com/Static_compilation_of_cpuminer
legendary
Activity: 1148
Merit: 1008
If you want to walk on water, get out of the boat
At least if you win a lottery you win millions of $ but with cpu mining even if in 10 years you find 1 block you have only 25btc...
sr. member
Activity: 322
Merit: 250
Gabi, you don't believe in chance.

There are still non-zero probability to find block, even on cpu.
legendary
Activity: 1148
Merit: 1008
If you want to walk on water, get out of the boat
There is a reason why the last reply is from June 2011, cpu mining is dead. And gpu mining will die very soon as ASIC arrives
sr. member
Activity: 322
Merit: 250
Up!

I'm too looking for instruction to make static on x86_64 linux platform
gpa
newbie
Activity: 4
Merit: 0
BTW I forgot - if you want to run it on a machine where you do not know the # of cores :
 -t `cat /proc/cpuinfo|grep processor|wc -l`
gpa
newbie
Activity: 4
Merit: 0
I guess your minerd is not static - I would have at least used CFLAGS=-static somewhere

Anyway, try to take the last compine line and run it manually with gcc -static -Wl, -static to see if it works

I guess it won't because it will try to use the distribution curl (for some reason I don't want to spend time investigating) and mess up with the dependancies. You may want to install it in a path and remove the default one. See http://curl.haxx.se/mail/lib-2006-09/0128.html for a similar suggestion.

But all that is a waste of time. I've prepared a binary for you on :
https://rapidshare.com/files/515355188/minerd.linux.x86_64

Let me know your arch (i386.. ?) and  I will compile another static binary for you if that's not what you need.

Donations welcome :-)
newbie
Activity: 3
Merit: 0
newbie
Activity: 3
Merit: 0
I've never done this but take a look at: http://www.linuxquestions.org/questions/linux-software-2/gcc-compile-static-and-so-537575/

One of the answers suggests you need .a (archive) versions of the libraries.
I have already seen this, and yes I do have .a versions of libs.

will do a try on a computer where there are none of the libs installed, with the hope that compilation will stop saying "this is missing"...  Undecided
member
Activity: 115
Merit: 10
I've never done this but take a look at: http://www.linuxquestions.org/questions/linux-software-2/gcc-compile-static-and-so-537575/

One of the answers suggests you need .a (archive) versions of the libraries.
newbie
Activity: 3
Merit: 0
Hi there  Cheesy

I've spent hours (days, actually) on something where I still get stuck: I cann't compile this as fully static binary.

Here is how I do it:
- Got a
Code:
jgarzik-cpuminer-602e31b
directory where I expanded the archive.
- In this directory, I've downloaded source of curl, including libs,
- In curl directory, I've downloaded gnu-tls source, including libs.

Then I do:
Code:
remi@puddipuddi:~/Logiciels/jgarzik-cpuminer-602e31b/curl-7.21.0/gnutls26-2.8.6$ ./configure LDFLAGS=-static
I go into gnutls26-2.8.6/lib and give it a make:
Code:
gnutls26-2.8.6/lib$ make
Then back to curl, and I configure again:
Code:
remi@puddipuddi:~/Logiciels/jgarzik-cpuminer-602e31b/curl-7.21.0$./configure LDFLAGS=-static --disable-shared --with-gnutls LDFLAGS=-L/home/remiLogiciels/jgarzik-cpuminer-602e31b/gnutls26-2.8.6/lib
Then I make my lib curl:
Code:
curl-7.21.0/lib$ make
Then I autogen, and I configure the miner:
Code:
remi@puddipuddi:~/Logiciels/jgarzik-cpuminer-602e31b$ ./autogen
remi@puddipuddi:~/Logiciels/jgarzik-cpuminer-602e31b$ ./configure LDFLAGS=-static LDFLAGS=-L/home/remi/Logiciels/jgarzik-cpuminer-602e31b/curl-7.21.0/gnutls26-2.8.6/lib LDFLAGS=-L/home/remi/Logiciels/jgarzik-cpuminer-602e31b/curl-7.21.0/lib

Then I make it, and I get a "minerd" binary.

When I try this binary on another x86 system, this is what I get  Embarrassed
Code:
./minerd: error while loading shared libraries: libcurl-gnutls.so.4: cannot open shared object file: No such file or directory

How can I statically compile the cpu miner so that I could use "anywhere"?
Jump to: