使用GD编译PHP5.4 OS X Lion的问题

时间:2012-04-04 17:33:57

标签: php macos makefile osx-lion gd

我正在尝试在Mac OS X Lion上使用GD编译PHP5.4.0,但收效甚微。我试过通过Homebrew手动安装GD,但这似乎也没有用。据我所知,GD无论如何都捆绑了OS X.

我的配置命令如下所示:

./configure --enable-sockets --with-curl --with-mysql=/usr/local/Cellar/mysql/5.5.20 --with-mysqli=/usr/local/Cellar/mysql/5.5.20/bin/mysql_config --prefix=/usr --with-apxs2 --enable-mbstring --enable-exif --with-gd --with-png-dir=/usr/X11 --with-jpeg-dir=/usr/X11

...配置完美。当我尝试make我的来源时,问题就出现了:

Undefined symbols for architecture x86_64: "_php_gd_gdImageEllipse", referenced from: _zif_imageellipse in gd.o _php_gd_gdImageArc in gd.o "_php_gd_gdImageFilledEllipse", referenced from: _zif_imagefilledellipse in gd.o "_php_gd_gdImageRotate", referenced from: _zif_imagerotate in gd.o "_php_gd_gdImageColorMatch", referenced from: _zif_imagecolormatch in gd.o "_php_gd_gdImageConvolution", referenced from: _zif_imageconvolution in gd.o "_php_gd_gdImageNegate", referenced from: _php_image_filter_negate in gd.o "_php_gd_gdImageGrayScale", referenced from: _php_image_filter_grayscale in gd.o "_php_gd_gdImageBrightness", referenced from: _php_image_filter_brightness in gd.o "_php_gd_gdImageContrast", referenced from: _php_image_filter_contrast in gd.o "_php_gd_gdImageColor", referenced from: _php_image_filter_colorize in gd.o (maybe you meant: _php_gd_gdImageColorResolve, _php_gd_gdImageColorExactAlpha , _php_gd_gdImageColorAllocate , _php_gd_gdImageColorAllocateAlpha , _php_gd_gdImageColorExact , _php_gd_gdImageColorClosest , _php_gd_gdImageColorClosestAlpha , _php_gd_gdImageColorDeallocate , _php_gd_gdImageColorClosestHWB , _php_gd_gdImageColorResolveAlpha , _php_gd_gdImageColorTransparent ) "_php_gd_gdImageEdgeDetectQuick", referenced from: _php_image_filter_edgedetect in gd.o "_php_gd_gdImageEmboss", referenced from: _php_image_filter_emboss in gd.o "_php_gd_gdImageGaussianBlur", referenced from: _php_image_filter_gaussian_blur in gd.o "_php_gd_gdImageSelectiveBlur", referenced from: _php_image_filter_selective_blur in gd.o "_php_gd_gdImageMeanRemoval", referenced from: _php_image_filter_mean_removal in gd.o "_php_gd_gdImageSmooth", referenced from: _php_image_filter_smooth in gd.o "_FT_Done_FreeType", referenced from: _php_gd_gdFontCacheShutdown in gdft.o _php_gd_gdFreeFontCache in gdft.o "_FT_Init_FreeType", referenced from: _php_gd_gdFontCacheSetup in gdft.o _php_gd_gdImageStringFTEx in gdft.o "_FT_New_Face", referenced from: _fontFetch in gdft.o "_FT_Done_Face", referenced from: _fontRelease in gdft.o "_FT_Set_Char_Size", referenced from: _php_gd_gdImageStringFTEx in gdft.o "_FT_Get_Glyph", referenced from: _php_gd_gdImageStringFTEx in gdft.o "_FT_Glyph_Get_CBox", referenced from: _php_gd_gdImageStringFTEx in gdft.o "_FT_Glyph_To_Bitmap", referenced from: _php_gd_gdImageStringFTEx in gdft.o "_FT_Set_Transform", referenced from: _php_gd_gdImageStringFTEx in gdft.o "_FT_Get_Char_Index", referenced from: _php_gd_gdImageStringFTEx in gdft.o "_FT_Get_Kerning", referenced from: _php_gd_gdImageStringFTEx in gdft.o "_FT_Load_Glyph", referenced from: _php_gd_gdImageStringFTEx in gdft.o "_FT_Done_Glyph", referenced from: _php_gd_gdImageStringFTEx in gdft.o "_gdImageGetPixel", referenced from: _gdImageNegate in gd_filter.o _gdImageGrayScale in gd_filter.o _gdImageBrightness in gd_filter.o _gdImageContrast in gd_filter.o _gdImageColor in gd_filter.o _gdImageConvolution in gd_filter.o _gdImageSelectiveBlur in gd_filter.o ... (maybe you meant: _php_gd_gdImageGetPixel) "_gdImageGetTrueColorPixel", referenced from: _gdImageNegate in gd_filter.o _gdImageGrayScale in gd_filter.o _gdImageBrightness in gd_filter.o _gdImageContrast in gd_filter.o _gdImageColor in gd_filter.o _gdImageConvolution in gd_filter.o _gdImageSelectiveBlur in gd_filter.o ... (maybe you meant: _php_gd_gdImageGetTrueColorPixel) "_gdImageColorAllocateAlpha", referenced from: _gdImageNegate in gd_filter.o _gdImageGrayScale in gd_filter.o _gdImageBrightness in gd_filter.o _gdImageContrast in gd_filter.o _gdImageColor in gd_filter.o _gdImageConvolution in gd_filter.o _gdImageSelectiveBlur in gd_filter.o ... (maybe you meant: _php_gd_gdImageColorAllocateAlpha) "_gdImageColorClosestAlpha", referenced from: _gdImageNegate in gd_filter.o _gdImageGrayScale in gd_filter.o _gdImageBrightness in gd_filter.o _gdImageContrast in gd_filter.o _gdImageColor in gd_filter.o _gdImageConvolution in gd_filter.o _gdImageSelectiveBlur in gd_filter.o ... (maybe you meant: _php_gd_gdImageColorClosestAlpha) "_gdImageSetPixel", referenced from: _gdImageNegate in gd_filter.o _gdImageGrayScale in gd_filter.o _gdImageBrightness in gd_filter.o _gdImageContrast in gd_filter.o _gdImageColor in gd_filter.o _gdImageConvolution in gd_filter.o _gdImageSelectiveBlur in gd_filter.o ... (maybe you meant: _php_gd_gdImageSetPixel) "_gdImageCreateTrueColor", referenced from: _gdImageConvolution in gd_filter.o _gdImageSelectiveBlur in gd_filter.o _gdImageRotate90 in gd_rotate.o _gdImageRotate180 in gd_rotate.o _gdImageRotate270 in gd_rotate.o _gdImageRotate45 in gd_rotate.o (maybe you meant: _php_gd_gdImageCreateTrueColor) "_gdImageSaveAlpha", referenced from: _gdImageConvolution in gd_filter.o (maybe you meant: _php_gd_gdImageSaveAlpha) "_gdImageFill", referenced from: _gdImageConvolution in gd_filter.o (maybe you meant: _php_gd_gdImageFilledPolygon, _php_gd_gdImageFilledArc , _php_gd_gdImageFilledRectangle , _php_gd_gdImageFillToBorder , _gdImageFilledEllipse , _php_gd_gdImageFill ) "_gdImageCopy", referenced from: _gdImageConvolution in gd_filter.o _gdImageSelectiveBlur in gd_filter.o _gdImageRotate45 in gd_rotate.o (maybe you meant: _php_gd_gdImageCopyMerge, _php_gd_gdImageCopyResampled , _php_gd_gdImageCopyResized , _php_gd_gdImageCopyMergeGray , _php_gd_gdImageCopy ) "_gdImageDestroy", referenced from: _gdImageConvolution in gd_filter.o _gdImageSelectiveBlur in gd_filter.o _gdImageRotate45 in gd_rotate.o _gdImageRotate in gd_rotate.o (maybe you meant: _php_gd_gdImageDestroy) "_gdImageFilledRectangle", referenced from: _gdImagePixelate in gd_pixelate.o (maybe you meant: _php_gd_gdImageFilledRectangle) "_gdImageColorResolveAlpha", referenced from: _gdImagePixelate in gd_pixelate.o (maybe you meant: _php_gd_gdImageColorResolveAlpha) "_gdImagePaletteCopy", referenced from: _gdImageRotate90 in gd_rotate.o _gdImageRotate180 in gd_rotate.o _gdImageRotate270 in gd_rotate.o _gdImageRotate45 in gd_rotate.o (maybe you meant: _php_gd_gdImagePaletteCopy) "_gdImageAlphaBlending", referenced from: _gdImageRotate45 in gd_rotate.o (maybe you meant: _php_gd_gdImageAlphaBlending) ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status make: *** [libs/libphp5.bundle] Error 1

当我不包含与gd / image相关的开关时,PHP编译完全正常,因此它必须是GD位的问题。我对UNIX和make的世界并不完全有信心,所以我非常感谢你的帮助。

谢谢,我的最好,

杰米

0 个答案:

没有答案