Samba 4 build system - more thoughts on scons

Albert Chin samba-technical at mlists.thewrittenword.com
Tue Sep 20 02:59:19 GMT 2005


On Sat, Sep 17, 2005 at 09:00:56PM +0200, Jelmer Vernooij wrote:
> The problems with the combination of autoconf and make are:
> - - hard to write (various technologies thrown together). Writing M4
> that generates shell scripts that generate perl code that generates
> Makefiles is not really the ideal way of working.

So are the various technologies wrong or how they are mixed
together/used?

> - - generates large amount of data (800kb configure script!) that needs
> to be in the tarball

Disk is cheap. If autoconf makes a package easy to build and the
configure script is big, fine by me.

> - - incompatibilities between various versions of make

Require GNU make.

> - - slow

How about using config.cache? Or config.site? For someone building
Samba once, a slow ./configure isn't a big deal.

> - - portability layer and build data thrown together

You mean in a single config.h file? You can have multiple like the
Glib folks do but you need to manually generate other "config.h"
files.

> - - duplicated work (other projects need to have the same tests, code)

Splitting the tests to separate .m4 files solves part of it.

> - - cross-compilation hard to get right (we currently have it, but the
> HOSTCC code is rather hackish)

How many people use cross-compilation to justify spending time on it?

> Several alternatives are available - most of which integrate the
> configure and build stages. However, we have a large number of
> requirements for our build system:
> 
> [ requirements snipped ]

am-utils runs on a very large number of systems. autoconf works for
them.

Keep in mind the people that will be _building_ samba (users,
distributors). They're all familiar with autoconf.

Also, if you switch, it should be possible to specify the following:
  CC=[custom C compiler, probably from the vendor] \
  CFLAGS=[custom C flags] \
  CPPFLAGS=[-I paths to search for readline, OpenLDAP, etc.] \
  LDFLAGS=[-L paths to search for readline, OpenLDAP, etc., and
           flags like -R to embed the runtime path of these
           3rd-party libraries]

We build tons of freeware on various systems. I dislike every build
system except for autoconf. But, I'm looking at it from the viewpoint
of an end-user who _builds_ software, not develops it.

-- 
albert chin (china at thewrittenword.com)


More information about the samba-technical mailing list