Author Topic: [Primecoin] How to build the client from source on Linux (Ubuntu 12.04)  (Read 1214 times)

Online FuzzyBear

  • Administrator
  • Sr. Member
  • *****
  • Posts: 227
  • Karma: +15/-0
    • View Profile
Hey everyone,

Had a few requests from people for help in building Primecoin from source on a linux OS so I decided to write up this handy guide so that everyone could do it themselves :)

http://www.devtome.com/doku.php?id=install_primecoin_ubuntu

If you have any problems then please post in this thread and i'll look into them or update the post as needs be.

Guide was requested as apparently you can get 3x more PPS building from source (maybe needs further optimisation?) but hope this gets some people some more coins.

FuzzyBear
BTC: 1FvMYwtkrQakoL8Zq1GjfKqTkm2a7TKt6N  |  LTC: LbMPUzwPRkWa5hCJGrEiRCeoYExY6Ujt1D  |  DEV: 1JfbPx4nSGFxfzhTK1h3gHbp1E1BkFbwFW
PPC: PDtcFPhMa9Hc9zTfoRG7zcURCRpcpRdMym  |  TRC: 1FzdruHpffAeW2ZBctDLwR8P4APVpATu2j  |  FRC: 1BADxscUvT42SFXZwXgxEfWVDHkV1QPTEj
NMC: N7q9zg9h4Scfx6R25RTL8LdGxCBQbgq8wz  |

Online FuzzyBear

  • Administrator
  • Sr. Member
  • *****
  • Posts: 227
  • Karma: +15/-0
    • View Profile
Ok i'll post a few builds I have here so people can test for themselves.... I'm on the 2nd  build and i gone from 10-20 PPS to 210 and still rising!!

http://donate.ppcointalk.org/primecoind.zip - code with first fix and compiled under make -f makefile.unix
http://donate.ppcointalk.org/primecoind.tar.gz - latest code fix and compiled under make -f makefile.unix

building one now under  make -O3 -march=native -f makefile.unix .... <--- ok that doesn't work...

APkVyn9uJ8LvkGgkQeyamUig4h2bFew8AD
« Last Edit: July 11, 2013, 01:07:00 am by FuzzyBear »
BTC: 1FvMYwtkrQakoL8Zq1GjfKqTkm2a7TKt6N  |  LTC: LbMPUzwPRkWa5hCJGrEiRCeoYExY6Ujt1D  |  DEV: 1JfbPx4nSGFxfzhTK1h3gHbp1E1BkFbwFW
PPC: PDtcFPhMa9Hc9zTfoRG7zcURCRpcpRdMym  |  TRC: 1FzdruHpffAeW2ZBctDLwR8P4APVpATu2j  |  FRC: 1BADxscUvT42SFXZwXgxEfWVDHkV1QPTEj
NMC: N7q9zg9h4Scfx6R25RTL8LdGxCBQbgq8wz  |

Offline CryptoBeggar

  • Jr. Member
  • **
  • Posts: 9
  • Karma: +0/-0
  • Hello I'm new here
    • View Profile
Are you doing a statically linked binary?

Online FuzzyBear

  • Administrator
  • Sr. Member
  • *****
  • Posts: 227
  • Karma: +15/-0
    • View Profile
Are you doing a statically linked binary?

erm my terminology letting me down here but i think i know what u mean,

the two links in the second post are binaries that I have compiled and then uploaded to a server which point out on the web so you can get the compiled source code without having to compile yourself.  These binaries are not going to move or be updated with latest source code compiled when changes made, I will build again and post a new link should sunnyking change source code.

Is that a staticly linked binary as opposed to a dynamic linked one??
BTC: 1FvMYwtkrQakoL8Zq1GjfKqTkm2a7TKt6N  |  LTC: LbMPUzwPRkWa5hCJGrEiRCeoYExY6Ujt1D  |  DEV: 1JfbPx4nSGFxfzhTK1h3gHbp1E1BkFbwFW
PPC: PDtcFPhMa9Hc9zTfoRG7zcURCRpcpRdMym  |  TRC: 1FzdruHpffAeW2ZBctDLwR8P4APVpATu2j  |  FRC: 1BADxscUvT42SFXZwXgxEfWVDHkV1QPTEj
NMC: N7q9zg9h4Scfx6R25RTL8LdGxCBQbgq8wz  |

Online lasle2

  • Jr. Member
  • **
  • Posts: 12
  • Karma: +2/-0
    • View Profile
Any tips on how to build for Centos? I tried on Centos 6.4 last night but the build appears to be looking for the includes in the wrong places. I have yum installed all the depenencies.

My C dev skills are weak so I don't know to to fix the include lookup.
[XPM] ANkMtJWzv3YT6T3gDQZAVtQF829ZUyYKCJ [BTC] 18nHwySUrYaJpSD6PWbTzsawYgqGm2gsEH
[LTC] LP6Eu6XVBQKz9CdCRivoeU45T8SJD6NVoj [PPC] PRm7zKdCE7pbEoTNcrd4FwBLFXM6zSJBLD

Online lasle2

  • Jr. Member
  • **
  • Posts: 12
  • Karma: +2/-0
    • View Profile
Would anyone mind posting a quick guide on how to build for windows? I need binaries that will work on Core 2's and all the latest ones only seem to work for newer processors. They crash on my Core 2 windows machines but work on my i7s and i5.
« Last Edit: July 11, 2013, 04:10:05 pm by lasle2 »
[XPM] ANkMtJWzv3YT6T3gDQZAVtQF829ZUyYKCJ [BTC] 18nHwySUrYaJpSD6PWbTzsawYgqGm2gsEH
[LTC] LP6Eu6XVBQKz9CdCRivoeU45T8SJD6NVoj [PPC] PRm7zKdCE7pbEoTNcrd4FwBLFXM6zSJBLD

