1

I am trying to run a bitcoind instance (branch 0.9 from git repository) on CentOS 6.6 following this guide but I get this error when building LevelDB:

Building LevelDB ...
make[3]: Entering directory `/home/bitcoind/bitcoind/downloads/bitcoin/src/leveldb'
g++ -I. -I./include -fno-builtin-memcmp -pthread -DOS_LINUX -DLEVELDB_PLATFORM_POSIX -g -O2 -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter  -Wstack-protector -fstack-protector-all -fPIE -fvisibility=hidden -I/home/bitcoind/bitcoind/deps/include -DBOOST_SPIRIT_THREADSAFE -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS  -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -c helpers/memenv/memenv.cc -o helpers/memenv/memenv.o
helpers/memenv/memenv.cc: In member function ‘leveldb::Status leveldb::<unnamed>::FileState::Read(uint64_t, size_t, leveldb::Slice*, char*) const’:
helpers/memenv/memenv.cc:65: error: ‘SIZE_MAX’ was not declared in this scope
make[3]: *** [helpers/memenv/memenv.o] Error 1
make[3]: Leaving directory `/home/bitcoind/bitcoind/downloads/bitcoin/src/leveldb'
make[2]: *** [leveldb/libmemenv.a] Error 2
make[2]: Leaving directory `/home/bitcoind/bitcoind/downloads/bitcoin/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/bitcoind/bitcoind/downloads/bitcoin/src'
make: *** [all-recursive] Error 1

gcc version: gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC)

Here is the a pastebin with the end of the compiling output.

Anyone have some idea on how to workaround it?

1

So I found this thread that gave me the clue how to workaround this issue, basically insert the following at line 5 of src/leveldb/helpers/memenv/memenv.h and it compiles fine:

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.