<p>You cannot set the installation path with <code>./configure</code>, but only when running <code>make install</code>. You need to specify <code>--prefix=</code>once for <code>./configure</code> and once for <code>make install</code>.</p>

CC BY-SA 4.0
2020-02-03T14:32:47.133Z
`make: unrecognized option '--prefix=/home/...`
Wieland Gmeiner
CC BY-SA 4.0
2020-02-03T16:02:49.753Z
Another option might be to use `DESTDIR`: https://www.gnu.org/prep/standards/html_node/DESTDIR.html. If that works, maybe you can have `--prefix=` and `DESTDIR=` in the same `./configure` command.
ohmyfromage
CC BY-SA 4.0
2020-02-03T13:34:10.530Z
2020-02-03T13:34:10.530Z
ohmyfromage
<p>I'm trying to build Bitcoin Core and, if I understand it correctly, the configure script uses the <code>--prefix=</code> option twice, once for the inclusion of the depends build (from <code>depends/README.md</code>):</p>

<pre><code>**Bitcoin Core's configure script by default will ignore the depends output.** In
order for it to pick up libraries, tools, and settings from the depends build,
you must point it at the appropriate `--prefix` directory generated by the
build. In the above example, a prefix dir named x86_64-w64-mingw32 will be
created. To use it for Bitcoin:

    ./configure --prefix=$PWD/depends/x86_64-w64-mingw32
</code></pre>

<p>And another usage of <code>--prefix</code> as it's usually used in configure, to specify a nonstandard install location (output from <code>./configure --help</code>):</p>

<pre><code>By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.  You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.
</code></pre>

<p>How can I specify an installation path and a depends path at the same time?</p>

<bitcoin-core><bitcoin-core-development><compiling>
How ./configure Bitcoin Core build to pick up depends build and installation path at the same time?
Wieland Gmeiner
# How ./configure Bitcoin Core build to pick up depends build and installation path at the same time?

(Asked by: username_0 on 2020-02-03)

I'm trying to build Bitcoin Core and, if I understand it correctly, the configure script uses the `--prefix=` option twice, once for the inclusion of the depends build (from `depends/README.md`):

```
**Bitcoin Core's configure script by default will ignore the depends output.** In
order for it to pick up libraries, tools, and settings from the depends build,
you must point it at the appropriate `--prefix` directory generated by the
build. In the above example, a prefix dir named x86_64-w64-mingw32 will be
created. To use it for Bitcoin:

    ./configure --prefix=$PWD/depends/x86_64-w64-mingw32

```

And another usage of `--prefix` as it's usually used in configure, to specify a nonstandard install location (output from `./configure --help`):

```
By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.  You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.

```

How can I specify an installation path and a depends path at the same time?

**Tags:** bitcoin-core, bitcoin-core-development, compiling


---

## 1 answers

### Answer by username_1 on 2020-02-03. Score: 1

You cannot set the installation path with `./configure`, but only when running `make install`. You need to specify `--prefix=`once for `./configure` and once for `make install`.

> **Comments:**
> **username_0**: `make: unrecognized option '--prefix=/home/...`  
> **username_1**: Another option might be to use `DESTDIR`: https://www.gnu.org/prep/standards/html_node/DESTDIR.html. If that works, maybe you can have `--prefix=` and `DESTDIR=` in the same `./configure` command.  

---

