Bitcoin Forum
November 14, 2024, 08:34:21 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Compiling bitcoind on unix/linux  (Read 17959 times)
Gavin Andresen (OP)
Legendary
*
qt
Offline Offline

Activity: 1652
Merit: 2301


Chief Scientist


View Profile WWW
June 08, 2010, 03:33:24 PM
Last edit: August 27, 2010, 09:45:47 PM by gavinandresen
 #1

It took me a while to figure out where to get the wx_gtk2ud-2.9 library needed to compile bitcoind, so I thought I'd share for anybody else who's not a wxWidgets expert:

Code:
If you want to build bitcoind, the no-gui bitcoin daemon, you need the wxWidgets 'base' library.
After untarring the wxWidgets source:

cd /usr/local/wxWidgets-2.9.0
mkdir buildbase
cd buildbase
../configure --disable-gui --enable-debug --disable-shared --enable-monolithic
make
sudo su
make install
ldconfig

I'd humbly suggest adding the above to the build-unix.txt file...  Satoshi, is there a preferred way to submit patches?

27 Aug 2010:  This is no longer necessary-- bitcoind doesn't require wxwidgets at all any more.

How often do you get the chance to work on a potentially world-changing project?
laszlo
Full Member
***
Offline Offline

Activity: 199
Merit: 2384


View Profile
June 08, 2010, 04:55:23 PM
 #2

Try this: http://heliacal.net/~solar/bitcoin/bitcoin-linuxbuild.pdf


BC: 157fRrqAKrDyGHr1Bx3yDxeMv8Rh45aUet
mtgox
Full Member
***
Offline Offline

Activity: 185
Merit: 102


View Profile WWW
July 17, 2010, 02:17:28 AM
 #3

Why does bitcoind depend on wxWidgets?

mizerydearia
Hero Member
*****
Offline Offline

Activity: 574
Merit: 513



View Profile
July 17, 2010, 08:02:55 AM
 #4

I suggest implementing ncurses client or as bd suggested
Quote
<necrodearia> hmm, an ncurses client would be nice.
<bd_> best to expand the JSON API to be good enough to write a frontend on
<necrodearia> It would reduce the need for wxwidget entirely
<bd_> then put the ncurses client on top
dete
Newbie
*
Offline Offline

Activity: 22
Merit: 0



View Profile
July 18, 2010, 06:05:24 AM
 #5

The problem is that wxWidgets includes a bunch of "core" functionality that isn't related to GUI widgets at all.  String classes and whatnot.  The core of BitCoin was build with those utility classes.

You'll notice that Gavin's configure call disables GUI.

I have a linux box that has no windowing system on it at all; no GTK, no X, nothing.  I did something similar to Gavin and the daemon is running fine.

I'd much prefer if it could be built without wxWidgets, though.  (Or Boost, for that matter!)
mizerydearia
Hero Member
*****
Offline Offline

Activity: 574
Merit: 513



View Profile
July 18, 2010, 08:02:54 AM
 #6

I could use some assistance with preparing an ebuild for svn
http://forums.gentoo.org/viewtopic-p-6348826.html#6348826
Ground Loop
Member
**
Offline Offline

Activity: 111
Merit: 10


View Profile
July 18, 2010, 06:11:32 PM
 #7

I've been trying to build this on a headless (no X, no GUI, no windows, no gtk) system, and wx is having none of it.

Even the baseconfig core functionality seems to require a bunch of gtk headers to be present, which then made me pull in 100+ packages just to compile wx base.  And Boost, of course.

It seems a much more lightweight bitcoind build system should be possible.

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

Activity: 574
Merit: 513



View Profile
July 19, 2010, 12:27:20 AM
Last edit: July 19, 2010, 01:47:05 AM by mizerydearia
 #8

I am inexperienced at programming.  I specialize in scripting and webdev mostly, but once my system is configured to compile bitcoin svn, I will tinker a bit with the code and learn how to modify it to not require wxwidgets, etc.  It will be great opportunity for me to learn a bit about programming.

