Title: Unable to compile bitcoin Post by: ioctlvoid on July 19, 2011, 10:22:15 AM 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, 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 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:
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? Title: Re: Unable to compile bitcoin Post by: CERN on July 19, 2011, 01:07:56 PM 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 :) Title: Re: Unable to compile bitcoin Post by: ioctlvoid on July 19, 2011, 01:50:31 PM 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 :) 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 This is after having created the missing symlink as you mentioned. Title: Re: Unable to compile bitcoin Post by: CERN on July 20, 2011, 01:03:12 AM 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 :) Title: Re: Unable to compile bitcoin Post by: ioctlvoid on July 21, 2011, 03:36:49 PM 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 :) 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 Title: Re: Unable to compile bitcoin Post by: CERN on July 21, 2011, 05:38:03 PM Hang in there, you're getting it! :p
Code: net.cpp:22:32: error: miniupnpc/miniwget.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, 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 Title: Re: Unable to compile bitcoin Post by: ioctlvoid on July 21, 2011, 10:20:50 PM Hang in there, you're getting it! :p Code: net.cpp:22:32: error: miniupnpc/miniwget.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, 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, Title: Re: Unable to compile bitcoin Post by: cdnbcguy on July 30, 2011, 06:41:05 PM I advise you to quit this wxwidget version and get the bitcoin-qt version
It compiled for me immediately after I followed the simple instructions. Title: Re: Unable to compile bitcoin Post by: JoelKatz on August 01, 2011, 09:58:47 AM Something went horribly wrong when Berkeley DB configured itself. It should have added this line to db_cxx.h:
#define HAVE_CXX_STDHEADERS 1 |