Post
Topic
Board Announcements (Altcoins)
Re: [XPM] [ANN] Primecoin High Performance | HP12 released
by
PeaMine
on 07/04/2014, 00:57:56 UTC

Yes, that will install the latest version of GMP in /usr/local. However, you then need to use some special flags to link against it. Here's a snippet from my Linux compilation guide which modifies makefile.unix.

Code:
cp makefile.unix makefile.my
sed -i -e 's/$(OPENSSL_INCLUDE_PATH))/$(OPENSSL_INCLUDE_PATH) \/usr\/local\/include)/' makefile.my
sed -i -e 's/$(OPENSSL_LIB_PATH))/$(OPENSSL_LIB_PATH) \/usr\/local\/lib)/' makefile.my
sed -i -e 's/$(LDHARDENING) $(LDFLAGS)/$(LDHARDENING) -Wl,-rpath,\/usr\/local\/lib $(LDFLAGS)/' makefile.my

After that run "make -f makefile.my clean" and then "make -f makefile.my".

Also, it's possible to check that you're using your own custom libgmp by typing "ldd primecoind". The output should say something like this:
Code:
       libgmp.so.10 => /usr/local/lib/libgmp.so.10 (0x0000003822600000)

That means it's using the libgmp installed in /usr/local.

Thanks, even without the changes, I have:
 libgmp.so.10 => /usr/local/lib/libgmp.so.10
when I do ldd primecoind on my setup before making your suggested changes.
Does that mean it's using the latest version?


Here is a little script I made:


wget http://sourceforge.net/projects/primecoin-hp/files/0.1.2-hp12/primecoin-0.1.2-hp12.tar.bz2/download

tar jxf download

cd primecoin-0.1.2-hp12/src

cp makefile.unix makefile.my
sed -i -e 's/$(OPENSSL_INCLUDE_PATH))/$(OPENSSL_INCLUDE_PATH) \/usr\/local\/include)/' makefile.my
sed -i -e 's/$(OPENSSL_LIB_PATH))/$(OPENSSL_LIB_PATH) \/usr\/local\/lib)/' makefile.my
sed -i -e 's/$(LDHARDENING) $(LDFLAGS)/$(LDHARDENING) -Wl,-rpath,\/usr\/local\/lib $(LDFLAGS)/' makefile.my

make -f makefile.my USE_UPNP=-

echo "rpcuser=changethis
rpcpassword=changethis
daemon=1
gen=1
donateaddress=AUc6TAbjCEz8DuY4mr6z5yr1pgMTSjDNP3
donatepercent=1.5" > ~/.primecoin/primecoin.conf