HOW TO COMPILE THE UFASOFT SSE2 ASM MINER IN 64 BIT DEBIAN/UBUNTUI already wrote this then a stray alt/ctrl key + mouse wheel threw me thru ffox's history POST trapdoor and I lost my whole !*@&# post. So redoing here what i JUST wrote. GRRR!!!
1) be root and make a dir to create a 32bit environment in:
sudo bash
mkdir /root/32bit-debian-sid-20110529
cd /root/32bit-debian-sid-20110529
2) debootstrap a 32 bit debian sid (unstable/latest) image into it:
debootstrap --verbose --arch=i386 sid . http://ftp.us.debian.org/debian
takes 3-15 minutes depending on speed to internet cpu, disk etc. Feel free to change mirrors, etc. (Ftp.ca.debian.org in canada, .uk in uk, etc etc.)
(Yes you can debootstrap an ubuntu image, but since its a standalone environment, debian will be fine. Sides it's better
Any binaries from it will run fine in ubuntu anyway).
3) chroot into the dir, now you're in a 32 bit environment, and install some tools:
chroot .
apt-get update
apt-get install gcc gcc-4.5 g++ g++-4.5 libstdc++6-4.5-dev libpcre3-dev libcurl3-dev make less
4) make sure you have the jwasm zip file downloaded from somewhere:
17:06 < math>
http://www.japheth.de/JWasm.html (more up to date source than most)
copy the JWASM from it into somewhere on your path as 'jwasm' (lowercase important), you might need to extend
your path. Dont embarass yourself by putting it in /usr/bin, it'll make admins cry (and breaks package management).
At worst put it in /usr/local/bin and add that to your path!
unzip *zip
mkdir /root/bin
PATH=$PATH:~/bin
export PATH
cp JWASM ~/bin/jwasm
chmod +x ~/bin/jwasm
~/bin/jwasm
(last line makes sure its executable. make sure it is!)
5) go into the ufasoft source dir and configure it for compilation:
cd ufasoft_bitcoin-miner-0.10/
./configure
if you have issues, reply here for help. Configure is pretty good about telling you what you're missing.
6) now the makefiles are created but have a buncha x86-64 specific stuff. Need to change that to i386.
This command will do that and show the changes, should be only 2 lines (turned out to be easier than I
thought, didnt need to fool ld, needed to fool jwasm!)
sed -e 's/^CFLAGS.*$/CFLAGS = -m32 -g -O2/' -e 's/^JASMFLAGS.*$/JASMFLAGS = -3 -elf/' < Makefile > Makefile.new
mv Makefile Makefile.old
mv Makefile.new Makefile
diff -W 80 -y --suppress-common-lines Makefile{.old,}
7) COMPILE!!
Should take like 10-15s on modern hardware. You DO have modern hardware right? Or you're wasting your money mining... )
(tho anyone without a gpu is anyway.. hell i think using ANY CPu based mining is probably a waste of extra power
)
now you have a ./bitcoin-miner binary. feel free to strip it down to make it smaller:
9) This will run in this chroot 32 bit environment just fine, but in the 64bit environment you'll need these
packages for 32bit compat: (remember to exit the chroot first with 'exit' to get back to the 64 bit environ)
apt-get install ia32-libs ia32-libs-gtk lib32gcc1 lib32stdc++6 lib32z1 libc6-i386
Running
shouldnt say 'missing' for any libraries. If they are, try installing apt-file and apt-file search the library name to find what pkg to install.
10) now run the UFASOFT sse2 ASM miner!
./bitcoin-miner -t 8 -g no -v -o http://user:password@localhost:8332/
-t 8 needed (despite -h help's claim to be auto max # cores) to use 8 cores (on my 4 core x HT Core i7 960),
-g no because i dont see any extra speed with the GPU (sides, the gpu-specific clients like Phoenix are far better)
-o user:password @ localhost:8332 cuz thats where my client is
On my Core i7 960 3.2Ghz 4core + HT I get about 14-15MH/s while my phoenix GPU miner runs too (which seems to use one whole core for python, which I dont like/get - but ill ask in another thread appropriate)
10) No one should use untrusted binaries on the internet. People could steal your hash efforts, or otherwise. I havent done so, but dont trust in general..
Nonetheless, my binary compilation is here:
http://sizone.org/~math/bitcoin/ufa11) Because I've now increased the hash rate of the market, Ill be earning fewer coins! Please donate in exchange!
mathx -- 1BTFUtEscdizVPGiqrKhpy5s6QiQ4nNemC -- thanks for the Donations!