Bitcoin Forum
May 05, 2024, 05:32:58 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Why is compiling Bitcoin still such a PITA?  (Read 1245 times)
mindphuq (OP)
Member
**
Offline Offline

Activity: 187
Merit: 20


View Profile
June 10, 2017, 09:51:47 PM
 #1

Honestly, why is compiling Bitcoin still such a pain in the ass?

It still uses the old freaking BerkeleyDB.4.8 and the internet is full of people having issues to compile this thing because of these freaking damn libraries. Literally every freaking bitcoin client and altcoin has this problem

It's 2017 guys why on earth can't we just use a DB library thats included in ACTUAL MODERN SYSTEM repositories?

Yes I downloaded that old version from Oracle.-
Yes I compiled it
Yes I installed it
YES I FREAKING TRIED TO CONFIGURE IT WITH THE LIB PATH
 ./configure CPPFLAGS="-I/usr/local/BerkeleyDB.4.8/include -O2" LDFLAGS="-L/usr/local/BerkeleyDB.4.8/lib"

NO IT STILL DOESNT RUN

FFS

Berkeley DB is at version 6.2.32
1714930378
Hero Member
*
Offline Offline

Posts: 1714930378

View Profile Personal Message (Offline)

Ignore
1714930378
Reply with quote  #2

1714930378
Report to moderator
"Bitcoin: the cutting edge of begging technology." -- Giraffe.BTC
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714930378
Hero Member
*
Offline Offline

Posts: 1714930378

View Profile Personal Message (Offline)

Ignore
1714930378
Reply with quote  #2

1714930378
Report to moderator
1714930378
Hero Member
*
Offline Offline

Posts: 1714930378

View Profile Personal Message (Offline)

Ignore
1714930378
Reply with quote  #2

1714930378
Report to moderator
achow101
Staff
Legendary
*
Offline Offline

Activity: 3388
Merit: 6581


Just writing some code


View Profile WWW
June 10, 2017, 09:57:51 PM
 #2

It really isn't that hard to do. There are explicit instructions right in the repo: https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md

The reason that BDB 4.8 is still used is because changing the version to anything else will completely break backwards compatibility. Anyways, you don't have to use BDB 4.8, just configure with the --incompatible-bdb option.

mindphuq (OP)
Member
**
Offline Offline

Activity: 187
Merit: 20


View Profile
June 10, 2017, 10:02:07 PM
 #3

It really isn't that hard to do. There are explicit instructions right in the repo: https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md

The reason that BDB 4.8 is still used is because changing the version to anything else will completely break backwards compatibility. Anyways, you don't have to use BDB 4.8, just configure with the --incompatible-bdb option.

Yes, I used that guide. It still doesn't work.
Care to explain where the problem is?

Code:
./configure CPPFLAGS="-I/usr/local/BerkeleyDB.4.8/include -O2" LDFLAGS="-L/usr/local/BerkeleyDB.4.8/lib"

checking for Berkeley DB C++ headers... no
configure: error: libdb_cxx headers missing, Bitcoin Core requires this library for wallet functionality (--disable-wallet to disable wallet functionality)

ls -la /usr/local/BerkeleyDB.4.8/include
total 160
drwxr-sr-x 2 root staff   4096 Jun 10 21:24 .
drwxr-sr-x 6 root staff   4096 Jun 10 21:24 ..
-r--r--r-- 1 pi   pi     44005 Jun 10 21:07 db_cxx.h
-r--r--r-- 1 pi   pi    107760 Jun 10 21:07 db.h

ls -la /usr/local/BerkeleyDB.4.8/lib
total 7608
drwxr-sr-x 2 root staff    4096 Jun 10 21:24 .
drwxr-sr-x 6 root staff    4096 Jun 10 21:24 ..
-rw-r--r-- 1 pi   pi    1857256 Jun 10 21:24 libdb-4.8.a
-rw-r--r-- 1 pi   pi    1857256 Jun 10 21:24 libdb.a
-rw-r--r-- 1 pi   pi    2028454 Jun 10 21:24 libdb_cxx-4.8.a
-rw-r--r-- 1 pi   pi    2028454 Jun 10 21:24 libdb_cxx.a
achow101
Staff
Legendary
*
Offline Offline

