Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: TheWolf666 on July 12, 2019, 08:17:44 AM



Title: make install is not working with ubuntu
Post by: TheWolf666 on July 12, 2019, 08:17:44 AM

https://kryptofranc.com/img/bitcoininstall.jpg

When I am doing

Code:
make install

Generates a bitcoin-qt (same with bitcoind) that cannot run without installing the dependencies... and the size is way bigger than the bitcoin official distribution ones.

So here is my question, what is applied to bitcoin-qt so that it is so different in the release than the result I get when following the instructions?

Check the pictures. Mine is working when the dependencies are installed, but on a fresh Ubuntu 18.04.2 install I get a segmentation fault.

The bitcoin-qt (and bitcoind) from the release on https://bitcoin.org, is totally different, small, and is working without having to install any dependencies?


Title: Re: make install is not working with ubuntu
Post by: Carlton Banks on July 12, 2019, 09:00:49 AM
the Bitcoin autogen'ed makefile compiles a static binary, i.e. all dependencies are a part of the final binary executable.

you must have changed something in configure.ac or the makefile, or deleted the bundled 3rd party libs. An untouched bitcoin.git doesn't behave how you're describing, and never has AFAIK


start again, delete the directory and git clone https://github/bitcoin/bitcoin.git


also, use strip bitcoin* on all exectuables you compile to reduce the size of the binaries. They still won't be byte-for-byte identical to the official binaries, you need to use gitian (or guix in future) to get precisely the same binaries as the official ones. strip will only reduce the binary size to a similar value.

all functionality is the same, regardless of whether you use the strip command or not. but, using different version of the 3rd party libraries than those bundled with the Bitcoin repo will result in different behaviour, some 3rd party libs are forks maintained specifically for the Bitcoin project, while others are frozen to an old version to maintain consistent behaviour between Bitcoin nodes of differing versions

if you use different 3rd party libraries, you cannot expect such a Bitcoin node to function correctly (arguably, it isn't even a proper Bitcoin node when you use the wrong 3rd party libs to compile bitcoin source code)


Title: Re: make install is not working with ubuntu
Post by: TheWolf666 on July 12, 2019, 09:49:19 AM
Thanks for your input...

If I understand you, the compiled original (without the install option) should work on another Unix install without any missing dependencies?
That's not what I get. I will investigate and post the result here. I must have made a mistake.

the Bitcoin autogen'ed makefile compiles a static binary, i.e. all dependencies are a part of the final binary executable.

you must have changed something in configure.ac or the makefile, or deleted the bundled 3rd party libs. An untouched bitcoin.git doesn't behave how you're describing, and never has AFAIK


start again, delete the directory and git clone https://github/bitcoin/bitcoin.git


also, use strip bitcoin* on all exectuables you compile to reduce the size of the binaries. They still won't be byte-for-byte identical to the official binaries, you need to use gitian (or guix in future) to get precisely the same binaries as the official ones. strip will only reduce the binary size to a similar value.

all functionality is the same, regardless of whether you use the strip command or not. but, using different version of the 3rd party libraries than those bundled with the Bitcoin repo will result in different behaviour, some 3rd party libs are forks maintained specifically for the Bitcoin project, while others are frozen to an old version to maintain consistent behaviour between Bitcoin nodes of differing versions

if you use different 3rd party libraries, you cannot expect such a Bitcoin node to function correctly (arguably, it isn't even a proper Bitcoin node when you use the wrong 3rd party libs to compile bitcoin source code)


Title: Re: make install is not working with ubuntu
Post by: Carlton Banks on July 12, 2019, 11:42:08 AM
If I understand you, the compiled original (without the install option) should work on another Unix install without any missing dependencies?

precisely.

all the needed dependencies are compiled into the Bitcoin binaries in the default automake configuration of all branches of the Bitcoin github repo. they are intentionally static binaries, to keep Bitcoin nodes behaving consistently across the Bitcoin network. a side effect of that is that the binaries can be used on different machines that have the same OS, but different libraries installed. Pre-installed libraries don't matter, as the Bitcoin binaries bring their own 3rd libraries to satisfy all it's dependencies.


Title: Re: make install is not working with ubuntu
Post by: dragonvslinux on July 14, 2019, 06:04:18 PM
If you are using Ubuntu 18.04.2 then I'd recommend the following instead of building from source. Unless you need to build from source that is:

Code:
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt update
sudo apt install bitcoind bitcoin-qt

This includes all the dependencies and by adding the repository (first line) will keep you up to date with the latest core updates (as long as you keep your system up to date).

Source: https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin