0

I'm trying to compile PHP5.4.0 with GD on Mac OS X Lion, to little success. I've tried manually installing GD through Homebrew but that doesn't seem to be working either. As far as I'm aware, GD comes bundled with OS X anyway.

My configure command look like so:

./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

...which configures perfectly fine. The problems arrive when I try to make my source:

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

PHP compiles perfectly fine when I don't include the gd/image related switches, so it must be an issue with the GD bit. I'm not entirely confident in the world of UNIX and make, so I'd really appreciate a helping hand.

Thanks, and my best,

Jamie

Jamie Rumbelow
  • 4,967
  • 2
  • 30
  • 42
  • Is there any specific reason for you to be trying to compile a new PHP version instead of using the OSX bundled version? – Daniel Ribeiro Apr 04 '12 at 17:51
  • You might want to look into the liip PHP package. Much less faffing around, and has GD installed. http://php-osx.liip.ch/ – GordonM Apr 04 '12 at 17:53
  • @drgomesp the built in PHP (at least in the client version) is somewhat limited. – GordonM Apr 04 '12 at 17:54
  • @GordonM the built-int version is an official version with not all dependencies. It's not limited, it's minimized. You can always start working from that. – Daniel Ribeiro Apr 04 '12 at 17:55
  • @drgomesp It's missing a few fairly common extensions. Also, the OP asked specifically about PHP 5.4, while Lion's PHP is 5.3 and is likely to remain so. – GordonM Apr 04 '12 at 17:56
  • @drgomesp Lion is running 5.3, I need to be running 5.4 – Jamie Rumbelow Apr 04 '12 at 18:09
  • @JamieRumbelow You can easily solve that problem: http://stackoverflow.com/questions/9534451/how-do-i-install-php-5-4-on-mac-os-x-lion – Daniel Ribeiro Apr 04 '12 at 18:11

0 Answers0