Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 424974

Summary: app-arch/cpio-2.11 fails to build with glibc-2.16.0
Product: Gentoo Linux Reporter: Stevan Bajić <stevan>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 424737    
Attachments: cpio-2.11-stdio.in.patch

Description Stevan Bajić 2012-07-05 19:36:15 UTC
In file included from argp.h:24:0,
                 from argp-eexst.c:27:
./stdio.h:358:1: error: 'gets' undeclared here (not in a function)
make[4]: *** [argp-eexst.o] Error 1
make[4]: *** Waiting for unfinished jobs....
In file included from argp-fmtstream.h:29:0,
                 from argp-fmtstream.c:35:
./stdio.h:358:1: error: 'gets' undeclared here (not in a function)
In file included from argp-fmtstream.h:29:0,
                 from argp-fs-xinl.c:28:
./stdio.h:358:1: error: 'gets' undeclared here (not in a function)
make[4]: *** [argp-fmtstream.o] Error 1
make[4]: *** [argp-fs-xinl.o] Error 1
make[4]: Leaving directory `/var/tmp/portage/app-arch/cpio-2.11/work/cpio-2.11/gnu'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/var/tmp/portage/app-arch/cpio-2.11/work/cpio-2.11/gnu'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/portage/app-arch/cpio-2.11/work/cpio-2.11/gnu'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/app-arch/cpio-2.11/work/cpio-2.11'
make: *** [all] Error 2



Newer glibcs don't declare gets() any more. The glibc ChangeLog has this:

2012-01-12  Marek Polacek  <polacek <at> redhat.com>

        * libio/bits/stdio2.h: Do not define gets for ISO C11, ISO C++11, and _GNU_SOURCE.

2012-01-07  Ulrich Drepper  <drepper <at> gmail.com>

        * libio/stdio.h: Do not declare gets at all for _GNU_SOURCE.

2011-12-23  Ulrich Drepper  <drepper <at> gmail.com>

        [BZ #13528]
        * libio/stdio.h: Do not declare gets for ISO C11 and _GNU_SOURCE.

Reproducible: Always
Comment 1 Stevan Bajić 2012-07-05 20:26:40 UTC
Created attachment 317352 [details, diff]
cpio-2.11-stdio.in.patch

This fixes the issue with glibc 2.16.0
Comment 2 SpanKY gentoo-dev 2012-07-06 04:17:57 UTC
should be all set now in the tree; thanks for the report!

Commit message: Fix building with glibc-2.16
http://sources.gentoo.org/app-arch/cpio/cpio-2.11.ebuild?r1=1.9&r2=1.10
http://sources.gentoo.org/app-arch/cpio/files/cpio-2.11-no-gets.patch?rev=1.1