Bitcoin Forum
September 30, 2016, 11:49:07 PM *
News: Due to DDoS attacks, there may be periodic downtime.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Build system  (Read 1426 times)
dkaparis
Jr. Member
*
Offline Offline

Activity: 53


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. Advertise here.
1475279347
Hero Member
*
Offline Offline

Posts: 1475279347

View Profile Personal Message (Offline)

Ignore
1475279347
Reply with quote  #2

1475279347
Report to moderator
1475279347
Hero Member
*
Offline Offline

Posts: 1475279347

View Profile Personal Message (Offline)

Ignore
1475279347
Reply with quote  #2

1475279347
Report to moderator
1475279347
Hero Member
*
Offline Offline

Posts: 1475279347

View Profile Personal Message (Offline)

Ignore
1475279347
Reply with quote  #2

1475279347
Report to moderator
BlackEye
Newbie
*
Offline Offline

Activity: 17


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.

1CLJbMgYsaRUbcN2LwQDx2WkG3NJJ2KyJr
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652


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


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: 1470


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

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

Jeff Garzik, bitcoin core dev team and BitPay engineer; opinions are my own, not my employer.
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
teknohog
Sr. Member
****
Offline Offline

Activity: 410


minor developer


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.

dkaparis
Jr. Member
*
Offline Offline

Activity: 53


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


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: 728

BitShares


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://steemit.com  Blogging is the new Mining
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!