You are not logged in.

#1 2010-07-06 23:04:16

Themaister
Member
From: Trondheim, Norway
Registered: 2008-07-21
Posts: 652
Website

The annoyance of build systems.

Most developers, especially open source devs eventually have to deal with build systems of some sort. The plain make tool is not always sufficient when dealing with customizable build scenarios. Many projects need to autodetect which libraries are present, and add customizability on top of this, which quickly leads into some kind of configure script.

The autotools are well known, but using them quickly turns into autohell. It doesn't feel right in 2010 to support pretty much every posix system made the last 30 years by making the build process complex and arcane. It only makes sense for applications that really need legacy support and maximum portability. Most other build systems seem to simplify things (scons and cmake are somewhat popular), but it seems to me that they aren't as easily customizable from the users point of view, e.g. ./configure --disable-cool-feature-x. Writing custom build scripts and makefiles to get the desired behavior is fun, but the programmer in me sees a pattern here big_smile

The most elegant approach I've found so far seems to be configure, config.h/config.mk together with make. Is there a simple build system out there that has virtually no dependencies (apart from make and shell), while having the basic functionality that a build system needs?

Offline

#2 2010-07-06 23:22:49

Anikom15
Banned
From: United States
Registered: 2009-04-30
Posts: 836
Website

Re: The annoyance of build systems.

GNU Autotools have about as much auto in it as an automobile if you get what I'm saying.

What annoys me is the fact that Windows has a different filesystem than everyone else. Build systems are perpetually doomed to be horrid.

That's why we have administrators, so I don't have to deal with these scripts from Hell, I can just program!

But solo projects...I'm doomed.


Personally, I'd rather be back in Hobbiton.

Offline

#3 2010-07-06 23:34:16

diegonc
Member
Registered: 2008-12-13
Posts: 42

Re: The annoyance of build systems.

Last year for a college project I used toc: the other ./configure.

It is bash based so it is easier to create custom checks than using m4 with autotools. But it is not very portable roll as it requires GNU bash and GNU make.

Offline

#4 2010-07-12 18:29:14

killsto
Member
Registered: 2008-12-09
Posts: 35

Re: The annoyance of build systems.

We use premake. It uses a lua script, but can be pretty muh a config file, to generate the buildfile. On Linux, this is a make fie, On windows, it's a visual studio solution. So, it is a lot like CMake but simpler and cleaner. There is a lot less clutter.

Offline

#5 2010-07-12 18:54:26

Zeist
Arch Linux f@h Team Member
Registered: 2008-07-04
Posts: 532

Re: The annoyance of build systems.

At work we pretty much run everything through cmake since we work on multiple platforms. I do find it to be quite nice once you learn it, and get used to the quirks. It has way more dependencies than just autotools though.


I haven't lost my mind; I have a tape back-up somewhere.
Twitter

Offline

#6 2010-07-12 23:50:20

Bralkein
Member
Registered: 2004-10-26
Posts: 354

Re: The annoyance of build systems.

I'll happily vouch for cmake in terms of simplicity, and the dependencies aren't really that bad IMO. I think you could definitely spend too much time thinking about build systems; looking at cmake you will see that it is modern and it's powerful enough for a complex project like KDE to use so I think it's trustworthy enough. If you're too much of a perfectionist with your tools then you might never end up building anything wink

Offline

#7 2010-07-13 02:18:55

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 859
Website

Re: The annoyance of build systems.

My take on CMake is that I don't trust anything with .txt files smile

Anyway, no one in here likes SCons?

Last edited by tavianator (2010-07-13 02:19:08)

Offline

#8 2010-07-13 10:16:10

warriant
Member
Registered: 2008-10-29
Posts: 22

Re: The annoyance of build systems.

_

Last edited by warriant (2011-06-06 15:53:16)

Offline

#9 2010-07-13 22:03:19

Yannick_LM
Member
Registered: 2008-12-22
Posts: 142

Re: The annoyance of build systems.

We also use CMake at work.

(big projects with Qt, on mac, linux, windows, and also cross-compilation)

it can generate IDE projects file for free

True: eclispe, KDevelop, CodeBlocks, Visual Studio ...
Although since it justs generate makefiles, you can just use "make"

QtCreator 2 + cmake is also SO nice to use.

It also plays nice with other autotools project
(you can use pkg-config from cmake, and so on...)


Also, cmake comes with tons of "ready to use" modules, to do swig, Qt (moc and uic), and so on....

See here



It doesn't feel right in 2010 to support pretty much every posix system made the last 30 years by making the build process complex and arcane

Try to do autotools on windows .... (it may work in cygwin, but still...)
cmake is really nice to use on windows with Visual Studio (AND you can also use cmake in cygwin if you want !)

I guess there are few Visual Studio fans here, but you don't know what your contributors may want to use smile


However, you can't say cmake is a "simple" build system.

autoconf;
Installed Size : 2200.00 K
Depends On     : awk  m4  diffutils  bash


cmake:
Installed Size : 26280.00 K
Depends On     : expat  curl  gcc-libs  shared-mime-info

Also:

it can generate Debian/RPM

I don't trust software that generate debian packages

plain old debian/rules with

cmake -DCMAKE_INSTALL_PREFIX=/usr
make
DESTDIR = debian/project make install

is not that hard.


ctest is also nice to use for automatic testing, and many continuous integration frameworks supports it.

(CDash is ok if you use CVS or SVN)



Stupid bonus: you can generate a graphviz .dot file with the dependencies  between all the targets of your project




Big EDIT:

@killsto:

wahoo! premake looks REALLY nice.
And its blazzing fast, too.

Thanks for this.

Last edited by Yannick_LM (2010-07-13 23:09:31)

Offline

Board footer

Powered by FluxBB