PHP5, with GD on Linux (Slackware 10.0)
./configure goes just fine, but when I try 'make', there's an error.
this is how I configured it: ./configure --prefix=/usr/local/php5 --with-zlib --with-pear=/usr/share/pear --with-mysql=/usr/local/mysql --includedir=/usr/include --without-sqlite --disable-cgi --with-apxs2=/usr/local/apache2/bin/apxs --with-freetype-dir=/usr/include/freetype2 --enable-gd-native-tt --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/local/lib --with-xpm-dir=/usr/local/lib --with-gd=/usr/local/include
this is some off the output (the GD part): +++++ checking for GD support... yes checking for the location of libjpeg... /usr/local/lib checking for the location of libpng... /usr/local/lib checking for the location of libXpm... /usr/local/lib checking for FreeType 1.x support... no checking for FreeType 2... /usr/include/freetype2 checking for T1lib support... no checking whether to enable truetype string function in GD... no checking whether to enable JIS-mapped Japanese font support in GD... no checking for jpeg_read_header in -ljpeg... yes checking for png_write_image in -lpng... yes checking for XpmFreeXpmImage in -lXpm... yes checking for gdImageString16 in -lgd... yes checking for gdImagePaletteCopy in -lgd... yes checking for gdImageCreateFromPng in -lgd... yes checking for gdImageCreateFromGif in -lgd... yes checking for gdImageGif in -lgd... yes checking for gdImageWBMP in -lgd... yes checking for gdImageCreateFromJpeg in -lgd... yes checking for gdImageCreateFromXpm in -lgd... yes checking for gdImageCreateFromGd2 in -lgd... yes checking for gdImageCreateTrueColor in -lgd... yes checking for gdImageSetTile in -lgd... yes checking for gdImageEllipse in -lgd... no checking for gdImageSetBrush in -lgd... yes checking for gdImageStringTTF in -lgd... yes checking for gdImageStringFT in -lgd... yes checking for gdImageStringFTEx in -lgd... yes checking for gdImageColorClosestHWB in -lgd... yes checking for gdImageColorResolve in -lgd... yes checking for gdImageGifCtx in -lgd... yes checking for gdCacheCreate in -lgd... yes checking for gdFontCacheShutdown in -lgd... yes checking for gdNewDynamicCtxEx in -lgd... yes checking for gdImageCreate in -lgd... yes +++++ ------------------------------------------------- if you have something to say about this, go ahead; I just started to use Linux and this is the first time I did this. I've installed PHP 4 on a Windows box, with the gd library and that worked. -------------------------------------------------
this is the error I get when I 'make' the configuration: +++++ (everything above this contains no errors) ext/gd/gd.lo(.text+0x1be8): In function `zif_imagecolormatch': /usr/local/php5/ext/gd/gd.c:902: undefined reference to `gdImageColorMatch' ext/gd/gd.lo(.text+0x4242): In function `zif_imagerotate': /usr/local/php5/ext/gd/gd.c:1215: undefined reference to `gdImageRotate' ext/gd/gd.lo(.text+0x5823): In function `zif_imagexbm': /usr/local/php5/ext/gd/gd.c:1837: undefined reference to `gdImageXbmCtx' ext/gd/gd.lo(.text+0x8218): In function `zif_imageline': /usr/local/php5/ext/gd/gd.c:2305: undefined reference to `gdImageAALine' ext/gd/gd.lo(.text+0x9a01): In function `zif_imageellipse': /usr/local/php5/ext/gd/gd.c:2444: undefined reference to `gdImageEllipse' ext/gd/gd.lo(.text+0xe7d3): In function `php_image_filter_negate': /usr/local/php5/ext/gd/gd.c:4002: undefined reference to `gdImageNegate' ext/gd/gd.lo(.text+0xe89f): In function `php_image_filter_grayscale': /usr/local/php5/ext/gd/gd.c:4013: undefined reference to `gdImageGrayScale' ext/gd/gd.lo(.text+0xe97f): In function `php_image_filter_brightness': /usr/local/php5/ext/gd/gd.c:4036: undefined reference to `gdImageBrightness' ext/gd/gd.lo(.text+0xea66): In function `php_image_filter_contrast': /usr/local/php5/ext/gd/gd.c:4059: undefined reference to `gdImageContrast' ext/gd/gd.lo(.text+0xeb51): In function `php_image_filter_colorize': /usr/local/php5/ext/gd/gd.c:4082: undefined reference to `gdImageColor' ext/gd/gd.lo(.text+0xec1d): In function `php_image_filter_edgedetect': /usr/local/php5/ext/gd/gd.c:4093: undefined reference to `gdImageEdgeDetectQuick' ext/gd/gd.lo(.text+0xece9): In function `php_image_filter_emboss': /usr/local/php5/ext/gd/gd.c:4104: undefined reference to `gdImageEmboss' ext/gd/gd.lo(.text+0xedb5): In function `php_image_filter_gaussian_blur': /usr/local/php5/ext/gd/gd.c:4115: undefined reference to `gdImageGaussianBlur' ext/gd/gd.lo(.text+0xee81): In function `php_image_filter_selective_blur': /usr/local/php5/ext/gd/gd.c:4126: undefined reference to `gdImageSelectiveBlur' ext/gd/gd.lo(.text+0xef4d): In function `php_image_filter_mean_removal': /usr/local/php5/ext/gd/gd.c:4137: undefined reference to `gdImageMeanRemoval' ext/gd/gd.lo(.text+0xf034): In function `php_image_filter_smooth': /usr/local/php5/ext/gd/gd.c:4161: undefined reference to `gdImageSmooth' ext/gd/gd.lo(.text+0xf231): In function `zif_imageantialias': /usr/local/php5/ext/gd/gd.c:4216: undefined reference to `gdImageAntialias' collect2: ld returned 1 exit status make: *** [sapi/cli/php] Error 1
I tried to compile PHP with only --with-gd (without --with-jpeg-dir etc) and than I get an error: Fatal error: Call to undefined function imagecreatefromjpeg()
does anyone know how to solve this problem?
Martin