Show Posts
|
Pages: [1]
|
Is anyone up to updating the CMake file? I'd love to get Bitcoin to build on my box, but the existing build system (or lack thereof) just doesn't work on it. I have no problem building Vidalia (a Qt app which uses CMake as build system), and I've been porting my projects to CMake, but none of them are GUI projects. I started to port Bitcoin to CMake, found that CMake doesn't have a library find module for Berkeley DB, searched for it, and landed on dkaparis's site.
|
|
|
I just cloned it and ran cmake and got this:
-- Found wxWidgets: TRUE -- Found OpenSSL: /usr/lib/libssl.so;/usr/lib/libcrypto.so -- Boost version: 1.46.1 -- Found the following Boost libraries: -- system -- filesystem -- program_options -- thread -- date_time -- regex -- Could NOT find DB (missing: DB_LIBRARIES) CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: DB_LIB linked by target "bitcoin" in directory /home/phma/crypt/bitcoin-cmake linked by target "bitcoind" in directory /home/phma/crypt/bitcoin-cmake
-- Configuring incomplete, errors occurred!
I have several versions of db installed:
db-2.7.7nb3 = Sleepycat Software's Berkeley DB version 2 db3-3.11.2nb4 Sleepycat Software's Berkeley DB version 3 db4-4.8.30 = Berkeley DB version 4 from Oracle db46-4.6.21 = Berkeley DB version 4 from Oracle db5-5.2.28 = Berkeley DB version 5 from Oracle
And why is it looking for wxWidgets instead of Qt?
|
|
|
I don't know what it's incompatible with. I quoted the file.
I installed db 4.8 and changed the "46" in the makefile to "4". I'm still getting serialize errors. There are two it could be getting: /usr/include/sys/serialize.h /usr/local/src/bitcoin-0.3.24/src/src/serialize.h
|
|
|
db46-4.6.21 bitcoin-0.3.24 From the build-unix file: You need Berkeley DB 4.7. Don't use 4.8, the database/log0000* files are incompatible.
How hard would it be to make the build process use cmake or the like so that this sort of mess wouldn't happen?
|
|
|
I had to remove crypter from the Makefile (there's no such file in the source) and change "db4" to "db46". I still get an error relating to serialize: # gmake -f ./makefile.dfly bitcoind g++ -c -O2 -Wno-invalid-offsetof -Wformat -g -D__WXDEBUG__ -std=gnu++0x -DNOPCH -DUSE_SSL -UUSE_UPNP -I/usr/pkg/include -I/usr/pkg/include/db46 -o obj/nogui/util.o util.cpp g++ -c -O2 -Wno-invalid-offsetof -Wformat -g -D__WXDEBUG__ -std=gnu++0x -DNOPCH -DUSE_SSL -UUSE_UPNP -I/usr/pkg/include -I/usr/pkg/include/db46 -o obj/nogui/script.o script.cpp g++ -c -O2 -Wno-invalid-offsetof -Wformat -g -D__WXDEBUG__ -std=gnu++0x -DNOPCH -DUSE_SSL -UUSE_UPNP -I/usr/pkg/include -I/usr/pkg/include/db46 -o obj/nogui/db.o db.cpp In file included from headers.h:91, from db.cpp:5: serialize.h: In function 'void Serialize(Stream&, const T&, long int, int) [with Stream = CDataStream, T = std::tuple<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, long long unsigned int>]': serialize.h:1081: instantiated from 'CDataStream& CDataStream::operator<<(const T&) [with T = std::tuple<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, long long unsigned int>]' db.cpp:643: instantiated from here serialize.h:392: error: 'const class std::tuple<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, long long unsigned int>' has no member named 'Serialize' gmake: *** [obj/nogui/db.o] Error 1
|
|
|
I'm getting an error; there are two files called serialize.h, and apparently it's getting the wrong one. The error is: # gmake -f ./makefile.unix bitcoind g++ -c -O2 -Wno-invalid-offsetof -Wformat -g -D__WXDEBUG__ -DNOPCH -DFOURWAYSSE2 -DUSE_SSL -std=gnu++0x -I/usr/pkg/include -I/usr/pkg/include/db46 -DUSE_UPNP=0 -o obj/nogui/db.o db.cpp In file included from headers.h:91, from db.cpp:5: serialize.h: In function 'void Serialize(Stream&, const T&, long int, int) [with Stream = CDataStream, T = std::tuple<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, long long unsigned int>]': serialize.h:1081: instantiated from 'CDataStream& CDataStream::operator<<(const T&) [with T = std::tuple<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, long long unsigned int>]' db.cpp:643: instantiated from here serialize.h:392: error: 'const class std::tuple<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, long long unsigned int>' has no member named 'Serialize' gmake: *** [obj/nogui/db.o] Error 1 There are /usr/include/sys/serialize.h and bitcoin-0.3.24/src/src/serialize.h. I'm using DragonFly 2.11. I modified makefile.unix as follows: CXX=g++
WXINCLUDEPATHS=$(shell wx-config --cxxflags)
WXLIBS=$(shell wx-config --libs)
USE_UPNP:=0
DEFS=-DNOPCH -DFOURWAYSSE2 -DUSE_SSL -std=gnu++0x -I/usr/pkg/include -I/usr/pkg/include/db46
# for boost 1.37, add -mt to the boost libraries LIBS= \ -Wl,-Bstatic -L/usr/pkg/lib \ -l boost_system \ -l boost_filesystem \ -l boost_program_options \ -l boost_thread \ -l db46_cxx \ -l ssl \ -l crypto
ifdef USE_UPNP LIBS += -l miniupnpc DEFS += -DUSE_UPNP=$(USE_UPNP) endif
LIBS+= \ -Wl,-Bdynamic \ -l gthread-2.0 \ -l z \ -l dl \ -l pthread There's also a db5 package. I tried it and got an error, switched to db46, and still got an error.
|
|
|
I rebuilt wxWidgets, but still get the error. There are now so files, but not the one it's looking for. I configured it like this:
# ../configure --with-gtk --enable-shared
It outputs this:
Configured wxWidgets 2.9.1 for `i386-unknown-dragonfly2.9'
Which GUI toolkit should wxWidgets use? GTK+ 2 with support for GTK+ printing Should wxWidgets be compiled into single library? no Should wxWidgets be linked as a shared library? yes Should wxWidgets support Unicode? yes (using UTF-8) What level of wxWidgets compatibility should be enabled? wxWidgets 2.6 no wxWidgets 2.8 yes Which libraries should wxWidgets use? STL no jpeg builtin png builtin regex builtin tiff builtin zlib sys expat builtin libmspack no sdl no
|
|
|
I had to change "#ifdef BSD" to "#ifdef SO_NOSIGPIPE" in net.cpp to get it to compile. According to Sascha Wildner, SO_NOSIGPIPE exists on FreeBSD, but not Net, Open, or DragonFly.
It compiled, but did not link. Here are the results:
g++ -O2 -Wno-invalid-offsetof -Wformat -g -D__WXDEBUG__ -D__WXGTK__ -DNOPCH -DFOURWAYSSE2 -DUSE_SSL -I"/usr/local/include/wx-2.9" -I"/usr/pkg/include" -I"/usr/pkg/include/db5" -I"/usr/local/lib/wx/include/gtk2-unicode-static-2.9" -o bitcoin 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 obj/ui.o obj/uibase.o obj/sha256.o -Wl,-Bstatic -l wx_gtk2ud-2.9 -Wl,-Bdynamic -l gtk-x11-2.0 -l Xxf86vm -l SM -Wl,-Bstatic -l boost_system-mt -l boost_filesystem-mt -l boost_program_options-mt -l boost_thread-mt -l db_cxx -l ssl -l crypto -Wl,-Bdynamic -l gthread-2.0 -l z -l dl /usr/libexec/binutils217/elf/ld: cannot find -lwx_gtk2ud-2.9 gmake: *** [bitcoin] Error 1 [1] Done kwrite config [2] Done kwrite ./net.cpp # locate wx_gtk /usr/local/lib/libwx_gtk2u_adv-2.9.a /usr/local/lib/libwx_gtk2u_aui-2.9.a /usr/local/lib/libwx_gtk2u_core-2.9.a /usr/local/lib/libwx_gtk2u_gl-2.9.a /usr/local/lib/libwx_gtk2u_html-2.9.a /usr/local/lib/libwx_gtk2u_media-2.9.a /usr/local/lib/libwx_gtk2u_propgrid-2.9.a /usr/local/lib/libwx_gtk2u_qa-2.9.a /usr/local/lib/libwx_gtk2u_ribbon-2.9.a /usr/local/lib/libwx_gtk2u_richtext-2.9.a /usr/local/lib/libwx_gtk2u_stc-2.9.a /usr/local/lib/libwx_gtk2u_xrc-2.9.a /usr/local/src/wxWidgets-2.9.1/lib/libwx_gtk2u_adv-2.9.a /usr/local/src/wxWidgets-2.9.1/lib/libwx_gtk2u_aui-2.9.a /usr/local/src/wxWidgets-2.9.1/lib/libwx_gtk2u_core-2.9.a /usr/local/src/wxWidgets-2.9.1/lib/libwx_gtk2u_gl-2.9.a /usr/local/src/wxWidgets-2.9.1/lib/libwx_gtk2u_html-2.9.a /usr/local/src/wxWidgets-2.9.1/lib/libwx_gtk2u_media-2.9.a /usr/local/src/wxWidgets-2.9.1/lib/libwx_gtk2u_propgrid-2.9.a /usr/local/src/wxWidgets-2.9.1/lib/libwx_gtk2u_qa-2.9.a /usr/local/src/wxWidgets-2.9.1/lib/libwx_gtk2u_ribbon-2.9.a /usr/local/src/wxWidgets-2.9.1/lib/libwx_gtk2u_richtext-2.9.a /usr/local/src/wxWidgets-2.9.1/lib/libwx_gtk2u_stc-2.9.a /usr/local/src/wxWidgets-2.9.1/lib/libwx_gtk2u_xrc-2.9.a
|
|
|
It looks like I build wxWidgets wrong. I had to define __WXX11__ instead of __WXGTK__, and Bitcoin still doesn't compile.
|
|
|
Next problem: It's looking for wx/gtk/chkconf.h. It's actually wx/x11/chkconf.h. I'm going to symlink the directory and see if that works.
|
|
|
I downloaded wxWidgets and compiled it (which took some hacking and a fix to one of the include files in world) and installed it. Then I tried to build Bitcoin and got this error:
g++ -c -O2 -Wno-invalid-offsetof -Wformat -g -D__WXDEBUG__ -D__WXGTK__ -DNOPCH -DFOURWAYSSE2 -DUSE_SSL -I"/usr/local/include/wx-2.9" -I"/usr/local/lib/wx/include/gtk2-unicode-debug-static-2.9" -DGUI -o obj/util.o util.cpp In file included from /usr/local/include/wx-2.9/wx/defs.h:26, from /usr/local/include/wx-2.9/wx/wx.h:15, from headers.h:30, from util.cpp:5: /usr/local/include/wx-2.9/wx/platform.h:256:22: error: wx/setup.h: No such file or directory In file included from /usr/local/include/wx-2.9/wx/platform.h:711, from /usr/local/include/wx-2.9/wx/defs.h:26, from /usr/local/include/wx-2.9/wx/wx.h:15, from headers.h:30, from util.cpp:5: /usr/local/include/wx-2.9/wx/chkconf.h:94:9: error: #error "wxUSE_ANY must be defined, please read comment near the top of this file."
This is only the start of several screenfuls of errors ending with gmake giving up. Did I misinstall wxWidgets?
I also notice that makefile.unix has hardcoded paths in /usr/local/include/. If wxWidgets were installed as a package, the include files would be in /usr/include or /usr/pkg/include, depending on the package manager. Could you set the build process up with cmake or autotools so that they would find the right include paths?
|
|
|
|