Bitcoin Forum
May 09, 2024, 01:11:01 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: Bitcoind CentOS Clean Compile On AWS EC2  (Read 7361 times)
31337
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
July 16, 2013, 11:35:27 PM
 #21

you forgot a few lines Smiley
Code:
exit #to become root again
rpm --force -i /var/lib/mock/epel-6-x86_64/root/builddir/build/RPMS/openssl-1.0.0-27.el6.EC.1.x86_64.rpm #force reinstall of openssl
rpm --force -i /var/lib/mock/epel-6-x86_64/root/builddir/build/RPMS/openssl-devel-1.0.0-27.el6.EC.1.x86_64.rpm #force reinstall of openssl-devel
there could be another arch instead of x86_64 but you've got the point

also there should be some commands like "userdel -rf abcd; rm -rf /var/lib/mock/epel-6-x86_64" but its up to you.

thanks for manual
1715217061
Hero Member
*
Offline Offline

Posts: 1715217061

View Profile Personal Message (Offline)

Ignore
1715217061
Reply with quote  #2

1715217061
Report to moderator
1715217061
Hero Member
*
Offline Offline

Posts: 1715217061

View Profile Personal Message (Offline)

Ignore
1715217061
Reply with quote  #2

1715217061
Report to moderator
Every time a block is mined, a certain amount of BTC (called the subsidy) is created out of thin air and given to the miner. The subsidy halves every four years and will reach 0 in about 130 years.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715217061
Hero Member
*
Offline Offline

Posts: 1715217061

View Profile Personal Message (Offline)

Ignore
1715217061
Reply with quote  #2

1715217061
Report to moderator
1715217061
Hero Member
*
Offline Offline

Posts: 1715217061

View Profile Personal Message (Offline)

Ignore
1715217061
Reply with quote  #2

1715217061
Report to moderator
1715217061
Hero Member
*
Offline Offline

Posts: 1715217061

View Profile Personal Message (Offline)

Ignore
1715217061
Reply with quote  #2

1715217061
Report to moderator
31337
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
July 17, 2013, 11:20:39 PM
 #22

and some commands to compile bitcoind
Code:
yum install boost boost-devel boost-thread db4 db4-devel
ln -s /usr/lib64/libboost_thread-mt.so /usr/lib64/libboost_thread.so
wget -qO- https://github.com/bitcoin/bitcoin/tarball/master --no-check-certificate | tar xzv --strip-components 1
mv src bitcoin
cd bitcoin
make -f makefile.unix bitcoind USE_UPNP=-
neonzeon (OP)
Newbie
*
Offline Offline

Activity: 23
Merit: 0


View Profile
September 10, 2013, 08:02:29 AM
Last edit: September 10, 2013, 08:17:21 AM by neonzeon
 #23

31337,
Thanks for showing the compile-from-source after force-installing the "improved" openssl library.

However, what we would like to do is to install the openssl library as well as boost, boost-devel, boost-thread, db4 and db4-devel in a "chroot" environment and then build the bitcoind in that environment.

That way, you don't overwrite your default openssl CentOS library (which is generally not recommended)

I think it will more or less require the following six steps:

1. Compile the ECDSA openssl library with mock as per previous instructions.  Installed in the build root,  i.e. DO NOT overwrite your normal openssl library.

2. Download bitcoind source and create a "spec" file for it so it can be converted into an rpm package.  

3. In the "spec" file, specify the following libraries as buildrequires: boost, boost-devel, boost-thread, db4, db4-devel and the ECDSA-capable openssl library. (http://www.rpm.org/max-rpm/ch-rpm-inside.html).  I also assume you have to note boost and db4 as library requires (if you link then dynamically).  Install the libraries (using mock?)

4. Compile the bitcoind source package in the same chroot environment - this ensures it can find the new openssl library. Mock seems to be the right tool for the job.

5. Ensure that "our" openssl library is STATICALLY linked - this prevents runtime link attempts to the system openssl library, which cannot do elliptic curves.

6. Install the compiled bitcoind binary rpm.

I'm not yet 100% sure how the script for the above 6 steps will look like, but it will be similar to yours, with the exception of using rpmbuild and/or mock in the make process.

If anyone who knows mock/rpmbuild/chroot want to attempt to script the above 6 steps, please jump right in!!!

hypes
Full Member
***
Offline Offline

Activity: 168
Merit: 100



View Profile
December 29, 2013, 04:34:44 PM
 #24

this has really helped but i'm getting an error running this last command with the second patch applied

cd ~ ; /usr/bin/mock --rebuild openssl-1.0.0-27.el6.EC.1.src.rpmcd ~ ; /usr/bin/mock --rebuild openssl-1.0.0-27.el6.EC.1.src.rpm


hypes
Full Member
***
Offline Offline

Activity: 168
Merit: 100



View Profile
December 29, 2013, 06:19:28 PM
 #25

i had some problems saying the patch was already applied but i think this was because i ran the command twice (my bad)

i started again and i have successfully managed to build the rpm and also dogecoind  Grin

Many many thanks for your uber-detailed instructions which are probably the only ones on the net, yet again. (been happening a lot lately). Kudos.

anton000
Newbie
*
Offline Offline

Activity: 21
Merit: 0


View Profile
January 15, 2014, 05:03:38 AM
 #26

31337,
Thanks for showing the compile-from-source after force-installing the "improved" openssl library.

However, what we would like to do is to install the openssl library as well as boost, boost-devel, boost-thread, db4 and db4-devel in a "chroot" environment and then build the bitcoind in that environment.

That way, you don't overwrite your default openssl CentOS library (which is generally not recommended)

I think it will more or less require the following six steps:

1. Compile the ECDSA openssl library with mock as per previous instructions.  Installed in the build root,  i.e. DO NOT overwrite your normal openssl library.

2. Download bitcoind source and create a "spec" file for it so it can be converted into an rpm package.  

3. In the "spec" file, specify the following libraries as buildrequires: boost, boost-devel, boost-thread, db4, db4-devel and the ECDSA-capable openssl library. (http://www.rpm.org/max-rpm/ch-rpm-inside.html).  I also assume you have to note boost and db4 as library requires (if you link then dynamically).  Install the libraries (using mock?)

4. Compile the bitcoind source package in the same chroot environment - this ensures it can find the new openssl library. Mock seems to be the right tool for the job.

5. Ensure that "our" openssl library is STATICALLY linked - this prevents runtime link attempts to the system openssl library, which cannot do elliptic curves.

6. Install the compiled bitcoind binary rpm.

I'm not yet 100% sure how the script for the above 6 steps will look like, but it will be similar to yours, with the exception of using rpmbuild and/or mock in the make process.

If anyone who knows mock/rpmbuild/chroot want to attempt to script the above 6 steps, please jump right in!!!




any updates on your progress on this sh script?
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!