安装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

时间: 2024-08-10 21:29:18

安装libgd库make: *** [all-recursive] Error 1的相关文章

Centos安装GD库

tar zxvf ncurses-5.6.tar.gz 进入目录 cd ncurses-5.6 生成 makefile文件,再进一步编译 ./configure --prefix=/usr --with-shared --without-debug 编译,编译时间稍微长些,稍等make 编译好最后就是安装了 make install ================================== 下面才开始安装 GD库,安装gd库成功与否,与下面的安装顺序有一定的关系 我们就一步步来演示安

linux下编译安装boost库

转载:http://www.cnblogs.com/oloroso/p/4632848.html linux下编译安装boost库 linux下编译安装boost库 1.下载并解压boost 1.58 源代码 下载 解压 2.运行bootstrap.sh 3.使用b2进行构建 构建成功的提示 4.安装boost库到指定目录 5.测试一下 代码 编译运行 先看一下系统环境 Linux o-pc 3.19.0-22-generic #22-Ubuntu SMP Tue Jun 16 17:15:15

服务器搭建4 安装其它库

1.安装CURL库 CURL是利用URL语法在命令行方式下工作的开源文件传输工具.支持DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, Telnet and TFTP. CURL支持SSL证书,HTTP POST,HTTP PUT,FTP上传,基于HTTP的形式上传,代理,cookies,用户+密码验证(基本,

Linux安装mysql-python库时报错解决办法

用pip安装mysql-python库的时候遇到如下报错 [email protected]:~# pip install mysql-python Collecting mysql-python Using cached MySQL-python-1.2.5.zip Complete output from command python setup.py egg_info: sh: 1: mysql_config: not found Traceback (most recent call l

安装Stomp扩展时错误提示error: &#39;zend_class_entry&#39; has no member named &#39;default_properties&#39;

在安装stomp扩展时, 有这样的提示 error: 'zend_class_entry' has no member named 'default_properties' 交待下安装上下文, stomp 版本是 1.0.3 而最新的是 1.0.8  php 版本是5.4.x , 猜想可能是由于版本差异造成的, 因为1.0.3的 stomp 出现的年份是2010年... 于是网上搜索了一下, 文章点这 说在出错的文件中把 default_properties 改成 default_propert

VS2010下安装boost库

在我们的C++项目中安装boost库,下面以VS2010版本作为例子,其它版本的设置也差不多. 一.编译生成boost库 1.下载最新的boost(本人下载的是boost_1_56_0).boost官方网站(www.boost.org). 2.解压boost库文件(我解压到C:boost目录下). 3.打开VS2010->VS TOOLS->VS命令提示. 4.进入解压的boost目录(此处是CD C:\boost\boost_1_56_0 ). 5.输入bootstrap,回车. 6.输入b

CentOS 7 安装oracle 11.2.0.4 Error in invoking target &#39;agent nmhs&#39; of makefile

%86时出现报错   Error in invoking target 'agent nmhs' of makefile 解决方案在makefile中添加链接libnnz11库的参数修改$ORACLE_HOME/sysman/lib/ins_emagent.mk,将$(MK_EMAGENT_NMECTL)修改为:$(MK_EMAGENT_NMECTL) -lnnz11建议修改前备份原始文件[[email protected] ~]$ cd $ORACLE_HOME/sysman/lib[[ema

解决用pip安装Python库时可能会遇到的问题

笔者电脑系统是win7,同时安装了Python2.7和Python3.6,但是在通过命令行直接使用"pip install XXX"安装Python库时出现了以下的错误信息: Fatal error in launcher: Unable to create process using '"' 解决方法: 1,找到你的Python版本对应的解释器的名称 首先你需要进入安装Python相应版本所在的文件夹.以我的Python版本为例,这是我的Python2.7版本对应的解释器名

Windows环境下使用pip install安装lxml库

lxml是Python语言和XML以及HTML工作的功能最丰富和最容易使用的库.lxml是为libxml2和libxslt库的一个Python化的绑定.它与众不同的地方是它兼顾了这些库的速度和功能完整性.高效率解析Xpath,用于操作爬虫爬取网址url. 而在Windows中由于原始Python3的版本中并没有集成lxml库,在PyCharm中如果直接引用lxml库可能会出现Install Package Failed错误,并提示:error:Microsoft Visual C++10.0 i