Compiling optiminer for AMD GPUs (Ubuntu/Debian)

This tutorial illustrates how to compile the sgminer fork from Optiminer in order to start Crypto currency mining under a Ubuntu/Debian OS.

Since I took me a while to find all the necessary tools, components and instructions I documented the installation process in this tutorial.

Please let me know if something is not working for you.

Have fun and happy mining!


  • Install necessary base packages to later compile the miner software
apt-get install ocl-icd-opencl-dev libleveldb-dev libminiupnpc-dev libjsoncpp-dev git cmake libcryptopp-dev libleveldb-dev libjsoncpp-dev libjsonrpccpp-dev libboost-all-dev libgmp-dev libreadline-dev libcurl3 libcurl4-gnutls-dev opencl-headers mesa-common-dev libmicrohttpd-dev build-essential automake autoconf libssl-dev libncurses5-dev unzip
  • Download theĀ for or a newer version from [here]
  • Download the AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 file or a newer version from [here]
  • Extract the AMD APP SDK and install it into /opt
tar jxvf AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2
./ --confirm
  • Extract and install the AMD ADL SDK into /opt as well
mkdir /opt/ADL_SDK_V10.2
unzip -d /opt/ADL_SDK_V10.2/
  • Finalize the tutorial with compiling sgminer
export CFLAGS="-O2 -Wall -march=native -I/opt/AMDAPPSDK-3.0/include:/opt/ADL_SDK_V10.2/include" LDFLAGS="-L/opt/AMDAPPSDK-3.0/lib/x86_64"
git clone --recursive && cd sgminer
cp /opt/ADL_SDK_V10.2/include/* ADL_SDK/
make -j4

How much GPU RAM does ETH Mining use?

So I had this question going around in my head for a while.
And if you use an NVIDIA card, the question can be answered pretty fast. Just use the CLI tool nvidia-smi:

Screenshot: nvidia-smi

So with the current ETH DAG #131 you can comfortably mine until April 2018, when the expected DAG size would exceed the RAM of a 3GB GPU.

It’s expected that the ETH network will switch to a “proof of stake” algorithm by then, more here. So don’t waste your money on 8GB cards.