<p>I needed to remove stale files from old builds, just run <code>make clean</code>.</p>

<p><a href="https://github.com/bitcoin/bitcoin/issues/16479#issuecomment-515791321" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/issues/16479#issuecomment-515791321</a></p>

CC BY-SA 4.0
2019-07-28T21:49:01.073Z
2019-07-28T21:49:01.073Z
givanse
<p>I'm trying to compile the Bitcoin source (1) on Ubuntu and I get:</p>

<pre><code>In file included from bench/data.cpp:10:0:
./bench/data/block413567.raw.h:1:40: error: conflicting declaration ‘const unsigned char benchmark::data::block413567 []’
 static unsigned const char block413567[] = {
                                        ^
In file included from bench/data.cpp:5:0:
./bench/data.h:14:35: note: previous declaration as ‘const std::vector&lt;unsigned char&gt; benchmark::data::block413567’
 extern const std::vector&lt;uint8_t&gt; block413567;
                                   ^~~~~~~~~~~
...
/usr/include/c++/7/bits/stl_vector.h:270:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/7/bits/stl_vector.h:259:7: note: candidate: std::vector&lt;_Tp, _Alloc&gt;::vector() [with _Tp = unsigned char; _Alloc = std::allocator&lt;unsigned char&gt;]
       vector()
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:259:7: note:   candidate expects 0 arguments, 2 provided
Makefile:10306: recipe for target 'bench/bench_bench_bitcoin-data.o' failed
make[2]: *** [bench/bench_bench_bitcoin-data.o] Error 1
</code></pre>

<p>Internet searches aren't giving me very actionable clues. </p>

<hr>

<ol>
<li>master latest <a href="https://github.com/bitcoin/bitcoin/commit/3489b715120b1bf7559fbddf03cd87b889fdca47" rel="nofollow noreferrer">3489b715120b1bf7559fbddf03cd87b889fdca47</a></li>
</ol>

CC BY-SA 4.0
2019-07-28T17:02:09.930Z
A temporary solution is to add `--disable-bench` to `./configure` to disable benchmarks until this is fixed.
MCCCS
CC BY-SA 4.0
2019-07-28T17:20:16.347Z
But this is somehow cause by [this line](https://github.com/bitcoin/bitcoin/blob/3489b7151/src/Makefile.bench.include#L96). `_raw` is not appended for some reason. I'd suggest submitting a bug report at https://github.com/bitcoin/bitcoin/issues
MCCCS
CC BY-SA 4.0
2019-07-28T18:31:13.410Z
That worked, want to add your comments as an answer? And we'll mark this as solved. I created the GH issue: https://github.com/bitcoin/bitcoin/issues/16479
givanse
<compiling><c++>
Bitcoin compilation error: conflicting declaration
givanse
# Bitcoin compilation error: conflicting declaration

(Asked by: username_0 on 2019-07-28)

I'm trying to compile the Bitcoin source (1) on Ubuntu and I get:

```
In file included from bench/data.cpp:10:0:
./bench/data/block413567.raw.h:1:40: error: conflicting declaration ‘const unsigned char benchmark::data::block413567 []’
 static unsigned const char block413567[] = {
                                        ^
In file included from bench/data.cpp:5:0:
./bench/data.h:14:35: note: previous declaration as ‘const std::vector<unsigned char> benchmark::data::block413567’
 extern const std::vector<uint8_t> block413567;
                                   ^~~~~~~~~~~
...
/usr/include/c++/7/bits/stl_vector.h:270:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/7/bits/stl_vector.h:259:7: note: candidate: std::vector<_Tp, _Alloc>::vector() [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
       vector()
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:259:7: note:   candidate expects 0 arguments, 2 provided
Makefile:10306: recipe for target 'bench/bench_bench_bitcoin-data.o' failed
make[2]: *** [bench/bench_bench_bitcoin-data.o] Error 1

```

Internet searches aren't giving me very actionable clues.

---

1. master latest [3489b715120b1bf7559fbddf03cd87b889fdca47](https://github.com/bitcoin/bitcoin/commit/3489b715120b1bf7559fbddf03cd87b889fdca47)

**Tags:** compiling, c++

> **Comments:**
> **username_1**: A temporary solution is to add `--disable-bench` to `./configure` to disable benchmarks until this is fixed.  
> **username_1**: But this is somehow cause by [this line](https://github.com/bitcoin/bitcoin/blob/3489b7151/src/Makefile.bench.include#L96). `_raw` is not appended for some reason. I'd suggest submitting a bug report at https://github.com/bitcoin/bitcoin/issues  
> **username_0**: That worked, want to add your comments as an answer? And we'll mark this as solved. I created the GH issue: https://github.com/bitcoin/bitcoin/issues/16479  

---

## 1 answers

### Answer by username_0 on 2019-07-28. Score: 0 | Accepted answer

I needed to remove stale files from old builds, just run `make clean`.

<https://github.com/bitcoin/bitcoin/issues/16479#issuecomment-515791321>


---

