I've been trying for several days to compile bitcoin, without having succeeded. Please help me.
My system is a standard x86 running 32-bit Slackware 13.1.0, I'm trying to compile bitcoin-0.3.24.
When I use the standard makefile.unix I get the following compiler errors:
In file included from headers.h:43,
from util.cpp:4:
/usr/include/db_cxx.h:65:16: error: db.h: No such file or directory
In file included from headers.h:43,
from script.cpp:4:
/usr/include/db_cxx.h:65:16: error: db.h: No such file or directory
In file included from headers.h:43,
from db.cpp:5:
/usr/include/db_cxx.h:65:16: error: db.h: No such file or directory
In file included from headers.h:43,
from net.cpp:5:
...
When I use my modified makefile (based on
http://heliacal.net/~solar/bitcoin/bitcoin-linuxbuild.pdf ) I get the following errors:
ui.cpp:19: error: expected constructor, destructor, or type conversion before '(' token
ui.cpp:22: error: expected constructor, destructor, or type conversion before '*' token
ui.cpp:24: error: 'wxLocale' does not name a type
ui.cpp:46: error: variable or field 'HandleCtrlA' declared void
ui.cpp:46: error: 'wxKeyEvent' was not declared in this scope
ui.cpp:46: error: 'event' was not declared in this scope
ui.cpp: In function 'std::string DateStr(int64)':
ui.cpp:67: error: 'wxDateTime' was not declared in this scope
ui.cpp: In function 'std::string DateTimeStr(int64)':
ui.cpp:73: error: 'wxDateTime' was not declared in this scope
...
I have the following installed as I believe they are dependencies of bitcoin:
wxWidgets-2.9.2
openssl-1.0.0d
boost_1_47_0
db-5.1.19 (I have also tried with db-5.2.28)
The modified makefile I've been using is as follows:
DEPSDIR=/tmp/bitcoin/deps
INCLUDEPATHS= -I"$(DEPSDIR)/include"
LIBPATHS= -L"$(DEPSDIR)/lib"
WXLIBS=$(shell $(DEPSDIR)/bin/wx-config --libs --static)
WXBASELIBS=$(shell $(DEPSDIR)/bin/wx-config --libs base --static)
LIBS= -dead_strip \
$(DEPSDIR)/lib/libdb_cxx-4.8.a \
$(DEPSDIR)/lib/libboost_system.a \
$(DEPSDIR)/lib/libboost_filesystem.a \
$(DEPSDIR)/lib/libcrypto.a
WXDEFS=$(shell $(DEPSDIR)/bin/wx-config --cxxflags) -DNOPCH
DEBUGFLAGS=-g -DwxDEBUG_LEVEL=0
CFLAGS=-O2 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(WXDEFS) $(INCLUDEPATHS)
HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h script.h db.h net.h irc.h main.h rpc.h uibase.h ui.h init.h sha.h
OBJS= \
obj/util.o \
obj/script.o \
obj/db.o \
obj/net.o \
obj/irc.o \
obj/main.o \
obj/rpc.o \
obj/init.o \
cryptopp/obj/sha.o \
cryptopp/obj/cpu.o
all : bitcoin
obj/%.o : %.cpp
g++ $(CFLAGS) -c $<
cryptopp/obj/%.o: cryptopp/%.cpp
g++ $(CFLAGS) -c $<
bitcoin : $(OBJS) obj/ui.o obj/uibase.o
g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(WXLIBS) $(LIBS)
headers.h.gch : headers.h $(HEADERS)
g++ $(CFLAGS) -c $<
obj/nogui/%.o : %.cpp $(HEADERS)
g++ $(CFLAGS) -DwxUSE_GUI=0 -c $<
bitcoind : $(OBJS:obj/%=obj/nogui/%) obj/sha.o
g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(WXBASELIBS) $(LIBS)
clean :
-rm -f bitcoin bitcoind
-rm -f obj/*
-rm -f obj/nogui/*
-rm -f headers.h.gch
As for specific questions to the community or any developer(s) that want to listen:
What should I do to make this work?
Or in the very least, what is the complete, specific list of dependencies that bitcoin-0.3.24 requires?