freenode/wxwidgets
Quote
<necrodearia> I am trying to install bitcoin svn on a gentoo linux system.  It requires wxGTK-2.9.  I have it installed.  When trying to compile the ebuild I wrote http://forums.gentoo.org/viewtopic-p-6348826.html#6348826 I receive errors from /usr/include/wx-2.9/wx/chkconf.h.  I read the comments at the top of the file, but I do not understand them.
<necrodearia> http://pastebin.com/LTL4MNKU
<necrodearia> /* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT *
<Auria> how did you install wx 2.9?
<Auria> looks like a bad install or various mixed up installations
<necrodearia> /usr/lib64/wx/include/gtk2-unicode-2.9/wx/setup.h exists
<necrodearia> Auria, I used http://bugs.gentoo.org/show_bug.cgi?id=298387 to install wxGTK-2.9
<Auria> do you have many wx installs? maybe it pickes the wrong one
<Auria> Ok, don't know gentoo ebuilds much
<Auria> also, can you post the exact errors you get
<necrodearia> Ah, that could be true.  I do have multiple wx installs
<Auria> do you use wx-config? (or does the project use wx-config) wx-config is generally smart at separating separate installaitons properly but you're not helping it by having them in the first place Smiley
<Auria> Often people here will recommend to build wx from source but not install it to /usr/* but just keep it local, avoiding all possible conflicts
<necrodearia> I haven't used wx-config.  I'll check it out.
<Auria> I suppose the project you're building uses it in its build system
<Auria> If not, then it should Wink
<necrodearia> Auria: http://pastebin.com/eyRjiK24
<Auria> you're on OS X?
<Auria> these are from the OS X makefile
<Auria> no gentoo ^^
<Auria> if it's using autotools/CMake maybe it's just importing the wx definition files, and these files mention wx-config
<Auria> anyway, it *probably* uses wx-confog
<necrodearia> I'm using gentoo linux
<Auria> Can you build a mnimal wx sample yourself?
<Auria> If we can move away from that big project it may get easier
<necrodearia> hmm
<necrodearia> The source code contains makefile.mingw, makefile.osx, makefile.unix and makefile.vc.  But it appears only the osx makefile uses wx-config
<necrodearia> s/source code/package/
<Auria> humm, wonder what makefile.unix does then
<Auria> hope it doesn't hardcode build flags
<necrodearia> makefile.unix: http://pastebin.com/HFpFAZmY
<Auria> arg, they hardcode build flags xD
<Auria> very bad idea they had here.
<necrodearia> mm, well, good to know.  I can report it to devteam and maybe they can fix it.
<Auria> yes, they really should use wx-config
<Auria> otherwise only people with exactly the same wxWidgets configuration as them will be able to build the app
mizerydearia
Hero Member
*****
Offline Offline

Activity: 574
Merit: 513



View Profile
July 19, 2010, 08:21:07 AM
 #9

Gentoo Forums are broken for now, so I'll post here.

Related infos:
http://bugs.gentoo.org/show_bug.cgi?id=328391
Emerged wxGTk-2.9 from http://bugs.gentoo.org/show_bug.cgi?id=298387
Code:
layman -a dirtyepic
//configre /etc/portage/package.keywords appropriately
emerge wxGTK

Code:
# eselect wxwidgets list
Available wxWidgets profiles:
  [1]   gtk2-ansi-release-2.6
  [2]   gtk2-unicode-2.9
  [3]   gtk2-unicode-release-2.6
  [4]   gtk2-unicode-release-2.8
# eselect wxwidgets show
Current wxWidgets profile:
  none
# eselect wxwidgets set 2

Setting wxWidgets profile to gtk2-unicode-2.9

# eselect wxwidgets list
Available wxWidgets profiles:
  [1]   gtk2-ansi-release-2.6
  [2]   gtk2-unicode-2.9 *
  [3]   gtk2-unicode-release-2.6
  [4]   gtk2-unicode-release-2.8

Gentoo Ebuild For Bitcoin Subversion Repository

net-p2p/bitcoin/bitcoin-9999.ebuild
net-p2p/bitcoin/files/bitcoin-9999-Makefile.patch

I haven't figured out how to make bitcoind compile though.  If anyone can point out how, I'll update this message.
Also, there may be a few things that I've installed/configured on my system that I haven't incorporated into the ebuild.  If anyone has any issues with my release, please provide detailed output (use pastebin sites) from emerge and other pertinent informations.
mizerydearia
Hero Member
*****
Offline Offline

Activity: 574
Merit: 513



View Profile
August 26, 2010, 07:20:51 AM
 #10

See http://bitcointalk.org/index.php?topic=930.0 for Gentoo ebuild
nimnul
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250


View Profile WWW
August 27, 2010, 07:42:16 PM
 #11

I haven't figured out how to make bitcoind compile though.
Note that bitcoind doesn't depend on wxWidgets anymore.

Anonymous
Guest

January 27, 2011, 02:24:11 AM
 #12

I just setup ubuntu on laptop and installed bitcoin. It worked flawlessly by just copying my existing wallet over.


One less reason to access windows ?
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!