Though this solution doesn't match the output for the initial bug report for this bug, it matches subsequent mails.
I was getting the same die at the configure stage and it was due to the c wrapper for apt-build, apt-build-wrapper in 0.12.15. The main perl script puts /usr/lib/apt-build at the start of $ENV{'PATH'}, the wrapper then removes that path to locate the real gcc (or whatever). There are two solutions: 1. Don't use the wrapper. Put wrapper = 0 in /etc/apt/apt-build.conf 2. Patch config.c from the apt-build source (patch attached) Both these sorted out my problem. Your mileage may vary.
--- config.c.orig 2005-12-15 04:17:44.000000000 +0000 +++ config.c 2005-12-15 04:22:42.000000000 +0000 @@ -163,6 +163,7 @@ if (path) { libdir = strstr (path, LIBDIR); + len = strlen(LIBDIR); if (libdir) setenv ("PATH", libdir + len + 1, 1); }