<p>The standard compile process does not static "include" dependencies in the executable file. It refers to the installed libdb, boost, etc.</p>

<p>This (dynamic linkes libraries) is an efficient concept. Otherwise each executable that uses – as example – boost would require to include the whole boost dependency in the binary.</p>

<p>The "official" Bitcoin-Core binaries offered through bitcoin.org are static compiled executables (they include everything). This is required to gain linux/distribution independence as well as to fully build the binaries deterministic (security/integrity).</p>

<p>You can build a static linked bitcoind yourself by following the "depends" build process:
<a href="https://github.com/bitcoin/bitcoin/tree/master/depends" rel="nofollow">https://github.com/bitcoin/bitcoin/tree/master/depends</a></p>

CC BY-SA 3.0
2016-06-04T12:03:06.713Z
2016-06-04T12:03:06.713Z
Jonas Schnelli
<p>I compiled Bitcoin Core on one Raspberry Pi from source after installing all the necessary dependencies including all the libboost's and BerkeleyDB. That application runs fine, and <code>bitcoind</code> lives happily in <code>/usr/local/bin</code></p>

<p>So I tried copying <code>bitcoind</code> and the other Bitcoin executables from that directory to a brand new Raspberry Pi running a brand new clean operating system, and the applications wouldn't run. I got errors until I installed libboost and BerkeleyDB and all the other dependencies on that second computer as well.</p>

<p>I thought the compiling process made a stand-alone executable program? Why did the compiled binary still require these shared libraries? </p>

<p>Like, executables are available to download from bitcoin.org that are truly stand-alone. How can I compile from source an executable as stand-alone as these?</p>

CC BY-SA 3.0
2016-06-04T00:23:23.360Z
Executables can still require libraries to be available. It is possible to compile (or actually link) those libraries into the executable itself so the executable becomes truly stand alone. This is called a statically linked binary. On phone atm, can't look up details.
Jannes
<compiling>
Why do compiled binaries still require libdb, BerkeleyDB, and others?
pinhead
# Why do compiled binaries still require libdb, BerkeleyDB, and others?

(Asked by: username_0 on 2016-06-03)

I compiled Bitcoin Core on one Raspberry Pi from source after installing all the necessary dependencies including all the libboost's and BerkeleyDB. That application runs fine, and `bitcoind` lives happily in `/usr/local/bin`

So I tried copying `bitcoind` and the other Bitcoin executables from that directory to a brand new Raspberry Pi running a brand new clean operating system, and the applications wouldn't run. I got errors until I installed libboost and BerkeleyDB and all the other dependencies on that second computer as well.

I thought the compiling process made a stand-alone executable program? Why did the compiled binary still require these shared libraries?

Like, executables are available to download from bitcoin.org that are truly stand-alone. How can I compile from source an executable as stand-alone as these?

**Tags:** compiling

> **Comments:**
> **username_1**: Executables can still require libraries to be available. It is possible to compile (or actually link) those libraries into the executable itself so the executable becomes truly stand alone. This is called a statically linked binary. On phone atm, can't look up details.  

---

## 1 answers

### Answer by username_2 on 2016-06-04. Score: 2 | Accepted answer

The standard compile process does not static "include" dependencies in the executable file. It refers to the installed libdb, boost, etc.

This (dynamic linkes libraries) is an efficient concept. Otherwise each executable that uses – as example – boost would require to include the whole boost dependency in the binary.

The "official" Bitcoin-Core binaries offered through bitcoin.org are static compiled executables (they include everything). This is required to gain linux/distribution independence as well as to fully build the binaries deterministic (security/integrity).

You can build a static linked bitcoind yourself by following the "depends" build process:
<https://github.com/bitcoin/bitcoin/tree/master/depends>


---

