Subject: pkg/24378: packages which require automake 1.8 are broken by tools.mk
To: None <gnats-bugs@gnats.netbsd.org>
From: None <root@garbled.net>
List: netbsd-bugs
Date: 02/10/2004 01:58:23
>Number:         24378
>Category:       pkg
>Synopsis:       packages which require automake 1.8 are broken by tools.mk
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 10 08:58:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Tim Rightnour
>Release:        NetBSD 1.6.1
>Organization:
	
>Environment:
	
	
System: NetBSD polaris 1.6.1 NetBSD 1.6.1 (POLARIS) #7: Tue Oct 21 16:55:38 MST 2003 root@polaris:/usr/src/netbsd16/sys/arch/i386/compile/POLARIS i386
Architecture: i386
Machine: i386
>Description:

Any package that requires automake version 1.8 to rebuild it's configure
script as part of the build process, will not function properly due to the
changes in tools.mk.

The tools.mk AUTOCONF_OVERRIDE settings, create stub scripts for each auto-tool
which calls missing, to prevent the running of automake tools during the build.
However, this has the side-effect, of preventing those tools from running at
all when expressly called by the package.  

net/zebra is a good example of how this fails.  The package attempts to
execute ${AUTORECONF} in the pre-configure stage.  autoreconf tries to run
aclocal, and the other auto-tools, but instead can only find the stubs we have
created for them in work/.tools/bin.  It then fails to rebuild the
configure script.  In this case, the package has expressly asked that
configure be rebuilt, but it cannot be, because the build machinery prevents
it from working properly.  Even if you call ${ACLOCAL} manually, rather than
via autoreconf, it will fail, because it cannot find the proper autom4te
binary. See output:

===> Configuring for zebra-0.94nb1
cd /obj/net/zebra/work/zebra-0.94 && /usr/pkg/bin/autoreconf --force
WARNING: `aclocal' is missing on your system.  You should only need it if
         you modified `acinclude.m4' or `configure.ac'.  You might want
         to install the `Automake' and `Perl' packages.  Grab them from
         any GNU archive site.

The zebra pkg will build, though it is likely not building correctly.  Had
zebra been one of the packages that ships without a configure script in the
tarball, it would have not passed the configure stage, as no configure script
would have been generated.

It would seem that packages that use automake-1.4, are immune to this problem,
only by virtue of the fact that the older aclocal program, does not attempt
to call autom4te.

	
>How-To-Repeat:
cd pkgsrc/net/zebra
make configure

	
>Fix:
Rather than setting AUTOMAKE_OVERRIDE=NO in all packages that attempt to use
automake to rebuild configure, we should take advantage of the packages that
set AUTOMAKE_REQD=1.x in thier Makefile's.  When AUTOMAKE_REQD is set to
a specific value, and automake.mk is included, we should generate stubs for the
automake programs to point to the correct set of tools, rather than have
them all set to "missing".


	
>Release-Note:
>Audit-Trail:
>Unformatted: