-
Notifications
You must be signed in to change notification settings - Fork 304
Howto Compile cudaminer
NickLeippe edited this page Feb 3, 2014
·
7 revisions
copied from Helium3's post with a guide for Xubuntu
Install Xubuntu 13.10 (it's the same as Ubuntu but uses Xfce window manager) - http://xubuntu.org/
[Install base packages - open a terminal window from X]
sudo apt-get install openssh-server
sudo apt-get install vim
sudo apt-get install screen
[Download latest NVIDIA driver from nvidia.com - get the .run file]
[Optional: ssh into box - failing that, press CTRL-ALT-F1 to switch to a terminal window from X]
sudo service lightdm stop
sudo ./NVIDIA-Linux-x86_64-331.38.run [[change for current driver version]]
sudo vim /etc/modprobe.d/nvidia-graphics-drivers.conf
[Populate the following file with following information: ]
# Ensure the manual driver and kernel module is used
blacklist nouveau
blacklist lbm-nouveau
blacklist nvidia-173
blacklist nvidia-96
blacklist nvidia-current
blacklist nvidia-173-updates
blacklist nvidia-96-updates
alias nvidia nvidia_current_updates
alias nouveau off
alias lbm-nouveau off
[Recreate the initrd file: ]
sudo update-initramfs -u
[Reboot ]
sudo shutdown -r now
[Check you're running the right driver. Once booted into X, from a terminal run:
nvidia-settings
(or from a pure command shell "nvidia-settings --version")
[Get the CUDA toolkit from the developer.nvidia.com website]
mkdir cuda-extract
./cuda_5.5.22_linux_64.run --extract=~/cuda-extract/
cd cuda-extract
sudo sh ./cuda-linux64-rel-5.5.22-16488124.run
sudo vim /etc/ld.so.conf.d/cuda_settings.conf
[Add these two lines: ]
/usr/local/cuda-5.5/lib64
/usr/local/cuda-5.5/lib
[Rebuild the library data config]
sudo ldconfig
[Add the CUDA bin directory to your path]
echo PATH="$PATH:/usr/local/cuda-5.5/bin" >> ~/.profile
[Install all the various bits you'll need to build CUDAminer]
sudo apt-get install automake
sudo apt-get install curl
sudo apt-get install libcurl3
sudo apt-get install libcurl3:i386
sudo apt-get install libcurl3-gnutls-dev
sudo apt-get install gcc
sudo apt-get install g++
[NOTE: If you install Xubuntu 32bit, you can skip the libcurl3:i386. ]
[NOTE: If you install Xubuntu 64bit, you might also need libc6:i386 & libc++6:i386 but I don't think so]
[Grab Cudaminer from github via git or get the zip and unzip it. Then cd into the root Cudaminer dir]
./autogen.sh
./configure
make
[All of the above should hopefully work]
./cudaminer --help
./cudaminer --benchmark
[*** Optional, disable X from running at start-up ***]
sudo vim /etc/default/grub
[look for this line: ]
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
[change it to: ]
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash text"
[save and exit, then update grub ]
sudo update-grub
sudo shutdown -r now
-
set your system to use gcc 4.6:
check with:
gcc-config -l
set with:
gcc-config n
wheren
is the entry with 4.6.x version -
emerge nvidia packages (unmask as necessary-you want cuda 5.5.x packages):
emerge -atv nvidia-cuda-sdk nvidia-cuda-toolkit nvidia-drivers nvidia-settings
-
emerge git:
emerge dev-vcs/git
-
clone the cudaminer git repo:
git clone https://github.com/cbuchner1/CudaMiner.git
-
compile it:
cd CudaMiner
./autogen.sh ./configure --with-cuda=/opt/cuda make -j8 # assuming you have 8 core cpu
### to update
1. clear your local sandbox:
`git checkout .`
1. update your repo:
```
git fetch
# if you built a specific version earlier, first go back to master before merging with: git checkout master
git merge origin/master
1. save your previous binary (you can always rebuild it if you know git :) )
`cp cudaminer cudaminer.bak`
1. recompile:
```
make clean
# optional--build a specific version, eg a release--do: git checkout <tagname|sha>
./autogen.sh
./configure --with-cuda=/opt/cuda
make -j8 # assuming you have 8 core cpu