Bitcoin Forum
May 10, 2024, 09:34:00 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Build system  (Read 8374 times)
dkaparis (OP)
Newbie
*
Offline Offline

Activity: 53
Merit: 0


View Profile
July 25, 2010, 09:41:03 AM
 #1

Having being tinkering with the bundled makefiles for some time now, I'd suggest we convert the build system to CMake (http://www.cmake.org/).

It's a cross-platform build system that generates build files for the platform's native tools (makefiles, MSVC project files, etc.).
The benefits:

- no need to maintain makefiles for all platforms, just one set of CMake files that will support any platform that CMake is available on.

- simplified build procedure - instead of tinkering with the bundled makefiles, run CMake to generate makefiles ready to build on your platform. Additionally, CMake can automatically detect installations of required libraries with specially written modules. For popular libraries, such modules are available with CMake installation and others can be written.

I've already used CMake for a bunch of projects and it does deliver. I can make the conversion. Any interest?
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715333640
Hero Member
*
Offline Offline

Posts: 1715333640

View Profile Personal Message (Offline)

Ignore
1715333640
Reply with quote  #2

1715333640
Report to moderator
BlackEye
Newbie
*
Offline Offline

Activity: 17
Merit: 0


View Profile
July 25, 2010, 02:02:26 PM
 #2

+1 vote for CMake.  The syntax is easy to understand and it can create makefiles for a multitude of compilers.
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652
Merit: 2216


Chief Scientist


View Profile WWW
July 25, 2010, 02:20:07 PM
 #3

Is there something simpler than CMake that would work?

cmake-2.8.2.tar.gz - 5.1MB
cmake-2.8.2-Darwin-universal.dmg - 27.2 MB

Adding Yet Another Multi-Megabyte Dependency to build bitcoind seems like a backwards step to me.

What's the most popular build solution for other small-ish, successful open source projects?

How often do you get the chance to work on a potentially world-changing project?
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652
Merit: 2216


Chief Scientist


View Profile WWW
July 25, 2010, 02:39:04 PM
 #4

Answering my own questions:  Project using CMake

I looked at 'weechat'; they're migrating from gnu autotools to cmake (still support both, but recommend cmake).

So another +1 for cmake.

How often do you get the chance to work on a potentially world-changing project?
jgarzik
Legendary
*
qt
Offline Offline

Activity: 1596
Merit: 1091


View Profile
July 25, 2010, 05:25:37 PM
 #5

Does CMake enable, as easily, cross-compilation using mingw?

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

Activity: 519
Merit: 252


555


View Profile WWW
July 25, 2010, 05:28:59 PM
 #6

Is there something simpler than CMake that would work?

cmake-2.8.2.tar.gz - 5.1MB
cmake-2.8.2-Darwin-universal.dmg - 27.2 MB

Adding Yet Another Multi-Megabyte Dependency to build bitcoind seems like a backwards step to me.

I don't think that is a huge problem for _build_ dependencies. Most users will not need this to run bitcoin, any more than they need gcc.

I cannot comment on the differences between these tools, but some kind of automated makefile generator is seriously needed. I only have experience in writing makefiles by hand, and for my own builds I used the output of wx-config and similar utilities. Of couse, any sensible configure script uses these, and anything automated seems better than writing makefiles by hand for each different library version.

world famous math art | masternodes are bad, mmmkay?
Every sha(sha(sha(sha()))), every ho-o-o-old, still shines
dkaparis (OP)
Newbie
*
Offline Offline

Activity: 53
Merit: 0


View Profile
July 25, 2010, 09:09:35 PM
 #7

Does CMake enable, as easily, cross-compilation using mingw?

Yes, see here: http://www.cmake.org/Wiki/CmakeMingw

Other than that, CMake can generate the following (taken from documentation):
Borland Makefiles
MSYS Makefiles
MinGW Makefiles
NMake Makefiles
Unix Makefiles
Visual Studio 10
Visual Studio 10 Win64
Visual Studio 6
Visual Studio 7
Visual Studio 7 .NET 2003
Visual Studio 8 2005
Visual Studio 8 2005 Win64
Visual Studio 9 2008
Visual Studio 9 2008 Win64
Watcom WMake
CodeBlocks - MinGW Makefiles
CodeBlocks - NMake Makefiles
CodeBlocks - Unix Makefiles
Eclipse CDT4 - MinGW Makefiles
Eclipse CDT4 - NMake Makefiles
Eclipse CDT4 - Unix Makefiles
falkenberg
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
July 28, 2010, 08:40:31 PM
 #8

interesting. I'd like to try. When I'll have the results I'll post here.
A small problem I had is the absence of Berkley DB search function in standard cmake distro. Does anybody have a good one? I found some for Berkley DB only, but db_cxx is needed for bitcoin.
bytemaster
Hero Member
*****
Offline Offline

Activity: 770
Merit: 566

fractally


View Profile WWW
July 28, 2010, 09:02:06 PM
 #9

I have used cmake as well as auto tools.  cmake is great for cross platform support and I develop cross platform code full time (Mac, Linux, MinGW, VC++).

https://fractally.com - the next generation of decentralized autonomous organizations (DAOs).
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!