Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 424703 - sys-boot/grub-2.00 fails to build with sys-libs/glibc-2.16 due to missing gets
Summary: sys-boot/grub-2.00 fails to build with sys-libs/glibc-2.16 due to missing gets
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mike Gilbert
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: glibc-2.16
  Show dependency tree
 
Reported: 2012-07-04 08:39 UTC by Martin Jansa
Modified: 2012-07-05 01:32 UTC (History)
0 users

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


Attachments
grub-2.00-remove-gets.patch (grub-2.00-remove-gets.patch,534 bytes, patch)
2012-07-04 08:39 UTC, Martin Jansa
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Jansa 2012-07-04 08:39:17 UTC
glibc-2.16 doesn't expose gets anymore:
LSB deprecates gets().  POSIX.1-2008 marks gets() obsolescent.  ISO C11 removes the specification of gets() from the C language, and since version 2.16, glibc header files don't expose the function declaration if the _ISOC11_SOURCE feature test macro is defined.

So current build fails like this:
In file included from /tmp/tmpfs/portage/sys-boot/grub-2.00/work/grub-2.00/grub-core/gnulib/argp.h:22:0,
                 from /tmp/tmpfs/portage/sys-boot/grub-2.00/work/grub-2.00/grub-core/gnulib/argp-parse.c:42:
./stdio.h:456:1: error: 'gets' undeclared here (not in a function)
make[4]: *** [argp-fmtstream.o] Error 1

Fix is simple and shouldn't break things with older glibc, check that gets is defined before trying to undef it, patch attached.


Reproducible: Always
Comment 1 Martin Jansa 2012-07-04 08:39:54 UTC
Created attachment 317097 [details, diff]
grub-2.00-remove-gets.patch
Comment 2 Mike Gilbert gentoo-dev 2012-07-04 14:53:58 UTC
Could you please submit your change upstream on the grub-devel mailing list?

https://lists.gnu.org/mailman/listinfo/grub-devel
Comment 3 Martin Jansa 2012-07-04 15:48:16 UTC
(In reply to comment #2)
> Could you please submit your change upstream on the grub-devel mailing list?
> 
> https://lists.gnu.org/mailman/listinfo/grub-devel

Sure, done
http://lists.gnu.org/archive/html/grub-devel/2012-07/msg00007.html
Comment 4 SpanKY gentoo-dev 2012-07-05 01:32:12 UTC
this isn't a bug in grub.  it's from gnulib which they import from a diff project (gnulib).  i've applied the same patch as other projects.

http://sources.gentoo.org/sys-boot/grub/grub-2.00.ebuild?r1=1.10&r2=1.11
http://sources.gentoo.org/sys-boot/grub/files/grub-2.00-no-gets.patch?rev=1.1