Compiling and installing Libiconv
cd/usr/local/src
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
tar xfz libiconv-1.14.tar.gz
CD libiconv-1.14
./configure--prefix=/usr/local/libiconv
Make
Make Install
CD..
Error encountered while make:
Gcc-dhave_config_h-dexeext=\ "\"-I.-I.. -I.. /lib-i. /intl-ddepends_on_libiconv=1-ddepends_on_libintl=1-g-o2-c allocator.c
Gcc-dhave_config_h-dexeext=\ "\"-I.-I.. -I.. /lib-i. /intl-ddepends_on_libiconv=1-ddepends_on_libintl=1-g-o2-c AREADLINK.C
Gcc-dhave_config_h-dexeext=\ "\"-I.-I.. -I.. /lib-i. /intl-ddepends_on_libiconv=1-ddepends_on_libintl=1-g-o2-c careadlinkat.c
Gcc-dhave_config_h-dexeext=\ "\"-I.-I.. -I.. /lib-i. /intl-ddepends_on_libiconv=1-ddepends_on_libintl=1-g-o2-c MALLOCA.C
Gcc-dhave_config_h-dexeext=\ "\"-I.-I.. -I.. /lib-i. /intl-ddepends_on_libiconv=1-ddepends_on_libintl=1-g-o2-c progname.c
In file included from progname.c:26:0:
./stdio.h:1010:1: error:' gets ' is not declared (not inside the function)
_gl_warn_on_use (Gets, "gets is a security hole-use fgets instead");
^
KE[2]: * * [PROGNAME.O] Error 1
▽AKE[2]: Leave directory "/usr/local/src/libiconv-1.14/srclib"
MAKE[1]: * * [ALL] Error 2
MAKE[1]: Leave directory "/usr/local/src/libiconv-1.14/srclib"
Make: * * * [ALL] Error 2
Workaround 1:
Edit the Stdio.h file to _gl_warn_on_use (gets, "gets is a security hole-use fgets instead"), and the field section changes to the following:
# if defined (__glibc__) &&!defined (__uclibc__) &&!__glibc_prereq (2, +)
_gl_warn_on_use (gets, "gets is a security hole-use fgets instead");
#endif
#endif
Workaround 2:
CD srclib/
Sed-ir-e '/gets is a security/d './stdio.in.h
Cd.. /
Make
You can do it again!
This article is from the "Cloudy Circle Missing" blog, please be sure to keep this source http://gouliang.blog.51cto.com/10735353/1784540
CentOS 7 under Compile Libiconv