<!-- This issue tracker is only for technical issues related to Bitcoin Core. General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com. For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! -->
<!-- Describe the issue -->
<!--- What behavior did you expect? -->
<!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->
<!--- How reliably can you reproduce the issue, what are the steps to do so? -->
<!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->
<!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->
<!-- Any extra information that might be useful in the debugging process. -->
<!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->
I am trying to compile the latest bitcoin source from GitHub on the latest SmartOS and do not know how to solve the following compile error...
/opt/local/src/bitcoin]# uname -a
SunOS a36dbe40-5628-e6ea-f7b8-8d89982fe9bf 5.11 joyent_20180525T172343Z i86pc i386 i86pc Solaris
/opt/local/src/bitcoin]# gcc -v
Using built-in specs.
COLLECT_GCC=/opt/local/gcc49/bin/gcc
COLLECT_LTO_WRAPPER=/opt/local/gcc49/libexec/gcc/x86_64-sun-solaris2.11/4.9.3/lto-wrapper
Target: x86_64-sun-solaris2.11
Configured with: ../gcc-4.9.3/configure --enable-languages='c obj-c++ objc go fortran c++' --enable-shared --enable-long-long --with-local-prefix=/opt/local --enable-libssp --enable-threads=posix --with-boot-ldflags='-static-libstdc++ -static-libgcc -Wl,-R/opt/local/lib ' --disable-nls --with-gxx-include-dir=/opt/local/gcc49/include/c++/ --without-gnu-ld --with-ld=/usr/bin/ld --with-gnu-as --with-as=/opt/local/bin/gas --prefix=/opt/local/gcc49 --build=x86_64-sun-solaris2.11 --host=x86_64-sun-solaris2.11 --infodir=/opt/local/gcc49/info --mandir=/opt/local/gcc49/man
Thread model: posix
gcc version 4.9.3 (GCC)
/opt/local/src/bitcoin]# ./configure --with-gui=no --disable-tests --enable-cxx --disable-shared --with-pic --prefix=/usr/local --with-incompatible-bdb --target=x86_64-sun-solaris2.11
...
Options used to compile and link:
with wallet = yes
with gui / qt = no
with zmq = no
with test = no
with bench = yes
with upnp = auto
use asm = yes
sanitizers =
debug enabled = no
gprof enabled = no
werror = no
target os =
build os =
CC = gcc
CFLAGS = -g -O2
CPPFLAGS = -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS
CXX = g++ -std=c++11
CXXFLAGS = -Wstack-protector -fstack-protector-all -Wall -Wextra -Wformat -Wvla -Wno-unused-parameter -g -O2
LDFLAGS = -D_POSIX_PTHREAD_SEMANTICS -pthread -Wl,-z,now -pie
ARFLAGS = cr
/opt/local/src/bitcoin]# make
Making all in src
make[1]: Entering directory '/opt/local/src/bitcoin/src'
make[2]: Entering directory '/opt/local/src/bitcoin/src'
make[3]: Entering directory '/opt/local/src/bitcoin'
make[3]: Leaving directory '/opt/local/src/bitcoin'
CXX crypto/libbitcoinconsensus_la-aes.lo
CXX crypto/libbitcoinconsensus_la-chacha20.lo
CXX crypto/libbitcoinconsensus_la-hmac_sha256.lo
CXX crypto/libbitcoinconsensus_la-hmac_sha512.lo
CXX crypto/libbitcoinconsensus_la-ripemd160.lo
CXX crypto/libbitcoinconsensus_la-sha1.lo
CXX crypto/libbitcoinconsensus_la-sha256.lo
CXX crypto/libbitcoinconsensus_la-sha512.lo
CXX crypto/libbitcoinconsensus_la-sha256_sse4.lo
CXX libbitcoinconsensus_la-arith_uint256.lo
CXX consensus/libbitcoinconsensus_la-merkle.lo
In file included from ./script/script.h:11:0,
from ./primitives/transaction.h:11,
from ./consensus/merkle.h:11,
from consensus/merkle.cpp:5:
./serialize.h:193:39: error: redefinition of 'template<class Stream> void Serialize(Stream&, int8_t)'
template<typename Stream> inline void Serialize(Stream& s, int8_t a ) { ser_wr
^
./serialize.h:192:39: note: 'template<class Stream> void Serialize(Stream&, char)' previously declared here
template<typename Stream> inline void Serialize(Stream& s, char a ) { ser_wr
^
In file included from ./script/script.h:11:0,
from ./primitives/transaction.h:11,
from ./consensus/merkle.h:11,
from consensus/merkle.cpp:5:
./serialize.h:209:39: error: redefinition of 'template<class Stream> void Unserialize(Stream&, int8_t&)'
template<typename Stream> inline void Unserialize(Stream& s, int8_t& a ) { a =
^
./serialize.h:208:39: note: 'template<class Stream> void Unserialize(Stream&, char&)' previously declared here
template<typename Stream> inline void Unserialize(Stream& s, char& a ) { a =
^
Makefile:8138: recipe for target 'consensus/libbitcoinconsensus_la-merkle.lo' failed
make[2]: *** [consensus/libbitcoinconsensus_la-merkle.lo] Error 1
make[2]: Leaving directory '/opt/local/src/bitcoin/src'
Makefile:9824: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/opt/local/src/bitcoin/src'
Makefile:756: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1