Bitcoin Forum
May 08, 2024, 12:27:50 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: bitcoind without wxWidgets  (Read 10362 times)
satoshi (OP)
Founder
Sr. Member
*
qt
Offline Offline

Activity: 364
Merit: 6723


View Profile
July 26, 2010, 05:23:33 PM
 #1

I replaced the last of the few wxBase dependencies in bitcoind.

bitcoind now compiles without wxWidgets or wxBase in SVN rev 112.

main(int argc, char* argv[]) is added to init.cpp.  CMyApp and the Startup folder stuff are moved to ui.cpp.  ui.cpp and uibase.cpp aren't linked by bitcoind.

The makefiles have -DGUI to control whether the GUI is used.

I test compiled MinGW, VC and Ubuntu.  I don't know if I broke the Mac OSX build, someone will need to check that.
1715128070
Hero Member
*
Offline Offline

Posts: 1715128070

View Profile Personal Message (Offline)

Ignore
1715128070
Reply with quote  #2

1715128070
Report to moderator
1715128070
Hero Member
*
Offline Offline

Posts: 1715128070

View Profile Personal Message (Offline)

Ignore
1715128070
Reply with quote  #2

1715128070
Report to moderator
Activity + Trust + Earned Merit == The Most Recognized Users on Bitcointalk
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715128070
Hero Member
*
Offline Offline

Posts: 1715128070

View Profile Personal Message (Offline)

Ignore
1715128070
Reply with quote  #2

1715128070
Report to moderator
1715128070
Hero Member
*
Offline Offline

Posts: 1715128070

View Profile Personal Message (Offline)

Ignore
1715128070
Reply with quote  #2

1715128070
Report to moderator
jgarzik
Legendary
*
qt
Offline Offline

Activity: 1596
Merit: 1091


View Profile
July 26, 2010, 06:20:15 PM
 #2


Fantastic, thanks!

Now if only Fedora would ship elliptic curve crypto, it would build on Fedora.  (Fedora excises that due to patent encumbrace)

Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
rodin
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
July 26, 2010, 06:22:51 PM
Last edit: July 28, 2010, 06:18:45 PM by rodin
 #3

Anyone else tried building on Ubuntu? I get a weird linker error with the boost_threads library. It has nothing to do with Bitcoin per se, except that the client now uses boost threads and my boost installation is being weird. Can anyone else reproduce while I sit here feeling like an idiot?


g++ -O2 -Wno-invalid-offsetof -Wformat -g -D__WXDEBUG__ -D__WXGTK__ -DNOPCH -I"/usr/include" -I"/usr/local/include/wx-2.9" -I"/usr/local/lib/wx/include/gtk2-unicode-debug-static-2.9" -o bitcoind -L"/usr/lib" -L"/usr/local/lib" obj/nogui/util.o obj/nogui/script.o obj/nogui/db.o obj/nogui/net.o obj/nogui/irc.o obj/nogui/main.o obj/nogui/rpc.o obj/nogui/init.o obj/sha.o -Wl,-Bstatic -l boost_system -l boost_filesystem -l boost_program_options -l boost_thread -l db_cxx -l crypto -Wl,-Bdynamic -l gthread-2.0
/usr/bin/ld: cannot find -lboost_thread
collect2: ld returned 1 exit status
make: *** [bitcoind] Error 1


It looks like libboostthread is missing. But:


~/dev/bitcoin/trunk$ locate libboost_thread
/usr/local/lib/libboost_thread.so
/usr/local/lib/libboost_thread.so.1.40.0
ArtForz
Sr. Member
****
Offline Offline

Activity: 406
Merit: 257


View Profile
July 26, 2010, 06:28:09 PM
 #4


g++ -O2 -Wno-invalid-offsetof -Wformat -g -D__WXDEBUG__ -D__WXGTK__ -DNOPCH -I"/usr/include" -I"/usr/local/include/wx-2.9" -I"/usr/local/lib/wx/include/gtk2-unicode-debug-static-2.9" -o bitcoind -L"/usr/lib" -L"/usr/local/lib" obj/nogui/util.o obj/nogui/script.o obj/nogui/db.o obj/nogui/net.o obj/nogui/irc.o obj/nogui/main.o obj/nogui/rpc.o obj/nogui/init.o obj/sha.o -Wl,-Bstatic -l boost_system -l boost_filesystem -l boost_program_options -l boost_thread -l db_cxx -l crypto -Wl,-Bdynamic -l gthread-2.0
/usr/bin/ld: cannot find -lboost_thread
collect2: ld returned 1 exit status
make: *** [bitcoind] Error 1


It looks like libboostthread is missing. But:

~/dev/bitcoin/trunk$ locate libboost_thread
/usr/local/lib/libboost_thread.so
/usr/local/lib/libboost_thread.so.1.40.0

notice the -l boost_thread comes after a -Bstatic
it's trying to link libboost_thread statically and can't find libboost_thread.a

bitcoin: 1Fb77Xq5ePFER8GtKRn2KDbDTVpJKfKmpz
i0coin: jNdvyvd6v6gV3kVJLD7HsB5ZwHyHwAkfdw
rodin
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
July 26, 2010, 06:42:25 PM
 #5

notice the -l boost_thread comes after a -Bstatic
it's trying to link libboost_thread statically and can't find libboost_thread.a

D'oh. Thanks.
lachesis
Full Member
***
Offline Offline

Activity: 210
Merit: 104


View Profile
July 27, 2010, 01:07:39 AM
 #6

I replaced the last of the few wxBase dependencies in bitcoind.

bitcoind now compiles without wxWidgets or wxBase in SVN rev 112.

main(int argc, char* argv[]) is added to init.cpp.  CMyApp and the Startup folder stuff are moved to ui.cpp.  ui.cpp and uibase.cpp aren't linked by bitcoind.

The makefiles have -DGUI to control whether the GUI is used.

I test compiled MinGW, VC and Ubuntu.  I don't know if I broke the Mac OSX build, someone will need to check that.

Awesome! That's really great news. I thought wxbase was to integrated with the software for this, but I'm glad I was wrong.

Bitcoin Calculator | Scallion | GPG Key | WoT Rating | 1QGacAtYA7E8V3BAiM7sgvLg7PZHk5WnYc
aceat64
Full Member
***
Offline Offline

Activity: 307
Merit: 102



View Profile
July 28, 2010, 09:54:48 PM
 #7

Great job satoshi! Some of my nodes have seen >100% increase in block generation speed, not to mention it was MUCH easier to compile bitcoind.
Ground Loop
Member
**
Offline Offline

Activity: 111
Merit: 10


View Profile
July 29, 2010, 12:35:59 AM
 #8

Excellent improvement!  I pulled down the SVN tip and had no trouble building on my headless server.
No X11, no Wx, and RPC password support.. sweet.

Thanks!

Bitcoin accepted here: 1HrAmQk9EuH3Ak6ugsw3qi3g23DG6YUNPq
Cdecker
Hero Member
*****
Offline Offline

Activity: 489
Merit: 504



View Profile WWW
July 29, 2010, 10:33:57 AM
 #9

Thank you very much.
Using this I finally managed to get the openSuse Build Service to create a running version of bitcoind for Ubuntu 10.04. Hopefully some more systems will follow, but there's always the problems with the dependencies.

https://build.opensuse.org/package/show?package=bitcoind&project=home:cdecker

Want to see what developers are chatting about? http://bitcoinstats.com/irc/bitcoin-dev/logs/
Bitcoin-OTC Rating
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!