Search content
Sort by

Showing 10 of 10 results by ioctlvoid
Post
Topic
Board Bitcoin Technical Support
Re: Unable to compile bitcoin
by
ioctlvoid
on 21/07/2011, 22:20:50 UTC
Hang in there, you're getting it!  :p

Code:
net.cpp:22:32: error: miniupnpc/miniwget.h: No such file or directory
net.cpp:23:33: error: miniupnpc/miniupnpc.h: No such file or directory
net.cpp:24:36: error: miniupnpc/upnpcommands.h: No such file or directory
net.cpp:25:34: error: miniupnpc/upnperrors.h: No such file or directory

These errors are caused by not having a package called miniupnpc installed...  Should be easy enough to fix, eh?  It's just for UPNP support, very handy

Code:
In file included from main.h:11,
                 from headers.h:96,
                 from script.cpp:4:
db.h: In member function 'bool CDB::Exists(const K&)':
db.h:149: error: 'class Db' has no member named 'exists'

And this...  I'd guess that it's because you installed that new version of berkdb!  Hey, I found out the issue with that btw...  Berkdb does not, by default, create /usr/include/db.h and /usr/include/db_cxx.h symlinks!  No idea why.  I guess they expect the vendors to deal with that, or for people to edit their makefiles to add -I/usr/include/dbX.X to their CFLAGS (but I can't in recent memory recall ever seeing it done that way)

Either way, just do:

rm /usr/include/db.h /usr/include/db_cxx.h
ln -s /usr/include/db4.7/db.h /usr/include/db.h
ln -s /usr/include/db4.7/db_cxx.h /usr/include/db_cxx.h

Hope you get a successful compile now...  If not, I'm always willing to help more  :p

Alright, thanks. I decided to just skip using miniupnpc -- I commented it out in the Makefile. I then proceeded to perform the commands you suggested. Although db4.7 seems to install by default under /usr/localBerkeley*, so my symlinks target that directory instead.

Now I get this error:

Code:
In file included from headers.h:43,
                 from util.cpp:4:
/usr/include/db_cxx.h:59:22: error: iostream.h: No such file or directory
/usr/include/db_cxx.h:60:23: error: exception.h: No such file or directory
In file included from headers.h:43,
                 from script.cpp:4:
/usr/include/db_cxx.h:59:22: error: iostream.h: No such file or directory
/usr/include/db_cxx.h:60:23: error: exception.h: No such file or directory
In file included from headers.h:43,
                 from db.cpp:5:
/usr/include/db_cxx.h:59:22: error: iostream.h: No such file or directory
/usr/include/db_cxx.h:60:23: error: exception.h: No such file or directory
In file included from headers.h:43,
                 from net.cpp:5:
...
Post
Topic
Board Bitcoin Technical Support
Re: Unable to compile bitcoin
by
ioctlvoid
on 21/07/2011, 15:36:49 UTC
The problem this time looks to be that you're using a... err... some weird version of berkdb that doesn't have Db->exists() !

I recommend installing berkdb 4.7.25 -- that's the version the pre-compiled bitcoin client (mine anyway) seems to use  Smiley

Thanks, I'm starting to get very frustrated with this now, I still am not even close to get it working:

I have now removed my previous verison of berkdb (with "make uninstall") and installed berkdb 4.7.25 as you suggsted. This resulted in the following error:

Code:
net.cpp:22:32: error: miniupnpc/miniwget.h: No such file or directory
net.cpp:23:33: error: miniupnpc/miniupnpc.h: No such file or directory
net.cpp:24:36: error: miniupnpc/upnpcommands.h: No such file or directory
net.cpp:25:34: error: miniupnpc/upnperrors.h: No such file or directory
In file included from main.h:11,
                 from headers.h:96,
                 from script.cpp:4:
db.h: In member function 'bool CDB::Exists(const K&)':
db.h:149: error: 'class Db' has no member named 'exists'
In file included from main.h:11,
                 from headers.h:96,
                 from net.cpp:5:
Post
Topic
Board Bitcoin Technical Support
Re: Unable to compile bitcoin
by
ioctlvoid
on 19/07/2011, 13:50:31 UTC
It seems that your installation of Berkeley DB (berkdb, db, whatever you'd call it) is incomplete.

A proper installation of Berkeley DB should install db.h, which is depended on by db_cxx.h (which is also part of berkdb)

I'm guessing that the problem is that you're missing the /usr/include/db.h symlink

Do you have a /usr/include/dbX.X directory, where X.X is your version of berkdb?  Just "ln -s /usr/include/dbX.X/db.h /usr/include/db.h", and all is well Smiley

Thank you.

The program does still not compile, but at least I got a new error (a third variant):

Code:
g++ -c -O2 -Wno-invalid-offsetof -Wformat -g -D__WXDEBUG__ -DNOPCH -DFOURWAYSSE2 -DUSE_SSL -DUSE_UPNP=0 -I/usr/local/lib/wx/include/gtk2-unicode-2.9 -I/usr/local/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -DGUI -o obj/util.o util.cpp
In file included from main.h:11,
                 from headers.h:96,
                 from util.cpp:4:
db.h: In member function 'bool CDB::Exists(const K&)':
db.h:149: error: 'class Db' has no member named 'exists'
make: *** [obj/util.o] Error 1

This is after having created the missing symlink as you mentioned.
Post
Topic
Board Bitcoin Technical Support
Topic OP
Unable to compile bitcoin
by
ioctlvoid
on 19/07/2011, 10:22:15 UTC

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:

Code:
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:

Code:
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:

Code:

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?
Post
Topic
Board Beginners & Help
Topic OP
Bitcoin dependencies in GNU/Linux
by
ioctlvoid
on 18/07/2011, 04:09:07 UTC
What are the dependencies of bitcoin 0.3.24 in GNU/Linux?
Post
Topic
Board Beginners & Help
Re: Unable to compile bitcoin
by
ioctlvoid
on 17/07/2011, 07:05:30 UTC
I have now tried with both db-5.1.19.tar.gz and db-5.2.28.tar.gz just to see if 5.1.19 was a too old version of the library. It doesn't seem to make any difference -- the compiler error is the exact same.

Could anyone please list all the dependencies of bitcoin? Or is that stated somewhere in the documentation, have I managed to overlook it? It would be a great help to know exactly what the dependencies/requirements of bitcoin are in order for me to make it work. Am I really the only one that has this problem?
Post
Topic
Board Beginners & Help
Re: Introduce yourself :)
by
ioctlvoid
on 17/07/2011, 06:58:16 UTC
I'm a computer science grad student. My interests are assembly (x86), C/C++, GNU/Linux, CPU architecture, hobbyist OS development, OpenGL, game development, democoding, electronics and retro gaming.

I have now spent several hours trying to compile bitcoin, still without it working. This makes me quite sad. In one of my cryptography classes several years ago I was introduced to the concept of "digital cash" (primarily the mathematics thereof), but I will admit that I didn't know it was actually implemented like this prior to seeing the recent Slashdot article. So I thought I would just try it for myself -- too bad I'm spending so much time just trying to compile the thing.
Post
Topic
Board Beginners & Help
Re: Unable to compile bitcoin
by
ioctlvoid
on 16/07/2011, 19:54:14 UTC
I might be making some progress here, I'm not sure.

I've been trying to follow the guide at (the PDF file) http://forums.atomicmpc.com.au/index.php?showtopic=39944
I installed all of the dependencies and then tried to use the Makefile presented in the document. This however only resulted in errors from make -- not errors from the compiler. With an unspecified rule.

I was unable to modify the Makefile trivially so I made more than just a few modifications, this is my Makefile for bitcoin now:

Code:
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

This at least does not stop prior to compilation even starting (unlike the previously mentioned Makefile). However I get the following compiler errors:

Code:
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
...
Post
Topic
Board Beginners & Help
Re: Unable to compile bitcoin
by
ioctlvoid
on 15/07/2011, 16:46:21 UTC

You might need libdb4.8++-dev or something like it.


Thank you for the help.

I've been trying this for a few hours now. I downloaded libdb4.8-dev_4.8.24-1ubuntu1_i386.deb from http://packages.ubuntu.com/lucid/i386/libdb4.8-dev/download. Converted it to TGZ with Alien and installed it, then finally ran ldconfig.

The compilation still fails, but the compiler added one new line:

Code:
/usr/include/db_cxx.h:796: error: 'DB_XIDDATASIZE' was not declared in this scope

The full compiler error is:

Code:
g++ -c -O2 -Wno-invalid-offsetof -Wformat -g -D__WXDEBUG__ -DNOPCH -DFOURWAYSSE2 -DUSE_SSL -DUSE_UPNP=0 -I/usr/local/lib/wx/include/gtk2-unicode-2.9 -I/usr/local/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -DGUI -o obj/util.o util.cpp
In file included from headers.h:43,
                 from util.cpp:4:
/usr/include/db_cxx.h:796: error: 'DB_XIDDATASIZE' was not declared in this scope
In file included from main.h:11,
                 from headers.h:96,
                 from util.cpp:4:
db.h: In member function 'bool CDB::Exists(const K&)':
db.h:149: error: 'class Db' has no member named 'exists'
make: *** [obj/util.o] Error 1

Any ideas?
Post
Topic
Board Beginners & Help
Topic OP
Unable to compile bitcoin
by
ioctlvoid
on 14/07/2011, 05:19:23 UTC
Hello everyone,
I thought I would try this [bitcoin] out but I am unable to compile the latest bitcoin client (bitcoin-0.3.24).

I'm using 32-bit Slackware 13.1.0. When I initially attempted to compile I got errors related to wxWidgets being missing. This was resolved by compiling and installing wxWidgets. However I still get the following error:

Code:
g++ -c -O2 -Wno-invalid-offsetof -Wformat -g -D__WXDEBUG__ -DNOPCH -DFOURWAYSSE2 -DUSE_SSL -DUSE_UPNP=0 -I/usr/local/lib/wx/include/gtk2-unicode-2.9 -I/usr/loal/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -DGUI -o obj/util.o util.cpp
In file included from main.h:11,
                 from headers.h:96,
                 from util.cpp:4:
db.h: In member function 'bool CDB::Exists(const K&)':
db.h:149: error: 'class Db' has no member named 'exists'
make: *** [obj/util.o] Error 1

I have tried to grep for the class definition of "Db" but I am unable to find it. Where is it? Is this a programming error from the developers of bitcoin, or is this a particular issue at my system?

However, most importantly, if there is a solution for this problem then please tell me.

I also tried simply running the binary that was distributed with the package, but that resulted in the following error:

Code:
./bitcoin: symbol lookup error: ./bitcoin: undefined symbol: gtk_widget_get_realized