i have been trying for 2 days to get MongoDB installed on my raspberry pi but i am unable to get it to work.
i know that the official mongo isn't for for ARM, but there is a fork i found at:
https://github.com/skrabban/mongo-nonx86
but it fails top build. i have seen this repose referenced in several sites, but it doesn't seem to be working for me and i can figure out why it doesn't compile.
i followed the instructions on: http://c-mobberley.com/wordpress/2013/10/14/raspberry-pi-mongodb-installation-the-working-guide/
but i get a compilation error when running scons
. the error i get is:
sudo scons .
scons: Reading SConscript files ...
scons version: 2.3.1
python version: 2 7 9 'final' 0
Checking whether the C++ compiler works... (cached) yes
Checking for C header file unistd.h... (cached) yes
Checking whether clock_gettime is declared... (cached) yes
Checking for C library rt... (cached) yes
Checking for C++ header file execinfo.h... (cached) yes
Checking whether backtrace is declared... (cached) yes
Checking whether backtrace_symbols is declared... (cached) yes
Checking for C library pcap... (cached) no
Checking for C library wpcap... (cached) no
Checking for __sync_fetch_and_add ...(cached) yes
Checking if alignment is important ...(cached) yes
Checking for inline __builtin_bswap32 ...(cached) yes
Checking for inline __builtin_bswap64 ...(cached) yes
Checking if system is big endian (for snappy) ...(cached) no
Checking if -fstack-protector works ...(cached) yes
scons: done reading SConscript files.
scons: Building targets ...
g++ -o build/linux2/normal/client_build/mongo/client/examples/authTest.o -c -Wnon-virtual-dtor -Woverloaded-virtual -fPIC -fno-strict-aliasing -Wstrict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Wcast-align -Winvalid-pch -O3 -DBOOST_ALL_NO_LIB -D_SCONS -DSUPPORT_UTF8 -D_FILE_OFFSET_BITS=64 -DJS_C_STRINGS_ARE_UTF8 -DMONGO_HAVE_HEADER_UNISTD_H -DMONGO_HAVE_EXECINFO_BACKTRACE -DHAVE_SYNC_FETCH_AND_ADD -DALIGNMENT_IMPORTANT -DHAVE_BSWAP32 -DHAVE_BSWAP64 -Ibuild/linux2/normal/third_party/boost -Isrc/third_party/boost -Ibuild/linux2/normal/third_party/pcre-8.30 -Isrc/third_party/pcre-8.30 -Ibuild/linux2/normal -Isrc -Ibuild/linux2/normal/mongo -Isrc/mongo src/mongo/client/examples/authTest.cpp
In file included from src/third_party/boost/boost/bind/bind.hpp:29:0,
from src/third_party/boost/boost/bind.hpp:22,
from src/mongo/pch.h:51,
from src/mongo/client/dbclient.h:30,
from src/mongo/client/examples/authTest.cpp:21:
src/third_party/boost/boost/bind/arg.hpp: In constructor 'boost::arg<I>::arg(const T&)':
src/third_party/boost/boost/bind/arg.hpp:37:22: warning: typedef 'T_must_be_placeholder' locally defined but not used [-Wunused-local-typedefs]
typedef char T_must_be_placeholder[ I == is_placeholder<T>::value? 1: -1 ];
^
In file included from /usr/include/pthread.h:24:0,
from /usr/include/arm-linux-gnueabihf/c++/4.9/bits/gthr-default.h:35,
from /usr/include/arm-linux-gnueabihf/c++/4.9/bits/gthr.h:148,
from /usr/include/c++/4.9/ext/atomicity.h:35,
from /usr/include/c++/4.9/bits/ios_base.h:39,
from /usr/include/c++/4.9/ios:42,
from /usr/include/c++/4.9/ostream:38,
from /usr/include/c++/4.9/iostream:39,
from src/mongo/client/examples/authTest.cpp:18:
src/third_party/boost/boost/thread/xtime.hpp: At global scope:
src/third_party/boost/boost/thread/xtime.hpp:23:5: error: expected identifier before numeric constant
TIME_UTC=1
^
src/third_party/boost/boost/thread/xtime.hpp:23:5: error: expected '}' before numeric constant
src/third_party/boost/boost/thread/xtime.hpp:23:5: error: expected unqualified-id before numeric constant
In file included from src/third_party/boost/boost/thread/pthread/mutex.hpp:14:0,
from src/third_party/boost/boost/thread/mutex.hpp:16,
from src/third_party/boost/boost/thread/pthread/thread_data.hpp:12,
from src/third_party/boost/boost/thread/pthread/condition_variable.hpp:10,
from src/third_party/boost/boost/thread/condition_variable.hpp:16,
from src/mongo/util/goodies.h:22,
from src/mongo/pch.h:78,
from src/mongo/client/dbclient.h:30,
from src/mongo/client/examples/authTest.cpp:21:
src/third_party/boost/boost/thread/xtime.hpp:38:13: error: 'int_fast64_t' does not name a type
typedef int_fast64_t xtime_sec_t; //INT_FAST64_MIN <= sec <= INT_FAST64_MAX
^
src/third_party/boost/boost/thread/xtime.hpp:41:13: error: 'int_fast32_t' does not name a type
typedef int_fast32_t xtime_nsec_t; //0 <= xtime.nsec < NANOSECONDS_PER_SECOND
^
src/third_party/boost/boost/thread/xtime.hpp:43:5: error: 'xtime_sec_t' does not name a type
xtime_sec_t sec;
^
src/third_party/boost/boost/thread/xtime.hpp:44:5: error: 'xtime_nsec_t' does not name a type
xtime_nsec_t nsec;
^
src/third_party/boost/boost/thread/xtime.hpp:46:14: error: expected type-specifier before 'system_time'
operator system_time() const
^
src/third_party/boost/boost/thread/xtime.hpp: In function 'xtime get_xtime(const system_time&)':
src/third_party/boost/boost/thread/xtime.hpp:64:9: error: 'struct xtime' has no member named 'sec'
res.sec=static_cast<xtime::xtime_sec_t>(time_since_epoch.total_seconds());
^
src/third_party/boost/boost/thread/xtime.hpp:64:32: error: 'xtime_sec_t' in 'struct xtime' does not name a type
res.sec=static_cast<xtime::xtime_sec_t>(time_since_epoch.total_seconds());
^
src/third_party/boost/boost/thread/xtime.hpp:65:9: error: 'struct xtime' has no member named 'nsec'
res.nsec=static_cast<xtime::xtime_nsec_t>(time_since_epoch.fractional_seconds()*(1000000000/time_since_epoch.ticks_per_second()));
^
src/third_party/boost/boost/thread/xtime.hpp:65:33: error: 'xtime_nsec_t' in 'struct xtime' does not name a type
res.nsec=static_cast<xtime::xtime_nsec_t>(time_since_epoch.fractional_seconds()*(1000000000/time_since_epoch.ticks_per_second()));
^
In file included from src/third_party/boost/boost/thread/pthread/mutex.hpp:14:0,
from src/third_party/boost/boost/thread/mutex.hpp:16,
from src/third_party/boost/boost/thread/pthread/thread_data.hpp:12,
from src/third_party/boost/boost/thread/pthread/condition_variable.hpp:10,
from src/third_party/boost/boost/thread/condition_variable.hpp:16,
from src/mongo/util/goodies.h:22,
from src/mongo/pch.h:78,
from src/mongo/client/dbclient.h:30,
from src/mongo/client/examples/authTest.cpp:21:
src/third_party/boost/boost/thread/xtime.hpp: In function 'int xtime_get(xtime*, int)':
src/third_party/boost/boost/thread/xtime.hpp:73:40: error: 'get_system_time' was not declared in this scope
*xtp=get_xtime(get_system_time());
^
src/third_party/boost/boost/thread/xtime.hpp:73:40: note: suggested alternative:
In file included from src/third_party/boost/boost/thread/pthread/timespec.hpp:9:0,
from src/third_party/boost/boost/thread/pthread/condition_variable.hpp:8,
from src/third_party/boost/boost/thread/condition_variable.hpp:16,
from src/mongo/util/goodies.h:22,
from src/mongo/pch.h:78,
from src/mongo/client/dbclient.h:30,
from src/mongo/client/examples/authTest.cpp:21:
src/third_party/boost/boost/thread/thread_time.hpp:19:24: note: 'boost::get_system_time'
inline system_time get_system_time()
^
In file included from src/third_party/boost/boost/thread/pthread/mutex.hpp:14:0,
from src/third_party/boost/boost/thread/mutex.hpp:16,
from src/third_party/boost/boost/thread/pthread/thread_data.hpp:12,
from src/third_party/boost/boost/thread/pthread/condition_variable.hpp:10,
from src/third_party/boost/boost/thread/condition_variable.hpp:16,
from src/mongo/util/goodies.h:22,
from src/mongo/pch.h:78,
from src/mongo/client/dbclient.h:30,
from src/mongo/client/examples/authTest.cpp:21:
src/third_party/boost/boost/thread/xtime.hpp: In function 'int xtime_cmp(const xtime&, const xtime&)':
src/third_party/boost/boost/thread/xtime.hpp:82:13: error: 'const struct xtime' has no member named 'sec'
if (xt1.sec == xt2.sec)
^
src/third_party/boost/boost/thread/xtime.hpp:82:24: error: 'const struct xtime' has no member named 'sec'
if (xt1.sec == xt2.sec)
^
src/third_party/boost/boost/thread/xtime.hpp:83:26: error: 'const struct xtime' has no member named 'nsec'
return (int)(xt1.nsec - xt2.nsec);
^
src/third_party/boost/boost/thread/xtime.hpp:83:37: error: 'const struct xtime' has no member named 'nsec'
return (int)(xt1.nsec - xt2.nsec);
^
src/third_party/boost/boost/thread/xtime.hpp:85:21: error: 'const struct xtime' has no member named 'sec'
return (xt1.sec > xt2.sec) ? 1 : -1;
^
src/third_party/boost/boost/thread/xtime.hpp:85:31: error: 'const struct xtime' has no member named 'sec'
return (xt1.sec > xt2.sec) ? 1 : -1;
^
src/third_party/boost/boost/thread/xtime.hpp: At global scope:
src/third_party/boost/boost/thread/xtime.hpp:88:1: error: expected declaration before '}' token
} // namespace boost
^
scons: *** [build/linux2/normal/client_build/mongo/client/examples/authTest.o] Error 1
scons: building terminated because of errors.
i have tried googling this error but i cannot find anything about it, so either i am making the wrong google search, or nobody else is having this issue.
does anyone have any ideas why i might be getting this error? is there another way to get mongo installed onto the RPi?
any help is appriciated.