Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 128524 - gawk STDC_HEADERS undefined in stable tree.
Summary: gawk STDC_HEADERS undefined in stable tree.
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-02 08:23 UTC by solar (RETIRED)
Modified: 2006-04-02 11:15 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
config.log (config.log,76.83 KB, text/plain)
2006-04-02 09:34 UTC, solar (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description solar (RETIRED) gentoo-dev 2006-04-02 08:23:31 UTC
make[2]: Entering directory `/var/tmp/portage/gawk-3.1.5/work/gawk-3.1.5'
if i686-pc-linux-gnu-gcc -DDEFPATH="\".:/usr/share/awk\"" -DHAVE_CONFIG_H -DGAWK -DLOCALEDIR="\"/usr/share/locale\"" -I. -I. -I.     -O2 -march=i686 -MT array.o -MD -MP -MF ".deps/array.Tpo" -c -o array.o array.c; \
then mv -f ".deps/array.Tpo" ".deps/array.Po"; else rm -f ".deps/array.Tpo"; exit 1; fi
if i686-pc-linux-gnu-gcc -DDEFPATH="\".:/usr/share/awk\"" -DHAVE_CONFIG_H -DGAWK -DLOCALEDIR="\"/usr/share/locale\"" -I. -I. -I.     -O2 -march=i686 -MT awkgram.o -MD -MP -MF ".deps/awkgram.Tpo" -c -o awkgram.o awkgram.c; \
then mv -f ".deps/awkgram.Tpo" ".deps/awkgram.Po"; else rm -f ".deps/awkgram.Tpo"; exit 1; fi
if i686-pc-linux-gnu-gcc -DDEFPATH="\".:/usr/share/awk\"" -DHAVE_CONFIG_H -DGAWK -DLOCALEDIR="\"/usr/share/locale\"" -I. -I. -I.     -O2 -march=i686 -MT builtin.o -MD -MP -MF ".deps/builtin.Tpo" -c -o builtin.o builtin.c; \
then mv -f ".deps/builtin.Tpo" ".deps/builtin.Po"; else rm -f ".deps/builtin.Tpo"; exit 1; fi
if i686-pc-linux-gnu-gcc -DDEFPATH="\".:/usr/share/awk\"" -DHAVE_CONFIG_H -DGAWK -DLOCALEDIR="\"/usr/share/locale\"" -I. -I. -I.     -O2 -march=i686 -MT dfa.o -MD -MP -MF ".deps/dfa.Tpo" -c -o dfa.o dfa.c; \
then mv -f ".deps/dfa.Tpo" ".deps/dfa.Po"; else rm -f ".deps/dfa.Tpo"; exit 1; fi
dfa.c:37: warning: conflicting types for built-in function 'calloc'
dfa.c:37: warning: conflicting types for built-in function 'malloc'
In file included from /usr/include/bits/string2.h:1299,
                 from /usr/include/string.h:417,
                 from dfa.c:42:
/usr/include/stdlib.h:584: error: conflicting types for 'malloc'
dfa.c:37: error: previous declaration of 'malloc' was here
/usr/include/stdlib.h:584: error: conflicting types for 'malloc'
dfa.c:37: error: previous declaration of 'malloc' was here
/usr/include/stdlib.h:587: error: conflicting types for 'calloc'
dfa.c:37: error: previous declaration of 'calloc' was here
/usr/include/stdlib.h:587: error: conflicting types for 'calloc'
dfa.c:37: error: previous declaration of 'calloc' was here
In file included from mbsupport.h:36,
                 from dfa.c:102:
/usr/include/stdlib.h:595: error: conflicting types for 'realloc'
dfa.c:37: error: previous declaration of 'realloc' was here
/usr/include/stdlib.h:595: error: conflicting types for 'realloc'
dfa.c:37: error: previous declaration of 'realloc' was here
make[2]: *** [dfa.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/gawk-3.1.5/work/gawk-3.1.5'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/gawk-3.1.5/work/gawk-3.1.5'
make: *** [all] Error 2

!!! ERROR: sys-apps/gawk-3.1.5 failed.
!!! Function src_compile, Line 43, Exitcode 2
!!! emake failed
!!! If you need support, post the topmost build error, NOT this status message.


I hit the error while doing an emerge -e system ; note the installed gawk was 
already this same exact version but built on Fri Mar 17 2006 (that was cvs 
revision 1.14) The current cvs revision is 1.17

Now looking at dfa.c around line 37 shows us

#ifdef STDC_HEADERS
#include <stdlib.h>
#else
extern char *calloc(), *malloc(), *realloc();
extern void free();
#endif

Ok yuck. malloc is usually a void.

Checked out config.h and low and behold STDC_HEADERS was in the #undef section.
Edited the config.h by hand then ran make from the cmdline and poof. gawk 
compiles.


tinderbox gawk-3.1.5 # emerge info
Portage 2.0.54 (default-linux/x86/2005.1, gcc-3.4.5, glibc-2.3.5-r3, 2.6.11-hardened-r15 i686)
=================================================================
System uname: 2.6.11-hardened-r15 i686 Intel(R) Pentium(R) 4 CPU 2.60GHz
Gentoo Base System version 1.6.14
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=i686"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg distclean distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
PKGDIR="/home/ftp/default-linux/x86/2005.1/"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 apm avi berkdb bindist crypt cups dri eds emboss encode foomaticdb fortran gdbm gif gpm imlib ipv6 isdnlog jpeg libg++ libwww mad mikmod mp3 mpeg ncurses nls ogg oggvorbis oss pam pdflib perl png pppd python quicktime readline spell ssl tcpd truetype truetype-fonts type1-fonts vorbis xml2 zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTDIR_OVERLAY
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-04-02 08:29:11 UTC
Please attach config.log .
Comment 2 solar (RETIRED) gentoo-dev 2006-04-02 09:34:56 UTC
Created attachment 83722 [details]
config.log

as requested
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-04-02 10:39:28 UTC
configure:3623: checking for ANSI C header files
configure:3648: i686-pc-linux-gnu-gcc -c -O2 -march=i686  conftest.c >&5
configure:3654: $? = 0
configure:3658: test -z 
			 || test ! -s conftest.err
configure:3661: $? = 0
configure:3664: test -s conftest.o
configure:3667: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "GNU Awk"
| #define PACKAGE_TARNAME "gawk"
| #define PACKAGE_VERSION "3.1.5"
| #define PACKAGE_STRING "GNU Awk 3.1.5"
| #define PACKAGE_BUGREPORT "bug-gawk@gnu.org"
| #define PACKAGE "gawk"
| #define VERSION "3.1.5"
| #define ALLOW_SWITCH 1
| /* end confdefs.h.  */
| #include <stdlib.h>
| #include <stdarg.h>
| #include <string.h>
| #include <float.h>
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3779: result: no

this is the problem. but the reason why this fails I'm not sure, there's no error message.
Comment 4 solar (RETIRED) gentoo-dev 2006-04-02 11:15:38 UTC
hrmm random fluke or so. Re- emerge gawk using the same cvs revison 1.17 worked.