Столкнулся с подобной проблемой :(
Не получается нормально собрать PHP с внешней библиотекой GD.
Версия PHP 5.1.2. GD пытаюсь использовать 2.0.33.
Вот конфигурирование и установка GD.
# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking build system type... i386-unknown-freebsd6.0
checking host system type... i386-unknown-freebsd6.0
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking for a sed that does not truncate output... /usr/bin/sed
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking command to parse /usr/bin/nm -B output... ok
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for ranlib... ranlib
checking for strip... strip
checking for objdir... .libs
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.lo... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking whether the linker (/usr/bin/ld) supports shared libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... freebsd6.0 ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether -lc should be explicitly linked in... yes
creating libtool
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for ranlib... (cached) ranlib
checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
checking for ANSI C header files... (cached) yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking for iconv... yes
checking how to link with libiconv... /usr/local/lib/libiconv.so -Wl,-rpath -Wl,/usr/local/lib
checking for iconv declaration...
extern size_t iconv (iconv_t cd, const char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking whether iconv.h defines iconv_t... yes
checking for sin... no
checking for sin in -lm... yes
checking for deflate in -lz... yes
checking for libpng12-config... /usr/local/bin/libpng12-config
checking for libpng-config... /usr/local/bin/libpng-config
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
checking for png_create_read_struct in -lpng12... yes
checking for freetype-config... /usr/local/bin/freetype-config
checking for FT_Init_FreeType in -lfreetype... yes
checking ft2build.h usability... yes
checking ft2build.h presence... yes
checking for ft2build.h... yes
checking for FcInit in -lfontconfig... yes
checking for jpeg_set_defaults in -ljpeg... yes
checking for XpmReadFileToXpmImage in -lXpm... yes
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... -D_THREAD_SAFE
checking for cc_r... gcc
** Configuration summary for gd 2.0.33:
Support for PNG library: yes
Support for JPEG library: yes
Support for Freetype 2.x library: yes
Support for Fontconfig library: yes
Support for Xpm library: yes
Support for pthreads: yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config/Makefile
config.status: creating config/gdlib-config
config.status: creating test/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
Т.е. как я понимаю - устанавливается корректно.
Далее конфигурирую PHP. Вот с такой строкой:
./configure --enable-versioning --enable-memory-limit --with-openssl --with-apxs2=/usr/local/apache2/bin/apxs --with-zlib --with-libxml --with-gd=/usr/local --with-mysql=/usr/local/mysql
Все проходит без проблем. Т.е. конфигурирование заканчивается вот так...
..........
main/php_config.h is unchanged
creating main/internal_functions.c
creating main/internal_functions_cli.c
+--------------------------------------------------------------------+
| License: |
| This software is subject to the PHP License, available in this |
| distribution in the file LICENSE. By continuing this installation |
| process, you are bound by the terms of this license agreement. |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point. |
+--------------------------------------------------------------------+
Thank you for using PHP.
А вот далее. Уже фик :(
Ставиться PHP не хочет. Вот где грабли могут быть? А? :(
ext/gd/.libs/gd.o(.text+0x3a27): In function `zif_imagecreatefromgd':
/var/distrib/php-5.1.2/ext/gd/gd.c:1682: undefined reference to `php_gd_gdImageCreateFromGdCtx'
ext/gd/.libs/gd.o(.text+0x3a2c):/var/distrib/php-5.1.2/ext/gd/gd.c:1682: undefined reference to `php_gd_gdImageCreateFromGd'
ext/gd/.libs/gd.o(.text+0x3a57): In function `zif_imagecreatefromgd2':
/var/distrib/php-5.1.2/ext/gd/gd.c:1691: undefined reference to `php_gd_gdImageCreateFromGd2Ctx'
ext/gd/.libs/gd.o(.text+0x3a5c):/var/distrib/php-5.1.2/ext/gd/gd.c:1691: undefined reference to `php_gd_gdImageCreateFromGd2'
ext/gd/.libs/gd.o(.text+0x3a87): In function `zif_imagecreatefromgd2part':
/var/distrib/php-5.1.2/ext/gd/gd.c:1699: undefined reference to `php_gd_gdImageCreateFromGd2PartCtx'
ext/gd/.libs/gd.o(.text+0x3a8c):/var/distrib/php-5.1.2/ext/gd/gd.c:1699: undefined reference to `php_gd_gdImageCreateFromGd2Part'
ext/gd/.libs/gd.o(.text+0x3e2d): In function `_php_image_output':
/var/distrib/php-5.1.2/ext/gd/gd.c:1823: undefined reference to `php_gd_gdImageTrueColorToPalette'
ext/gd/.libs/gd.o(.text+0x3f01):/var/distrib/php-5.1.2/ext/gd/gd.c:1806: undefined reference to `php_gd_gdImageWBMP'
ext/gd/.libs/gd.o(.text+0x3f4b):/var/distrib/php-5.1.2/ext/gd/gd.c:1771: undefined reference to `php_gd_gdImageTrueColorToPalette'
ext/gd/.libs/gd.o(.text+0x404f):/var/distrib/php-5.1.2/ext/gd/gd.c:1756: undefined reference to `php_gd_gdImageWBMP'
ext/gd/.libs/gd.o(.text+0x415b): In function `zif_imagexbm':
/var/distrib/php-5.1.2/ext/gd/gd.c:1858: undefined reference to `php_gd_gdImageXbmCtx'
ext/gd/.libs/gd.o(.text+0x4183): In function `zif_imagegif':
/var/distrib/php-5.1.2/ext/gd/gd.c:1869: undefined reference to `php_gd_gdImageGifCtx'
ext/gd/.libs/gd.o(.text+0x41ab): In function `zif_imagepng':
/var/distrib/php-5.1.2/ext/gd/gd.c:1883: undefined reference to `php_gd_gdImagePngCtxEx'
ext/gd/.libs/gd.o(.text+0x41d3): In function `zif_imagewbmp':
/var/distrib/php-5.1.2/ext/gd/gd.c:1911: undefined reference to `php_gd_gdImageWBMPCtx'
ext/gd/.libs/gd.o(.text+0x41fb): In function `zif_imagegd':
/var/distrib/php-5.1.2/ext/gd/gd.c:1923: undefined reference to `php_gd_gdImageGd'
ext/gd/.libs/gd.o(.text+0x4223): In function `zif_imagegd2':
/var/distrib/php-5.1.2/ext/gd/gd.c:1932: undefined reference to `php_gd_gdImageGd2'
ext/gd/.libs/gd.o(.text+0x43bd): In function `zif_imagecolorallocate':
/var/distrib/php-5.1.2/ext/gd/gd.c:1974: undefined reference to `php_gd_gdImageColorAllocate'
ext/gd/.libs/gd.o(.text+0x4588): In function `zif_imagepalettecopy':
/var/distrib/php-5.1.2/ext/gd/gd.c:1993: undefined reference to `php_gd_gdImagePaletteCopy'
ext/gd/.libs/gd.o(.text+0x491d): In function `zif_imagecolorclosest':
/var/distrib/php-5.1.2/ext/gd/gd.c:2057: undefined reference to `php_gd_gdImageColorClosest'
ext/gd/.libs/gd.o(.text+0x4b61): In function `zif_imagecolorclosesthwb':
/var/distrib/php-5.1.2/ext/gd/gd.c:2079: undefined reference to `php_gd_gdImageColorClosestHWB'
ext/gd/.libs/gd.o(.text+0x4d6e): In function `zif_imagecolordeallocate':
/var/distrib/php-5.1.2/ext/gd/gd.c:2109: undefined reference to `php_gd_gdImageColorDeallocate'
ext/gd/.libs/gd.o(.text+0x4edd): In function `zif_imagecolorresolve':
/var/distrib/php-5.1.2/ext/gd/gd.c:2135: undefined reference to `php_gd_gdImageColorResolve'
ext/gd/.libs/gd.o(.text+0x5121): In function `zif_imagecolorexact':
/var/distrib/php-5.1.2/ext/gd/gd.c:2156: undefined reference to `php_gd_gdImageColorExact'
ext/gd/.libs/gd.o(.text+0x5883): In function `zif_imagegammacorrect':
/var/distrib/php-5.1.2/ext/gd/gd.c:2259: undefined reference to `php_gd_gdImageGetPixel'
ext/gd/.libs/gd.o(.text+0x59bc):/var/distrib/php-5.1.2/ext/gd/gd.c:2260: undefined reference to `php_gd_gdImageSetPixel'
ext/gd/.libs/gd.o(.text+0x5d01): In function `zif_imagesetpixel':
/var/distrib/php-5.1.2/ext/gd/gd.c:2299: undefined reference to `php_gd_gdImageSetPixel'
ext/gd/.libs/gd.o(.text+0x5fc5): In function `zif_imageline':
/var/distrib/php-5.1.2/ext/gd/gd.c:2326: undefined reference to `php_gd_gdImageAALine'
ext/gd/.libs/gd.o(.text+0x6063):/var/distrib/php-5.1.2/ext/gd/gd.c:2330: undefined reference to `php_gd_gdImageLine'
ext/gd/.libs/gd.o(.text+0x6378): In function `zif_imagedashedline':
/var/distrib/php-5.1.2/ext/gd/gd.c:2355: undefined reference to `php_gd_gdImageDashedLine'
ext/gd/.libs/gd.o(.text+0x66f8): In function `zif_imagerectangle':
/var/distrib/php-5.1.2/ext/gd/gd.c:2379: undefined reference to `php_gd_gdImageRectangle'
ext/gd/.libs/gd.o(.text+0x6a78): In function `zif_imagefilledrectangle':
/var/distrib/php-5.1.2/ext/gd/gd.c:2403: undefined reference to `php_gd_gdImageFilledRectangle'
ext/gd/.libs/gd.o(.text+0x6e73): In function `zif_imagearc':
/var/distrib/php-5.1.2/ext/gd/gd.c:2440: undefined reference to `php_gd_gdImageArc'
ext/gd/.libs/gd.o(.text+0x72d8): In function `zif_imageellipse':
/var/distrib/php-5.1.2/ext/gd/gd.c:2465: undefined reference to `php_gd_gdImageEllipse'
ext/gd/.libs/gd.o(.text+0x7625): In function `zif_imagefilltoborder':
/var/distrib/php-5.1.2/ext/gd/gd.c:2492: undefined reference to `php_gd_gdImageFillToBorder'
ext/gd/.libs/gd.o(.text+0x78d5): In function `zif_imagefill':
/var/distrib/php-5.1.2/ext/gd/gd.c:2514: undefined reference to `php_gd_gdImageFill'
ext/gd/.libs/gd.o(.text+0x7bab): In function `zif_imagecolortransparent':
/var/distrib/php-5.1.2/ext/gd/gd.c:2562: undefined reference to `php_gd_gdImageColorTransparent'
ext/gd/.libs/gd.o(.text+0x7cf3): In function `zif_imageinterlace':
/var/distrib/php-5.1.2/ext/gd/gd.c:2595: undefined reference to `php_gd_gdImageInterlace'
ext/gd/.libs/gd.o(.text+0x7fe6): In function `php_imagepolygon':
/var/distrib/php-5.1.2/ext/gd/gd.c:2658: undefined reference to `php_gd_gdImageFilledPolygon'
ext/gd/.libs/gd.o(.text+0x80ba):/var/distrib/php-5.1.2/ext/gd/gd.c:2660: undefined reference to `php_gd_gdImagePolygon'
ext/gd/.libs/gd.o(.text+0x8199): In function `php_find_gd_font':
/var/distrib/php-5.1.2/ext/gd/gd.c:2713: undefined reference to `php_gd_gdFontGiant'
ext/gd/.libs/gd.o(.text+0x81a6):/var/distrib/php-5.1.2/ext/gd/gd.c:2711: undefined reference to `php_gd_gdFontTiny'
ext/gd/.libs/gd.o(.text+0x81b6):/var/distrib/php-5.1.2/ext/gd/gd.c:2699: undefined reference to `php_gd_gdFontMediumBold'
ext/gd/.libs/gd.o(.text+0x81c6):/var/distrib/php-5.1.2/ext/gd/gd.c:2702: undefined reference to `php_gd_gdFontLarge'
ext/gd/.libs/gd.o(.text+0x81d6):/var/distrib/php-5.1.2/ext/gd/gd.c:2696: undefined reference to `php_gd_gdFontSmall'
ext/gd/.libs/gd.o(.text+0x8615): In function `php_imagechar':
/var/distrib/php-5.1.2/ext/gd/gd.c:2775: undefined reference to `php_gd_gdImageSetPixel'
ext/gd/.libs/gd.o(.text+0x8672):/var/distrib/php-5.1.2/ext/gd/gd.c:2835: undefined reference to `php_gd_gdImageChar'
ext/gd/.libs/gd.o(.text+0x86a4):/var/distrib/php-5.1.2/ext/gd/gd.c:2828: undefined reference to `php_gd_gdImageChar'
ext/gd/.libs/gd.o(.text+0x86d2):/var/distrib/php-5.1.2/ext/gd/gd.c:2842: undefined reference to `php_gd_gdImageCharUp'
ext/gd/.libs/gd.o(.text+0x8afb): In function `zif_imagecopy':
/var/distrib/php-5.1.2/ext/gd/gd.c:2916: undefined reference to `php_gd_gdImageCopy'
ext/gd/.libs/gd.o(.text+0x8f95): In function `zif_imagecopymerge':
/var/distrib/php-5.1.2/ext/gd/gd.c:2953: undefined reference to `php_gd_gdImageCopyMerge'
ext/gd/.libs/gd.o(.text+0x94bd): In function `zif_imagecopymergegray':
/var/distrib/php-5.1.2/ext/gd/gd.c:2989: undefined reference to `php_gd_gdImageCopyMergeGray'
ext/gd/.libs/gd.o(.text+0x9a33): In function `zif_imagecopyresized':
/var/distrib/php-5.1.2/ext/gd/gd.c:3033: undefined reference to `php_gd_gdImageCopyResized'
ext/gd/.libs/gd.o(.text+0x9eb3): In function `_php_image_bw_convert':
/var/distrib/php-5.1.2/ext/gd/gd.c:3748: undefined reference to `php_gd_gdImageCreate'
ext/gd/.libs/gd.o(.text+0x9ed8):/var/distrib/php-5.1.2/ext/gd/gd.c:3754: undefined reference to `php_gd_gdImageColorAllocate'
ext/gd/.libs/gd.o(.text+0x9ef3):/var/distrib/php-5.1.2/ext/gd/gd.c:3760: undefined reference to `php_gd_gdImageColorAllocate'
ext/gd/.libs/gd.o(.text+0x9f33):/var/distrib/php-5.1.2/ext/gd/gd.c:3774: undefined reference to `php_gd_gdImageGetPixel'
ext/gd/.libs/gd.o(.text+0x9f7d):/var/distrib/php-5.1.2/ext/gd/gd.c:3781: undefined reference to `php_gd_gdImageSetPixel'
ext/gd/.libs/gd.o(.text+0x9fff):/var/distrib/php-5.1.2/ext/gd/gd.c:3768: undefined reference to `php_gd_gdImageTrueColorToPalette'
ext/gd/.libs/gd.o(.text+0xa3e3): In function `zif_png2wbmp':
/var/distrib/php-5.1.2/ext/gd/gd.c:3878: undefined reference to `php_gd_gdImageCreateFromPng'
ext/gd/.libs/gd.o(.text+0xa478):/var/distrib/php-5.1.2/ext/gd/gd.c:3919: undefined reference to `php_gd_gdImageCreate'
ext/gd/.libs/gd.o(.text+0xa4a3):/var/distrib/php-5.1.2/ext/gd/gd.c:3925: undefined reference to `php_gd_gdImageCopyResized'
ext/gd/.libs/gd.o(.text+0xa4ac):/var/distrib/php-5.1.2/ext/gd/gd.c:3927: undefined reference to `php_gd_gdImageDestroy'
ext/gd/.libs/gd.o(.text+0xa4c2):/var/distrib/php-5.1.2/ext/gd/gd.c:3931: undefined reference to `php_gd_gdImageCreate'
ext/gd/.libs/gd.o(.text+0xa4e7):/var/distrib/php-5.1.2/ext/gd/gd.c:3937: undefined reference to `php_gd_gdImageColorAllocate'
ext/gd/.libs/gd.o(.text+0xa502):/var/distrib/php-5.1.2/ext/gd/gd.c:3943: undefined reference to `php_gd_gdImageColorAllocate'
ext/gd/.libs/gd.o(.text+0xa53a):/var/distrib/php-5.1.2/ext/gd/gd.c:3953: undefined reference to `php_gd_gdImageGetPixel'
ext/gd/.libs/gd.o(.text+0xa584):/var/distrib/php-5.1.2/ext/gd/gd.c:3960: undefined reference to `php_gd_gdImageSetPixel'
ext/gd/.libs/gd.o(.text+0xa632):/var/distrib/php-5.1.2/ext/gd/gd.c:3964: undefined reference to `php_gd_gdImageDestroy'
ext/gd/.libs/gd.o(.text+0xa643):/var/distrib/php-5.1.2/ext/gd/gd.c:3966: undefined reference to `php_gd_gdImageWBMP'
ext/gd/.libs/gd.o(.text+0xa65e):/var/distrib/php-5.1.2/ext/gd/gd.c:3971: undefined reference to `php_gd_gdImageDestroy'
ext/gd/.libs/gd.o(.text+0xa717): In function `php_image_filter_negate':
/var/distrib/php-5.1.2/ext/gd/gd.c:3998: undefined reference to `php_gd_gdImageNegate'
ext/gd/.libs/gd.o(.text+0xa787): In function `php_image_filter_grayscale':
/var/distrib/php-5.1.2/ext/gd/gd.c:4009: undefined reference to `php_gd_gdImageGrayScale'
ext/gd/.libs/gd.o(.text+0xa807): In function `php_image_filter_brightness':
/var/distrib/php-5.1.2/ext/gd/gd.c:4032: undefined reference to `php_gd_gdImageBrightness'
ext/gd/.libs/gd.o(.text+0xa88a): In function `php_image_filter_contrast':
/var/distrib/php-5.1.2/ext/gd/gd.c:4055: undefined reference to `php_gd_gdImageContrast'
ext/gd/.libs/gd.o(.text+0xa912): In function `php_image_filter_colorize':
/var/distrib/php-5.1.2/ext/gd/gd.c:4078: undefined reference to `php_gd_gdImageColor'
ext/gd/.libs/gd.o(.text+0xa97f): In function `php_image_filter_edgedetect':
/var/distrib/php-5.1.2/ext/gd/gd.c:4089: undefined reference to `php_gd_gdImageEdgeDetectQuick'
ext/gd/.libs/gd.o(.text+0xa9ef): In function `php_image_filter_emboss':
/var/distrib/php-5.1.2/ext/gd/gd.c:4100: undefined reference to `php_gd_gdImageEmboss'
ext/gd/.libs/gd.o(.text+0xaa5f): In function `php_image_filter_gaussian_blur':
/var/distrib/php-5.1.2/ext/gd/gd.c:4111: undefined reference to `php_gd_gdImageGaussianBlur'
ext/gd/.libs/gd.o(.text+0xaacf): In function `php_image_filter_selective_blur':
/var/distrib/php-5.1.2/ext/gd/gd.c:4122: undefined reference to `php_gd_gdImageSelectiveBlur'
ext/gd/.libs/gd.o(.text+0xab3f): In function `php_image_filter_mean_removal':
/var/distrib/php-5.1.2/ext/gd/gd.c:4133: undefined reference to `php_gd_gdImageMeanRemoval'
ext/gd/.libs/gd.o(.text+0xabc8): In function `php_image_filter_smooth':
/var/distrib/php-5.1.2/ext/gd/gd.c:4157: undefined reference to `php_gd_gdImageSmooth'
ext/gd/.libs/gd.o(.text+0xade0): In function `zif_imageconvolution':
/var/distrib/php-5.1.2/ext/gd/gd.c:4239: undefined reference to `php_gd_gdImageConvolution'
ext/gd/.libs/gd.o(.text+0xaf49): In function `zif_imageantialias':
/var/distrib/php-5.1.2/ext/gd/gd.c:4265: undefined reference to `php_gd_gdImageAntialias'
ext/gd/.libs/gd.o(.text+0x415): In function `php_free_gd_image':
/var/distrib/php-5.1.2/ext/gd/gd.c:359: undefined reference to `php_gd_gdImageDestroy'
ext/gd/.libs/gd.o(.text+0x9faf): In function `_php_image_bw_convert':
/var/distrib/php-5.1.2/ext/gd/gd.c:3785: undefined reference to `php_gd_gdImageWBMPCtx'
*** Error code 1