Title: Why is compiling Bitcoin still such a PITA? Post by: mindphuq on 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 Title: Re: Why is compiling Bitcoin still such a PITA? Post by: achow101 on 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.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. Title: Re: Why is compiling Bitcoin still such a PITA? Post by: mindphuq on 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.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" Title: Re: Why is compiling Bitcoin still such a PITA? Post by: achow101 on June 11, 2017, 01:44:53 AM Yes, I used that guide. It still doesn't work. Stop attempting to use BDB 4.8 with whatever options you are using. Just install whatever BDB version you want and then runCare 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" Code: ./configure --with-incompatible-bdb Title: Re: Why is compiling Bitcoin still such a PITA? Post by: mindphuq on June 11, 2017, 07:38:26 AM 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? Title: Re: Why is compiling Bitcoin still such a PITA? Post by: achow101 on June 11, 2017, 04:38:47 PM But what issues could that cause? Is there a list of caveats for incompatible db? 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."If you do not care about wallet compatibility, pass --with-incompatible-bdb to configure." What does that mean? Title: Re: Why is compiling Bitcoin still such a PITA? Post by: mindphuq on June 11, 2017, 09:38:18 PM But what issues could that cause? Is there a list of caveats for incompatible db? 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."If you do not care about wallet compatibility, pass --with-incompatible-bdb to configure." What does that mean? 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... Title: Re: Why is compiling Bitcoin still such a PITA? Post by: achow101 on June 11, 2017, 11:33:19 PM Yeah I just learned that Berkeley DB is used for the wallet.dat With a pre-existing wallet, you do need to use BDB 4.8. 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... 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 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. Title: Re: Why is compiling Bitcoin still such a PITA? Post by: milly6 on 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 Title: Re: Why is compiling Bitcoin still such a PITA? Post by: Artemis3 on 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 (https://artixlinux.org/) now, and compiling things from AUR (such as bitcoin core (https://aur.archlinux.org/packages/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... Title: Re: Why is compiling Bitcoin still such a PITA? Post by: faceface on 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. |