CentOS 7 under Compile Libiconv

Source: Internet
Author: User
Tags intl



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

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.