make: *** [ext/gd/libgd/gd_compat.lo] Error 1

简介: <p style="margin-top:0px; margin-bottom:10px; padding-top:0px; padding-bottom:0px; border:none; list-style-type:none; word-break:break-all"> 升级系统,把php5.2.9升级到5.3.6,按照以前的编译参数,configure能正常通过,但是在mak

升级系统,把php5.2.9升级到5.3.6,按照以前的编译参数,configure能正常通过,但是在make的时候提示:

In file included from /root/php-5.3.6/ext/gd/libgd/gd_compat.c:8:

/usr/local/jpeg/include/jpeglib.h:938: error: expected declaration specifiers or ‘…’ before ‘FILE’

/usr/local/jpeg/include/jpeglib.h:939: error: expected declaration specifiers or ‘…’ before ‘FILE’

make: *** [ext/gd/libgd/gd_compat.lo] Error 1


解决方法:

修改php-5.3.6/ext/gd/libgd/gd_compat.c 把png.h 改成绝对路径(这个在编译gd库的时候应该就碰到了,同样的路径即可)

并在# include <jpeglib.h> 前面增加一行 #include <stdio.h>  

目录
相关文章
|
5月前
|
Ubuntu PHP
ubuntu php libzip安装 ./configure报错 checking for libzip... not found configure
ubuntu php libzip安装 ./configure报错 checking for libzip... not found configure
96 1
Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)Call Stack
Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)Call Stack
481 0
checking for spandsp >= 3.0... configure: error: no usable spandsp; please install spandsp3 devel pa
checking for spandsp >= 3.0... configure: error: no usable spandsp; please install spandsp3 devel pa
943 0
编译OpenJDK8:configure: could not find or use freetype at location
编译OpenJDK8:configure: could not find or use freetype at location
162 0
|
Shell 开发工具 C语言
php-7.3.13 configure: error: Please reinstall the libzip distribution
php-7.3.13 configure: error: Please reinstall the libzip distribution
246 0
php-7.3.13 configure: error: Please reinstall the libzip distribution