mindphuq (OP)
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 187
Merit: 20
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 10, 2017, 09:51:47 PM |
|
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
|
|
|
|
achow101
Staff
Legendary
Offline
Activity: 3486
Merit: 6806
Just writing some code
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 10, 2017, 09:57:51 PM |
|
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.mdThe 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
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 187
Merit: 20
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 10, 2017, 10:02:07 PM |
|
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.mdThe 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? ./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
Activity: 3486
Merit: 6806
Just writing some code
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 11, 2017, 01:44:53 AM |
|
Yes, I used that guide. It still doesn't work. Care to explain where the problem is? ./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 ./configure --with-incompatible-bdb
|
|
|
|
mindphuq (OP)
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 187
Merit: 20
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 11, 2017, 07:38:26 AM Last edit: June 11, 2017, 11:01:23 AM by mindphuq |
|
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
Activity: 3486
Merit: 6806
Just writing some code
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 11, 2017, 04:38:47 PM |
|
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
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 187
Merit: 20
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 11, 2017, 09:38:18 PM |
|
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
Activity: 3486
Merit: 6806
Just writing some code
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 11, 2017, 11:33:19 PM |
|
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): 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
Activity: 1632
Merit: 1010
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
January 11, 2019, 08:24:00 AM |
|
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
|
|
|
|
Artemis3
Legendary
Offline
Activity: 2030
Merit: 1563
CLEAN non GPL infringing code made in Rust lang
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
January 11, 2019, 01:40:42 PM |
|
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
Activity: 7
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 23, 2019, 10:37:13 AM |
|
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.
|
|
|
|
|