首页 > 代码库 > 安装libgd库make: *** [all-recursive] Error 1
安装libgd库make: *** [all-recursive] Error 1
Making all in src make[1]: Entering directory `/tmp/lixiantao/libgd-2.2.4/src‘ make all-am make[2]: Entering directory `/tmp/lixiantao/libgd-2.2.4/src‘ depbase=`echo gd_gd2.lo | sed ‘s|[^/]*$|.deps/&|;s|\.lo$||‘`; /bin/sh ../libtool --tag=CC --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I/usr/include/libpng12 -I/usr/include/freetype2 -g -O2 -fvisibility=hidden -Wall -MT gd_gd2.lo -MD -MP -MF $depbase.Tpo -c -o gd_gd2.lo gd_gd2.c && mv -f $depbase.Tpo $depbase.Plo libtool: compile: gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I/usr/include/libpng12 -I/usr/include/freetype2 -g -O2 -fvisibility=hidden -Wall -MT gd_gd2.lo -MD -MP -MF .deps/gd_gd2.Tpo -c gd_gd2.c -fPIC -DPIC -o .libs/gd_gd2.o gd_gd2.c: In function ‘_gd2GetHeader’: gd_gd2.c:212: error: ‘INT_MAX’ undeclared (first use in this function) gd_gd2.c:212: error: (Each undeclared identifier is reported only once gd_gd2.c:212: error: for each function it appears in.) make[2]: *** [gd_gd2.lo] Error 1 make[2]: Leaving directory `/tmp/lixiantao/libgd-2.2.4/src‘ make[1]: *** [all] Error 2 make[1]: Leaving directory `/tmp/lixiantao/libgd-2.2.4/src‘ make: *** [all-recursive] Error 1
我下载的是2.2.4稳定版的
wget https://github.com/libgd/libgd/releases/download/gd-2.2.4/libgd-2.2.4.tar.gz
这个错误似乎是Libgd的bug,不会C语言,这里就照着改了:
Showing 1 changed file with 1 addition and 0 deletions.
src/gd_gd2.c @@ -74,6 +74,7 @@ /* 2.0.29: no more errno.h, makes windows happy */ #include <math.h> +#include <limits.h> #include <string.h> #include "gd.h" #include "gd_errors.h"
加上这句话之后,就正常的make && make install了。
附上这个问题阐述:
https://github.com/libgd/libgd/issues/360
与解决问题的方案:
https://github.com/libgd/libgd/commit/c9b601a658a79e6ea2aad29fbf60ca6e24ccef1e
本文出自 “为了以后” 博客,谢绝转载!
安装libgd库make: *** [all-recursive] Error 1
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。