Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jan 2004 13:24:11 +0200
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        arch@FreeBSD.org
Subject:   Revamp of kerberos5/ makefiles
Message-ID:  <20040119112411.GG41159@FreeBSD.org.ua>

next in thread | raw e-mail | index | archive | help

--c7hkjup166d4FzgN
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Mark Murray suggested that I leak this here in order to bikeshed
it enough before it meets the tree, so here it goes, for those
interested...

----- Forwarded message from Ruslan Ermilov <ru@FreeBSD.org> -----

Date: Thu, 15 Jan 2004 16:47:24 +0200
=46rom: Ruslan Ermilov <ru@FreeBSD.org>
To: Mark Murray <markm@FreeBSD.org>,
	"Jacques A. Vidrine" <nectar@FreeBSD.org>
Cc: Bruce Evans <bde@FreeBSD.org>
Subject: Re: kerberos5/ makefiles revamp

On Wed, Jan 14, 2004 at 12:41:22AM +0200, Ruslan Ermilov wrote:
> I'd like to spend some time now to revamp the kerberos5/ build
> infrastructure [...]
>=20
Attached is the functional diff (style changes omitted) to bring
kerberos5/ makefiles to a normal level, in my definition of
"normal".  ;)

It also accumulates the previous patch to fix dependencies in
the WITH_OPENLDAP case.

The commit log would look alongside this:

: Overhaul of kerberos5/ makefiles.  Most notable changes are:
:=20
: - Dropped support for standalone builds, this was only partially
:   supported anyway, and required so much magic in makefiles that
:   made life dangerous (e.g., by using the custom yacc rules).
:=20
: - Got rid of .OBJDIR in makefiles -- makes building of individual
:   files possible again.
:=20
: - Made the .x.c transformations -j safe.
:=20
: - Reprogrammed LDADD to fix static build of some utilities that
:   was broken.
:=20
: - Removed redundant .h's from SRCS, only kept those that are
:   generated.
:=20
: - libkrb5/ INCS were bogusly installed again with libgssapi/.
:=20
: - Made build-tools real tools with their own makefiles in
:   separate directories.  This allows us to properly track
:   their dependencies, etc.
:=20
: - Faster build, 21% less of makefile code!

What would probably meet some resistance is dropping support
for standalone builds, so let me explain it in a bit more
detail here (not in the commit log) why I think it should be
removed.

First, the definition.  The standalone build is an ability
to just type "make" from the top-level kerberos5/ directory,
and have everything built.

While the intent seems to be clever, the implementation was
only partial and too painful -- lot of trickery in makefiles
to pick up fresh headers and non-determinism (depending on
the order you make things, different headers may be used).

Most importantly, it just didn't work as coded, because to
build the non-lib/ portion of kerberos5/, you need to at
least have libraries installed, to link against them.  Just
to proof, an attempt to build the stock fresh kerberos5/ on
a 134 days old 5.1-CURRENT machine (9ball.rtp.FreeBSD.org)
fails because it attempts to link with an older Heimdal
library from /usr/lib:

=3D=3D=3D> libexec/kdc
kerberos4.o: In function `encode_v4_ticket':
kerberos4.o(.text+0x227): undefined reference to `_krb5_krb_time_to_life'
*** Error code 1

OTOH, dropping support for standalone builds doesn't mean
you can't build it manually, no.  It's still possible, just
requires a bit more than just typing "make".  Specifically,
you should just be following the "buildworld" way to build
things:

make obj (optional)
make depend (optional)
make includes				# build and install includes
(cd lib; make all; make install)	# build and install libraries
make all				# build everything else

We could even add this sequence to a top level kerberos5/Makefile,
as a convenience.  ;)

Comments, questions, reviews, suggestions (not about fixing
style at this time) are highly welcome!

Ah, and the last but not least: it has been intensively tested
on two UP and SMP machines, outside and within the buildworld,
for both native and another platform (TARGET_ARCH=3Dsparc64),
with and without -j, and with and without "make depend" in the
non-buildworld mode.

Please note that before attempting to apply this patch you need
to create new src/kerberos5/tools/* directories from the patch
manually.  The patch is available from:

http://people.FreeBSD.org/~ru/patches/kerberos5-makefiles.patch

----- End forwarded message -----

--=20
Ruslan Ermilov
FreeBSD committer
ru@FreeBSD.org

--c7hkjup166d4FzgN
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFAC75bUkv4P6juNwoRAluPAKCCspwcVGUVwP1waS6yV+2nViw7IgCffnrB
Mkw1FomUNbM6WpBxpXbIL18=
=V4CR
-----END PGP SIGNATURE-----

--c7hkjup166d4FzgN--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040119112411.GG41159>