Bug 2836 - bison-native 'gets' failure
Summary: bison-native 'gets' failure
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.3 M4
Assignee: Bogdan Marinescu
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2012-07-26 15:46 UTC by Jack Mitchell
Modified: 2012-09-24 22:56 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jack Mitchell 2012-07-26 15:46:16 UTC
bison-native is failing due to 'gets' function being removed.

| In file included from fseterr.h:20:0,
|                  from fseterr.c:20:
| ./stdio.h:496:1: error: 'gets' undeclared here (not in a function)
| gcc -std=gnu99  -I.   -isystem/mnt/storage/yoctoBuilds/poky-vanilla.git/build/tmp/sysroots/x86_64-linux/usr/include  -isystem/mnt/storage/yoctoBuilds/poky-vanilla.git/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -c -o mbschr.o mbschr.c
| make[4]: *** [fseterr.o] Error 1
| make[4]: *** Waiting for unfinished jobs....
| In file included from localcharset.c:30:0:
| ./stdio.h:496:1: error: 'gets' undeclared here (not in a function)
| make[4]: *** [localcharset.o] Error 1
| In file included from mbuiter.h:102:0,
|                  from mbschr.c:23:
| ./stdio.h:496:1: error: 'gets' undeclared here (not in a function)
| In file included from mbchar.h:154:0,
|                  from mbchar.c:21:
| ./stdio.h:496:1: error: 'gets' undeclared here (not in a function)
| make[4]: *** [mbschr.o] Error 1
| make[4]: *** [mbchar.o] Error 1
| make[4]: Leaving directory `/mnt/storage/yoctoBuilds/poky-vanilla.git/build/tmp/work/x86_64-linux/bison-native-2.5-r2/bison-2.5/lib'
| make[3]: *** [all-recursive] Error 1
| make[3]: Leaving directory `/mnt/storage/yoctoBuilds/poky-vanilla.git/build/tmp/work/x86_64-linux/bison-native-2.5-r2/bison-2.5/lib'
| make[2]: *** [all] Error 2
| make[2]: Leaving directory `/mnt/storage/yoctoBuilds/poky-vanilla.git/build/tmp/work/x86_64-linux/bison-native-2.5-r2/bison-2.5/lib'
| make[1]: *** [all-recursive] Error 1
| make[1]: Leaving directory `/mnt/storage/yoctoBuilds/poky-vanilla.git/build/tmp/work/x86_64-linux/bison-native-2.5-r2/bison-2.5'
| make: *** [all] Error 2
| ERROR: oe_runmake failed
| ERROR: Function failed: do_compile (see /mnt/storage/yoctoBuilds/poky-vanilla.git/build/tmp/work/x86_64-linux/bison-native-2.5-r2/temp/log.do_compile.4627 for further information)
NOTE: package bison-native-2.5-r2: task do_compile: Failed
Comment 1 Jack Mitchell 2012-07-26 15:47:04 UTC
Build Configuration:
BB_VERSION        = "1.15.3"
TARGET_ARCH       = "arm"
TARGET_OS         = "linux-gnueabi"
MACHINE           = "qemuarm"
DISTRO            = "poky"
DISTRO_VERSION    = "1.2+snapshot-20120726"
TUNE_FEATURES     = "armv5 dsp thumb arm926ejs"
TARGET_FPU        = "soft"
meta              
meta-yocto        = "master:5157c85776bb8bd7315ef42e6e622aae27ebc79e"
Comment 2 Jack Mitchell 2012-07-28 13:27:20 UTC
This patch fixed it for me, I don't think it's appropriate globally though - but then again is gets actually used at all in bison.. or is this just a fail safe which is now itself obsolete?

--- bison-2.5-van/bison-2.5/lib/stdio.in.h	2011-05-14 23:23:46.000000000 +0100
+++ bison-2.5/lib/stdio.in.h	2012-07-18 19:10:30.497463377 +0100
@@ -177,12 +177,6 @@
                  "use gnulib module fflush for portable POSIX compliance");
 #endif
 
-/* It is very rare that the developer ever has full control of stdin,
-   so any use of gets warrants an unconditional warning.  Assume it is
-   always declared, since it is required by C89.  */
-#undef gets
-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
-
 #if @GNULIB_FOPEN@
 # if @REPLACE_FOPEN@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Comment 5 Laurentiu Serban 2012-09-24 22:56:40 UTC
verified on commit id 8b3aa00029e62df6d05710cf166fd5d09bdb29cf