Activity: 3388
Merit: 6581


Just writing some code


View Profile WWW
June 11, 2017, 01:44:53 AM
 #4

Yes, I used that guide. It still doesn't work.
Care to explain where the problem is?

Code:
./configure CPPFLAGS="-I/usr/local/BerkeleyDB.4.8/include -O2" LDFLAGS="-L/usr/local/BerkeleyDB.4.8/lib"

checking for Berkeley DB C++ headers... no
configure: error: libdb_cxx headers missing, Bitcoin Core requires this library for wallet functionality (--disable-wallet to disable wallet functionality)
Stop attempting to use BDB 4.8 with whatever options you are using. Just install whatever BDB version you want and then run
Code:
./configure --with-incompatible-bdb

mindphuq (OP)
Member
**
Offline Offline

Activity: 187
Merit: 20


View Profile
June 11, 2017, 07:38:26 AM
Last edit: June 11, 2017, 11:01:23 AM by mindphuq
 #5

But what issues could that cause? Is there a list of caveats for incompatible db?

"If you do not care about wallet compatibility, pass --with-incompatible-bdb to configure."

What does that mean?
achow101
Staff
Legendary
*
Offline Offline

Activity: 3388
Merit: 6581


Just writing some code


View Profile WWW
June 11, 2017, 04:38:47 PM
 #6

But what issues could that cause? Is there a list of caveats for incompatible db?

"If you do not care about wallet compatibility, pass --with-incompatible-bdb to configure."

What does that mean?
That means that you can't use the wallet.dat file with any version of Bitcoin Core compiled with a version of BDB that is different from yours. You wouldn't be able to switch to using the officially released binaries without creating a new wallet. Nor can you upgrade your version of BDB without creating a new wallet. This is all because BDB is incompatible with other versions of BDB, even between minor versions.

mindphuq (OP)
Member
**
Offline Offline

Activity: 187
Merit: 20


View Profile
June 11, 2017, 09:38:18 PM
 #7

But what issues could that cause? Is there a list of caveats for incompatible db?

"If you do not care about wallet compatibility, pass --with-incompatible-bdb to configure."

What does that mean?
That means that you can't use the wallet.dat file with any version of Bitcoin Core compiled with a version of BDB that is different from yours. You wouldn't be able to switch to using the officially released binaries without creating a new wallet. Nor can you upgrade your version of BDB without creating a new wallet. This is all because BDB is incompatible with other versions of BDB, even between minor versions.

Yeah I just learned that Berkeley DB is used for the wallet.dat
This works for a fresh installation but not if you want to use your old wallet.dat

Which makes this solution to the DB issue rather awkward.

Unless however there was a converter for the wallet.dat file...
achow101
Staff
Legendary
*
Offline Offline

Activity: 3388
Merit: 6581


Just writing some code


View Profile WWW
June 11, 2017, 11:33:19 PM
 #8

Yeah I just learned that Berkeley DB is used for the wallet.dat
This works for a fresh installation but not if you want to use your old wallet.dat

Which makes this solution to the DB issue rather awkward.

Unless however there was a converter for the wallet.dat file...
With a pre-existing wallet, you do need to use BDB 4.8.

You can try using the depends system which you can read about here: https://github.com/bitcoin/bitcoin/tree/master/depends. With that, you should end up doing something like this: (starting from the repository root):
Code:
cd depends
make
cd ..
./autogen.sh
./configure --prefix=`pwd`/depends/x86_64-linux-gnu # Note: Check in the depends folder and actually see what folder is created. You have to use the path to that
make

The depends system is what is used for Bitcoin Core's official builds that are released. You will be using the correct versions for all of the dependencies.

