Stdioh: 477: 1: error: & amp; 39; gets & amp; 39; undeclaredhere (notinafunction) solves the following error when compiling a bsp package today, it is reasonable to say that there is no question about the bsp package officially given, but it is compiled in ubuntu134 and appears. /stdio. h: 477: 1: error: 'gets' undeclared here (not in a function) solves the following error when a bsp package is compiled today, it is reasonable to say that there is no question about the bsp package officially given, but the title error occurs during compilation in ubuntu 13.4, so google is the only option. The problem is that I hope you are all well. the Glibc-2.16.0 has been released http://ftp.gnu.org/gnu/glibc/glibc-2.16.0.tar.xzThe Good news is that it no longer needs the patches that are incurrent LFS. however, there are still some problems with it. firstly, the libgcc_s.soissue:/mnt/lfs/tools/bin /.. /lib/gcc/x86_64-lfs-linux-gnu/4.7.1 /.. /.. /.. /.. /x86_64-lfs-linux-gnu/bin/ld: cannot find-lgcc_scollect2: error: ld returned 1 exit statusmake [2]: * ** [/mnt/lfs/sources/glibc-build/iconv/iconv_prog] Error 1 make [2]: *** Waiting for unfinished jobs .... make [2]: Leaving directory '/mnt/lfs/sources/glibc-2.16.0/iconv 'make [1]: *** [iconv/others] Error 2 make [1]: leaving directory '/mnt/lfs/sources/glibc-2.16.0' make: *** [all] Error 2 Fixed: sed-I's #-lgcc_s # 'makeconfig (We won't hit the libgcc_s.so problem with Gcc until we start usingGcc-4.7.2) Then an error due to a problem with gcc: /mnt/lfs/sources/glibc-build/resolv/libresolv_pic.a (gethnamaddr. OS): In function 'getanswer ':/mnt/lfs/sources/glibc-2.16.0/resolv/gethnamaddr. c: 180: undefined reference to '_ stack_chk_guard'/mnt/lfs/sources/glibc-2.16.0/resolv/gethnamaddr. c: 483: undefined reference to '_ stack_chk_guard'/mnt/lfs/sources/glibc-build/resolv/libresolv_pic.a (gethnamaddr. OS): In function 'res _ gethostbyaddr ':/mnt/lfs/sources/glibc-2.16.0/resolv/gethnamaddr. c: 644: undefined reference to '_ stack_chk_guard'/mnt/lfs/sources/glibc-2.16.0/resolv/gethnamaddr. c: 783: undefined reference to '_ stack_chk_guard'/mnt/lfs/sources/glibc-build/resolv/libresolv_pic.a (gethnamaddr. OS): In function '_ GI_res_gethostbyname2':/mnt/lfs/sources/glibc-2.16.0/resolv/gethnamaddr. c: 510: undefined reference to '_ stack_chk_guard'/mnt/lfs/sources/glibc-build/resolv/libresolv_pic.a (gethnamaddr. OS):/mnt/lfs/sources/glibc-2.16.0/resolv/gethnamaddr. c: 636: more undefined references to '_ stack_chk_guard' followcollect2: error: ld returned 1 exit statusmake [2]: * ** [/mnt/lfs/sources/glibc-build/resolv/libresolv. so] Error 1 make [2]: *** Waiting for unfinished jobs .... make [2]: Leaving directory '/mnt/lfs/sources/glibc-2.16.0/resolv 'make [1]: *** [resolv/others] Error 2 make [1]: leaving directory '/mnt/lfs/sources/glibc-2.16.0' make: *** [all] Error 2 Fixed by this sed in the gcc source before the first pass of gcc: sed-I '/k prot/agcc_cv_libc_provides_ssp = yes 'gcc/configure Then a simple problem with the rpc headers: glibc-build/config. h rpc_tblout.c \-o/mnt/lfs/sources/glibc-build/sunrpc/cross-rpc_tblout.o-MMD-MP-MF/mnt/lfs/sources/glibc-build/sunrpc/cross-rpc_tblout.o.dt- MT/mnt/lfs/sources/glibc-build/sunrpc/cross-rpc_tblout.o-crpc_clntout.c: 34: 23: fatal error: rpc/types. h: No such file or directorycompilation terminated. make [2]: *** [/mnt/lfs/sources/glibc-build/sunrpc/cross-rpc_clntout.o] Error 1 make [2]: * ** Waiting for unfinished jobs .... make [2]: Leaving directory '/mnt/lfs/sources/glibc-2.16.0/sunrpc' make [1]: *** [sunrpc/others] Error 2 make [1]: leaving directory '/mnt/lfs/sources/glibc-2.16.0' make: *** [all] Error 2 Fixed by: sed-I's # # "Rpc/types. h "# 'sunrpc/rpc_clntout.c There's lots of gets removal breakage. diffutils-3.2 fails to build: CC exitfail. oIn file already ded from exclude. c: 31: 0 :. /stdio. h: 1012: 1: error: 'gets' undeclared here (not in a function) CC file-type.o CC filenamecat. o CC filenamecat-lgpl.omake [3]: *** [exclude. o] Error 1 make [3]: *** Waiting for unfinished jobs .... make [3]: Leaving directory '/mnt/lfs/sources/dif Futils-3.2/lib 'make [2]: *** [all-recursive] Error 1 make [2]: leaving directory '/mnt/lfs/sources/diffutils-3.2/lib 'make [1]: *** [all] Error 2 make [1]: leaving directory '/mnt/lfs/sources/diffutils-3.2/lib 'make: *** [all-recursive] Error 1 Fixed with a sed: sed-I '/gets is a security hole/d' lib/stdio. in. h Gettext fails to build: In file already ded from backupfile. c: 25: 0 :. /stdio. h: 456: 1: error: 'gets' Undeclared here (not in a function) make [1]: *** [backupfile. lo] Error 1 make [1]: Leaving directory '/mnt/lfs/sources/gettext-0.18.1.1/gettext-tools/gnulib-lib 'make: * ** [all] Error 2 make: Leaving directory '/mnt/lfs/sources/gettext-0.18.1.1/gettext-tools/gnulib-lib 'fixed with a sed: sed-I '/gets is a security hole/d' gnulib-lib/stdio. in. h (find gnulib-lib in the source code) M4 fails to build: gcc-std = gnu99-I. -g -O2-MT clean-temp.o-MD-MP-MF. deps/clean-temp.Tpo-c-o clean-temp.o clean-temp.cIn file written ded from clean-temp.h: 22: 0, from clean-temp.c: 23 :. /stdio. h: 477: 1: error: 'gets' undeclared here (not in a function) mv-f. deps/c-ctype.Tpo. deps/c-ctype.Pogcc-std = gnu99-I. -g-O2-MT close-hook.o-MD-MP-MF. deps/close-hook.Tpo-c-o close-hook.o close-hook.cmv-f. deps/c-stack.Tpo. deps/c-stack.Po Gcc-std = gnu99-I. -g-O2-MT execute. o-MD-MP-MF. deps/execute. tpo-c-o execute. o execute. cmake [3]: **** [clean-temp.o] Error 1 make [3]: *** Waiting for unfinished jobs .... mv-f. deps/close-hook.Tpo. deps/close-hook.Pomv-f. deps/execute. tpo. deps/execute. pomv-f. deps/gl_avltree_oset.Tpo. deps/gl_avltree_oset.Pomake [3]: Leaving directory '/mnt/lfs/sources/m4-1.4.16/lib 'make [2]: *** [all] Error 2 make [2]: Leaving directory '/mnt/lfs/sources/m4-1.4.16/lib 'make [1]: *** [all-recursive] Error 1 make [1]: leaving directory '/mnt/lfs/sources/m4-1.4.16' make: *** [all] Error 2 Fixed with a sed: sed-I '/gets is a security hole/d' lib/stdio. in. h Tar fails to build: In file included from argp. h: 24: 0, from argp-eexst.c: 27 :. /stdio. h: 479: 1: error: 'gets' undeclared here (not in a function) make [4]: *** [ar Gp-eexst.o] Error 1 make [4]: *** Waiting for unfinished jobs .... in file written ded from argp-fmtstream.h: 29: 0, from argp-fmtstream.c: 35 :. /stdio. h: 479: 1: error: 'gets' undeclared here (not in a function) make [4]: *** [argp-fmtstream.o] Error 1 make [4]: leaving directory '/mnt/lfs/sources/tar-1.26/gnu' make [3]: *** [all-recursive] Error 1 make [3]: leaving directory '/mnt/lfs/sources/tar-1.26/gnu' make [2]: * ** [All] Error 2 make [2]: Leaving directory '/mnt/lfs/sources/tar-1.26/gnu 'make [1]: * ** [all-recursive] Error 1 make [1]: Leaving directory '/mnt/lfs/sources/tar-1.26 'make: * ** [all] Error 2 Fixed with a sed: sed-I '/gets is a security hole/d' gnu/stdio. in. h And so into chroot. glibc fails with the rpc/types. h error again. it seems crazy to me thatit tries to use the system header not the in-tree one But what do Iknow?: Sed-I's # # "Rpc/types. h" # 'sunrpc/rpc_clntout.c Again, the glibc patches are not needed. test-installation.pl failed with an error: test! -X/sources/glibc-build/elf/ldconfig | LC_ALL = c language = C \/sources/glibc-build/elf/ldconfig \/lib64/usr/lib64CC =" gcc "/usr/bin/perl scripts/test-installation.pl/sources/glibc-build/Unmatched (in regex; marked by <-- HERE in m/$ (<-- HERE if $ (abi-64-ld-soname), $ (abi-64-ld-soname), ld/at scripts/test-installation.pl line 172, Line 1. make [1]: *** [install] Error 29 make [1]: Leaving directory '/sources/glibc-2.16.0 'make: *** [install] Error 2 root: /sources/glibc-build # cd/sources/glibc-2.16.0root: /sources/glibc-2.16.0 # CC = "gcc"/usr/bin/perl scripts/test-installation.pl/sources/glibc-build/Unmatched (in regex; marked by <-- HERE in m/$ (<-- HERE if $ (abi-64-ld-soname), $ (abi-64-ld-soname), ld/at scripts/test-installation.pl line 172, Line 1. so I disabled running test-installation.pl: sed-I '/test-installation.pl/d' MakefileI' m sure there is a more subtle fix for this but I don't have time justnow. and speaking of time; timezones. timezone data are not part of glibcanymore: cp: cannot stat '/usr/share/zoneinfo/Europe/London': No such file or directory I have to install a new package tzdata2012c http://www.iana.org/time-zones : For thing in etce=southamerica northamerica europe africa antarctica \ asia kerberalasia backward pacificnew solar87 solar88 solar89 systemvdo zic-L/tmp/tzdata/leapseconds-d/share/zoneinfo \-y "sh ~ /Tzdata/yearistype. sh "/tmp/tzdata/$ {thing} donecp/usr/share/zoneinfo/Europe/London/etc/localtime And then we're back to the gets breakage grind. m4, inetutils, diffutils, gettext, grub, libpipeline, man-db and Tar all needvariations on the gets sed. eg, for Gettext in chroot it's now: sed-I '/gets is a security hole/d' \ gettext-{runtime/gnulib-lib, tools/{gnulib-lib, libgettextpo}/stdio. in. h I shoshould confess that (as I'm a warning tee of the Klingon School ofProgramming) I didn't run any of the tests, so there may be some morebugs under those rocks. andy
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.