Fenying

Angus’ Home.


07 Jul 2016

记一次 libiconv 编译错误

该文章迁移自作者的旧博客站点。
源地址:http://fenying.blog.163.com/blog/static/10205599320166755431220

今天编译 PHP 时漏了安装 libiconv,于是去编译了一次 libiconv,结果编译报错了。

报错如下:

In file included from progname.c:26:0:
./stdio.h:1010:1: error: gets undeclared here (not in a function)
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
^
make[1]: *** [progname.o] Error 1

谷歌了一番,在 这里 找到了解决方案:

在文件 libiconv/srclib/stdio.in.h 中找到行

_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");

将其注释掉,然后重新编译

make clean && make && make install

一切搞定。

该文章根据 CC-BY-4.0 协议发表,转载请遵循该协议。
本文地址:https://fenying.net/post/2016/07/07/memo-about-libiconv-compilation-failure/

comments powered by Disqus