[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Better `failed program' logs
From: |
Akim Demaille |
Subject: |
Better `failed program' logs |
Date: |
30 Oct 2002 09:30:14 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter) |
When dealing with difficult issues remotely, or even on the very same
machine, config.log can be too mute. In particular, it often says
things like (from the coreutils):
| configure: failed program was:
| #line 3353 "configure"
| #include "confdefs.h"
| #include <stdio.h>
| #if HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #if HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #if STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # if HAVE_STDLIB_H
| # include <stdlib.h>
| # endif
| #endif
| #if HAVE_STRING_H
| # if !STDC_HEADERS && HAVE_MEMORY_H
| # include <memory.h>
| # endif
| # include <string.h>
| #endif
| #if HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #if HAVE_INTTYPES_H
| # include <inttypes.h>
| #else
| # if HAVE_STDINT_H
| # include <stdint.h>
| # endif
| #endif
| #if HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| #include <minix/config.h>
Which is a cool information, but without the contents of confdefs.h,
it's fun to try to understand what's going on...
I'd like to suggest the appended patch, which results in (on the same
portion):
| configure: failed program was:
| #line 3429 "configure"
| /* confdefs.h. */
|
| #define PACKAGE_NAME "GNU coreutils"
| #define PACKAGE_TARNAME "coreutils"
| #define PACKAGE_VERSION "4.5.1"
| #define PACKAGE_STRING "GNU coreutils 4.5.1"
| #define PACKAGE_BUGREPORT "address@hidden"
| #define PACKAGE "coreutils"
| #define VERSION "4.5.1"
| #define _GNU_SOURCE 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| /* end confdefs.h. */
| #include <stdio.h>
| #if HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #if HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #if STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # if HAVE_STDLIB_H
| # include <stdlib.h>
| # endif
| #endif
| #if HAVE_STRING_H
| # if !STDC_HEADERS && HAVE_MEMORY_H
| # include <memory.h>
| # endif
| # include <string.h>
| #endif
| #if HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #if HAVE_INTTYPES_H
| # include <inttypes.h>
| #else
| # if HAVE_STDINT_H
| # include <stdint.h>
| # endif
| #endif
| #if HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| #include <minix/config.h>
This is, IMHO, *much* more useful. But... and that's why I'm asking
the question before applying it, it results in a very significant
growth of config.log. In the future, with shell functions, why might
introduce a --verbose-log if we want, but today, we need a single
output (otherwise, it is configure that explodes too). Here are the
Coreutils figures:
Before:
-rw-r--r-- 1 akim lrde 204K 2002-10-30 08:57 acold/config.log
-rwxr-xr-x 1 akim lrde 1023K 2002-10-30 08:54 acold/configure*
After:
-rw-r--r-- 1 akim lrde 814K 2002-10-30 09:18 config.log
-rwxr-xr-x 1 akim lrde 1.0M 2002-10-30 09:15 configure*
What do you think about it?
Index: ChangeLog
from Akim Demaille <address@hidden>
* lib/autoconf/c.m4 (AC_LANG_SOURCE): Don't include confdefs.h,
inline it.
Index: lib/autoconf/c.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/c.m4,v
retrieving revision 1.169
diff -u -u -r1.169 c.m4
--- lib/autoconf/c.m4 27 Oct 2002 18:23:14 -0000 1.169
+++ lib/autoconf/c.m4 30 Oct 2002 08:25:56 -0000
@@ -121,7 +121,11 @@
# #line $LINENO "$[0]"
m4_define([AC_LANG_SOURCE(C)],
[#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$1])
- Better `failed program' logs,
Akim Demaille <=