Subject: autoconf not working inside pkg_comp root
To: None <>
From: Iain Hibbert <>
List: tech-pkg
Date: 07/30/2007 22:09:48
   Last weekend I had access to a fast internet connection so I updated my
pkgsrc sources and spent some time downloading the necessary distfiles
(previous pkgsrc date was february) and rebuilding my NetBSD system to
-current (previous NetBSD snapshot was may), and now I'm trying to rebuild
my entire pkg collection (using a newly built pkg_comp to build in a
chroot environment) now but am getting a missing Makefile error for
graphics/mng (also some others but its the same issue)

  I've tracked this down I think to autoconf not working properly, and it
*doesn't* happen outside the chroot. The autoconf version is the same
inside the chroot as outside (just built it, inside the chroot) and the
pkgsrc sources are the same and the NetBSD environment should be the same,
the main system is updated fine to -current and the pkg_comp chroot is
newly built from the same release files.

The error is shown below:

pkg_comp:default.conf# cd /usr/pkgsrc/graphics/mng && make
=> Required installed package digest>=20010302: digest-20070703 found
===> Skipping vulnerability checks.
WARNING: No /var/db/pkg/pkg-vulnerabilities file found.
WARNING: To fix run: `download-vulnerability-list'.
=> Checksum SHA1 OK for libmng-1.0.10.tar.gz
=> Checksum RMD160 OK for libmng-1.0.10.tar.gz
===> Installing dependencies for mng-1.0.10
=> Required installed package libtool-base>=1.5.18nb5: libtool-base-1.5.22nb4 found
=> Required installed package automake>=1.9: automake-1.10 found
=> Required installed package autoconf>=2.58: autoconf-2.61 found
=> Required installed package jpeg>=6bnb2: jpeg-6bnb4 found
=> Required installed package lcms>=1.12nb2: lcms-1.16 found
===> Overriding tools for mng-1.0.10
===> Extracting for mng-1.0.10
===> Patching for mng-1.0.10
===> Creating toolchain wrappers for mng-1.0.10
===> Configuring for mng-1.0.10
cd /pkg_comp/obj/pkgsrc/graphics/mng/default/libmng-1.0.10;
/bin/rm -f && /bin/ln -sf makefiles/ .;
/bin/rm -f && /bin/ln -sf makefiles/ .;
/usr/pkg/bin/libtoolize --automake;
automake -a --foreign -i;
autoconf installing `./missing' installing `./install-sh'
=> Checking for portability problems in extracted files
=> Modifying GNU configure scripts to avoid --recheck
=> Replacing config-guess with pkgsrc versions
=> Replacing config-sub with pkgsrc versions
=> Replacing install-sh with pkgsrc version
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
=> Modifying libtool scripts to use pkgsrc libtool
===> Building for mng-1.0.10
make: cannot open Makefile.

make: stopped in /pkg_comp/obj/pkgsrc/graphics/mng/default/libmng-1.0.10
*** Error code 2

make: stopped in /usr/pkgsrc/graphics/mng
*** Error code 1

make: stopped in /usr/pkgsrc/graphics/mng

As you can see, it seems that the configure script is not producing a
Makefile.. actually the configure script being generated by autoconf
outside the chroot is 700k, whereas inside, it is about 50k - the only
difference is that it is truncated, like so:

--- /usr/pkgsrc/graphics/mng/work/libmng-1.0.10/configure       2007-07-28 19:15:33.000000000 +0000
+++ /pkg_comp/obj/pkgsrc/graphics/mng/default/libmng-1.0.10/configure   2007-07-28 18:55:40.000000000 +0000
@@ -1906,20473 +1906,3 @@
 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and
start over" >&2;}
    { (exit 1); exit 1; }; }

I can't really see any differences in the system and I dislike autoconf,
can anybody suggest what the problem might be?