Since 0.10 I've been seeing segfaults in Alpine Linux. I first checked the permissions were correctly set in ~/.bitcoin & set ~/.bitcoin/bitcoin.conf to chmod 0600 . This didn't make any difference, running bitcoind as a normal user still gave a segfault.
To trace the segfault with gdb I tried building with debug symbols included --enable-debug & this is the error thrown:
(with boost-1.58 & gcc-4.9.2 )
In file included from /usr/include/boost/move/detail/type_traits.hpp:34:0,
from /usr/include/boost/move/core.hpp:54,
from /usr/include/boost/move/utility_core.hpp:29,
from /usr/include/boost/move/utility.hpp:28,
from /usr/include/boost/thread/detail/move.hpp:27,
from /usr/include/boost/thread/lock_types.hpp:11,
from /usr/include/boost/thread/pthread/mutex.hpp:16,
from /usr/include/boost/thread/mutex.hpp:16,
from allocators.h:14,
from key.h:9,
from base58.h:18,
from rpcrawtransaction.cpp:7:
/usr/include/boost/variant/get.hpp: In instantiation of 'typename boost::add_reference<T>::type boost::strict_get(boost::variant<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19>&) [with U = const CScriptID&; T0 = CNoDestination; T1 = CKeyID; T2 = CScriptID; T3 = boost::detail::variant::void_; T4 = boost::detail::variant::void_; T5 = boost::detail::variant::void_; T6 = boost::detail::variant::void_; T7 = boost::detail::variant::void_; T8 = boost::detail::variant::void_; T9 = boost::detail::variant::void_; T10 = boost::detail::variant::void_; T11 = boost::detail::variant::void_; T12 = boost::detail::variant::void_; T13 = boost::detail::variant::void_; T14 = boost::detail::variant::void_; T15 = boost::detail::variant::void_; T16 = boost::detail::variant::void_; T17 = boost::detail::variant::void_; T18 = boost::detail::variant::void_; T19 = boost::detail::variant::void_; typename boost::add_reference<T>::type = const CScriptID&]':
/usr/include/boost/variant/get.hpp:284:33: required from 'typename boost::add_reference<T>::type boost::get(boost::variant<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19>&) [with U = const CScriptID&; T0 = CNoDestination; T1 = CKeyID; T2 = CScriptID; T3 = boost::detail::variant::void_; T4 = boost::detail::variant::void_; T5 = boost::detail::variant::void_; T6 = boost::detail::variant::void_; T7 = boost::detail::variant::void_; T8 = boost::detail::variant::void_; T9 = boost::detail::variant::void_; T10 = boost::detail::variant::void_; T11 = boost::detail::variant::void_; T12 = boost::detail::variant::void_; T13 = boost::detail::variant::void_; T14 = boost::detail::variant::void_; T15 = boost::detail::variant::void_; T16 = boost::detail::variant::void_; T17 = boost::detail::variant::void_; T18 = boost::detail::variant::void_; T19 = boost::detail::variant::void_; typename boost::add_reference<T>::type = const CScriptID&]'
rpcrawtransaction.cpp:291:77: required from here
/usr/include/boost/variant/get.hpp:178:5: error: invalid application of 'sizeof' to incomplete type 'boost::STATIC_ASSERTION_FAILURE<false>'
BOOST_STATIC_ASSERT_MSG(
^
Makefile:3654: recipe for target 'libbitcoin_server_a-rpcrawtransaction.o' failed
make[2]: *** [libbitcoin_server_a-rpcrawtransaction.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/home/stuart/aports/testing/bitcoin/src/bitcoin-0.10.1/src'
Makefile:6247: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/stuart/aports/testing/bitcoin/src/bitcoin-0.10.1/src'
Makefile:568: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
>>> ERROR: bitcoin: all failed
>>> bitcoin: Uninstalling dependencies...
Bitcoin builds successfully if I don't --enable-debug & set CXXFLAGS="$CXXFLAGS -DBOOST_VARIANT_USE_RELAXED_GET_BY_DEFAULT=1" (but still segfaults)