milly6
Legendary
*
Offline Offline

Activity: 1632
Merit: 1010



View Profile WWW
January 11, 2019, 08:24:00 AM
 #9

PITA is an understatement.  Of the responses to this thread that I could decipher I tried them all.  NONE WORKED.   I suppose that is intentional.  Job security?  or is it simply fraud?  I don't know but someone will.  Lets hope it doesn't become an SEC issue someday.  Been there, done that, not fun.

1.  If the libdb_cxx file is required, and its an old version, it should be included with the distribution.
2.  ditto for all other files not easily available.

It feels to me like the "community", in a response to the question, how do you get to Sacramento from LA is handing users a map to Peoria, IL, and saying, all you've got to do is read this map which you can find here, and pointing them to a hotel in Reno.

Never mind that you have to travel 2000 miles each way for no legitimate reason.  (I know, I've actually had to do similar things, but this isn't about airline logistics).

If you want to solve all of the errors you can do it easily with some really stupid and simple commands, which take only a few minutes to execute:

yum install *bdb*
yum install boost*

Yes a couple hundred megabytes of crap gets installed, but when you .\configure it sails along and you can then type 'make' and it all works.  In my opinion git needs a new layer that checks requirements against versions and forces old versions to be included whenever they are required, OR when such a situation occurs install the missing files automatically as dependencies from github on line.  Not rocket science, but what do I know.



Please share your drugs, they seem good

Eyes open, No Fear. Be Safe! Trinity: Currency Without Bias
Artemis3
Legendary
*
Offline Offline

Activity: 2030
Merit: 1563


CLEAN non GPL infringing code made in Rust lang


View Profile WWW
January 11, 2019, 01:40:42 PM
 #10

Seems to me that your distro is getting in the way. Last i tried compiling, it wasn't much of a problem. I even compiled some altcoin wallets back when i was using Ubuntu. I'm on Artix now, and compiling things from AUR (such as bitcoin core) is one command away.

In ubuntu and debian derivatives it isn't rare for things like bitcoin-core to fall behind. Soon when v18 comes out many people will compile it so they don't have to wait a packager to do it for themselves. I have been too long away from RPM distros, but from the looks of it, things haven't improved much...

██████
███████
███████
████████
BRAIINS OS+|AUTOTUNING
MINING FIRMWARE
|
Increase hashrate on your Bitcoin ASICs,
improve efficiency as much as 25%, and
get 0% pool fees on Braiins Pool
faceface
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
August 23, 2019, 10:37:13 AM
 #11

PITA is an understatement.  Of the responses to this thread that I could decipher I tried them all.  NONE WORKED.   I suppose that is intentional.  Job security?  or is it simply fraud?  I don't know but someone will.  Lets hope it doesn't become an SEC issue someday.  Been there, done that, not fun.

1.  If the libdb_cxx file is required, and its an old version, it should be included with the distribution.
2.  ditto for all other files not easily available.

It feels to me like the "community", in a response to the question, how do you get to Sacramento from LA is handing users a map to Peoria, IL, and saying, all you've got to do is read this map which you can find here, and pointing them to a hotel in Reno.

Never mind that you have to travel 2000 miles each way for no legitimate reason.  (I know, I've actually had to do similar things, but this isn't about airline logistics).

If you want to solve all of the errors you can do it easily with some really stupid and simple commands, which take only a few minutes to execute:

yum install *bdb*
yum install boost*

Yes a couple hundred megabytes of crap gets installed, but when you .\configure it sails along and you can then type 'make' and it all works.  In my opinion git needs a new layer that checks requirements against versions and forces old versions to be included whenever they are required, OR when such a situation occurs install the missing files automatically as dependencies from github on line.  Not rocket science, but what do I know.



Believe it or not, it's a lot easier to compile than half of the other open source projects out there. Now if the package maintainers were better at keeping packages up to date or backward compatible, it would be even better. However, I'm not paying them to do that, so I can't really complain.
Pages: [1]
  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!