Offline CryptoBeggar

  • Jr. Member
  • **
  • Posts: 9
  • Karma: +0/-0
  • Hello I'm new here
    • View Profile
You guessed right, I actually don't know what is a proper expression in this case.

Anyway I was trying to create a more recent compilation, so I can use it on the other machine (I have an older version of suse distribution there, so I'm actually unable to compile it there properly...), but wasn't successful so far. Have you used statically linked libraries?
 

Are you doing a statically linked binary?

erm my terminology letting me down here but i think i know what u mean,

the two links in the second post are binaries that I have compiled and then uploaded to a server which point out on the web so you can get the compiled source code without having to compile yourself.  These binaries are not going to move or be updated with latest source code compiled when changes made, I will build again and post a new link should sunnyking change source code.

Is that a staticly linked binary as opposed to a dynamic linked one??

Offline Sushi

  • Jr. Member
  • **
  • Posts: 3
  • Karma: +0/-0
  • Hello I'm new here
    • View Profile
Great post FuzzyBear!  Thanks!

Now how would I go about setting up several servers to mine and have the coins end up in my wallet on my PC?


Online lasle2

  • Jr. Member
  • **
  • Posts: 12
  • Karma: +2/-0
    • View Profile
I decided to just install Ubuntu on my Centos boxes instead of spending an unknown amount of time learning how to migrate the make file between the two. Easy to build on Ubuntu and now my linux boxes are pulling down some nice pps :)

For the windows boxes I decided to just install ubuntu in virtualbox vms. Had to turn on the vt-x virtualization in the bios to get it to work but it was pretty easy overall. The vms get similar pps as the native ubuntu boxes.

Will be doing some experimenting with building on windows tomorrow. May write up a guide if I get it working.
[XPM] ANkMtJWzv3YT6T3gDQZAVtQF829ZUyYKCJ [BTC] 18nHwySUrYaJpSD6PWbTzsawYgqGm2gsEH
[LTC] LP6Eu6XVBQKz9CdCRivoeU45T8SJD6NVoj [PPC] PRm7zKdCE7pbEoTNcrd4FwBLFXM6zSJBLD

Offline MUTO

  • Jr. Member
  • **
  • Posts: 45
  • Karma: +2/-1
  • Hello I'm new here
    • View Profile
Is there a way to compile the qt of the actual improved version for linux?

Online lasle2

  • Jr. Member
  • **
  • Posts: 12
  • Karma: +2/-0
    • View Profile
Code: [Select]
sudo apt-get install qt4-qmake libqt4-dev build-essential libboost-dev libboost-system-dev \
    libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev \
    libssl-dev libdb++-dev libminiupnpc-dev -y

qmake
make

On a newer version of ubuntu should work. Have not tried it as I only run a command prompt.

May need to add "USE_UPNP=-" to the qmake command:

qmake "USE_UPNP=-"
« Last Edit: July 12, 2013, 06:04:21 pm by lasle2 »
[XPM] ANkMtJWzv3YT6T3gDQZAVtQF829ZUyYKCJ [BTC] 18nHwySUrYaJpSD6PWbTzsawYgqGm2gsEH
[LTC] LP6Eu6XVBQKz9CdCRivoeU45T8SJD6NVoj [PPC] PRm7zKdCE7pbEoTNcrd4FwBLFXM6zSJBLD

Offline CryptoBeggar

  • Jr. Member
  • **
  • Posts: 9
  • Karma: +0/-0
  • Hello I'm new here
    • View Profile
Has anyone managed to build a binary for Linux out of the latest 0.1.1 version o mikaelh's update? I'm working on one including dynamic libraries, but no success so far  :-\

Online ivanlabrie

  • Jr. Member
  • **
  • Posts: 12
  • Karma: +1/-0
  • Hello I'm new here
    • View Profile
Hi there, thanks for the great guide.

Having some trouble setting up my linux miner.
Using ubuntu 12.04 server, console only...only 256mb of ram though.
I created a 1gb swap file btw.

This happens when doing sudo apt-get install libcurl4-openssl-dev:

And this when compiling:


I managed to compile the client succesfully in digital ocean's vps instances before, not sure what's wrong with this rig.
Thanks in advance!

ps: it's a fresh ubuntu install btw

Online ivanlabrie

  • Jr. Member
  • **
  • Posts: 12
  • Karma: +1/-0
  • Hello I'm new here
    • View Profile
Ok, this seems to be the problem but I'm too much of a noob to know how to solve it.

https://github.com/ros/rosdistro/commit/887346590cfefc0b6c1cd0288058d7c6a6c289bf

Offline tinnvec

  • Jr. Member
  • **
  • Posts: 4
  • Karma: +0/-0
  • Hello I'm new here
    • View Profile
First off, excellent guide, thank you very much.

While I'm quite familiar with compiling for linux, I'd like to put my Mac to work as well, but have never compiled anything for it (mainly use it for my web dev work). Could someone point me in the right direction on compiling for mac? My Google Fu seems to be weak on this search  :o

EDIT: I actually found that there are a few small differences, but using mac ports, you can install all needed dependencies, and simply compile using makefile.osx
« Last Edit: July 15, 2013, 07:58:00 pm by tinnvec »