Hi everyone,
I have SUn E250 server running solaris 10. I have installed apache 2 + MySQL + PHP-5.1.4 following the guidelines on this website
http://meljr.com/~meljr/AMPSolaris10.html
Excellent document for first time installation. Now, because I wanted to use Coppermine Photo Gallery, I realised I required GD or ImageMagick.
So I decided to go for GD2. I didn't realise that PHP already had GD2 installed as a extension. So I checked my installed director /usr/local/include/php/ext .... no GD and checked phpinfo.php no GD listed.
An since I had no idea how to use that extension file from /php-5.1.4/ext/gd folder, I decided to download GD and build it from source. As requirement of GD, i installed libraries for png, jpeg, zlib and many more and all were installed into /usr/local/lib (thats what I think as I saw all the lib files there).
Anyways then to combine gd with php, I decided to recompile php with the following options..... plz note I executed the ./configure command under the
/php-5.1.4 directory.
./configure --with-apxs2=/usr/apache2/bin/apxs \
> --with-gd \
> --with-zlib-dir="/usr" \
> --with-png-dir="/usr/local" \
> --with-jpeg-dir="/usr/local" \
> --enable-gd-native-ttf --with-freetype-dir=/usr \
> --with-mysql=/usr/sfw --enable-dbase \
> --with-libxml-dir=/usr/local \
> --with-config-file-path=/etc/apache2
<snip>
creating libtool
appending configuration tag "CXX" to libtool
e[1mGenerating filese[m
creating ./config.status
creating php5.spec
creating main/build-defs.h
creating scripts/phpize
creating scripts/man1/phpize.1
creating scripts/php-config
creating scripts/man1/php-config.1
creating sapi/cli/php.1
creating main/php_config.h
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.
#
Then I did "gmake / make" gives me the same result
# gmake
/bin/sh /php-5.1.4/libtool --silent --preserve-dup-deps --mode=compile gcc -Iext/standard/ -I/php-5.1.4/ext/standard/ -DPHP_ATOM_INC -I/php-5.1.4/include -I/php-5.1.4/main -I/php-5.1.4 -I/usr/local/include/libxml2 -I/php-5.1.4/ext/date/lib -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/sfw/include/mysql -I/php-5.1.4/TSRM -I/php-5.1.4/Zend -D_POSIX_PTHREAD_SEMANTICS -I/usr/local/include -g -O2 -c /php-5.1.4/ext/standard/info.c -o ext/standard/info.lo
<snip>
Zend/zend_objects.lo Zend/zend_object_handlers.lo Zend/zend_objects_API.lo Zend/zend_mm.lo Zend/zend_default_classes.lo Zend/zend_execute.lo sapi/cli/php_cli.lo sapi/cli/php_cli_readline.lo sapi/cli/getopt.lo main/internal_functions_cli.lo -lmysqlclient -lfreetype -lpng -lz -ljpeg -lz -lresolv -lm -lnsl -lsocket -lgcc -lxml2 -lz -lm -lsocket -lnsl -lxml2 -lz -lm -lsocket -lnsl -lxml2 -lz -lm -lsocket -lnsl -lxml2 -lz -lm -lsocket -lnsl -lxml2 -lz -lm -lsocket -lnsl -lxml2 -lz -lm -lsocket -lnsl -o sapi/cli/php
Undefined first referenced
symbol in file
libiconv_close ext/gd/libgd/.libs/gdkanji.o
libiconv_open ext/gd/libgd/.libs/gdkanji.o
libiconv ext/gd/libgd/.libs/gdkanji.o
ld: fatal: Symbol referencing errors. No output written to sapi/cli/php
collect2: ld returned 1 exit status
gmake: *** [sapi/cli/php] Error 1
#
#
How do I get GD to work with my already compiled PHP ? Can someone please help me ? I have spent 2 complete days searching google and a lot of forums, but I've had just no luck.
I don't have any compulsion to use GD2 only, if someone knows how to get ImageMagick working, please do let me know, because I have tried to build it too using the install instructions for UNIX on their website, but got the following errors after I executed make (./configure for image magick was successful too)
snapshot of error from image magick installation
depbase=`echo Magick++/lib/Thread.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/bash ./libtool --silent --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I./magick -I./wand -I. -I. -I./Magick++/lib -I./Magick++/lib -I/usr/sfw/include/freetype2 -I/usr/sfw/include -I/usr/openwin/include -I/usr/openwin/include/X11 -I/usr/local/include/libxml2 -D_REENTRANT -pthread -MT Magick++/lib/Thread.lo -MD -MP -MF "$depbase.Tpo" -c -o Magick++/lib/Thread.lo Magick++/lib/Thread.cpp; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
g++: unrecognized option `-pthread'
depbase=`echo Magick++/lib/TypeMetric.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/bash ./libtool --silent --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I./magick -I./wand -I. -I. -I./Magick++/lib -I./Magick++/lib -I/usr/sfw/include/freetype2 -I/usr/sfw/include -I/usr/openwin/include -I/usr/openwin/include/X11 -I/usr/local/include/libxml2 -D_REENTRANT -pthread -MT Magick++/lib/TypeMetric.lo -MD -MP -MF "$depbase.Tpo" -c -o Magick++/lib/TypeMetric.lo Magick++/lib/TypeMetric.cpp; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
g++: unrecognized option `-pthread'
/bin/bash ./libtool --silent --tag=CXX --mode=link g++ -D_REENTRANT -pthread -L/usr/openwin/lib -R/usr/openwin/lib -L/usr/sfw/lib -R/usr/sfw/lib -lfreetype -L/usr/local/lib -o Magick++/lib/libMagick++.la -rpath /usr/local/lib -version-info 10:4:0 Magick++/lib/Blob.lo Magick++/lib/BlobRef.lo Magick++/lib/CoderInfo.lo Magick++/lib/Color.lo Magick++/lib/Drawable.lo Magick++/lib/Exception.lo Magick++/lib/Functions.lo Magick++/lib/Geometry.lo Magick++/lib/Image.lo Magick++/lib/ImageRef.lo Magick++/lib/Montage.lo Magick++/lib/Options.lo Magick++/lib/Pixels.lo Magick++/lib/STL.lo Magick++/lib/Thread.lo Magick++/lib/TypeMetric.lo magick/libMagick.la wand/libWand.la
libtool: link: `/usr/sfw/lib/libstdc++.la' is not a valid libtool archive
*** Error code 1
make: Fatal error: Command failed for target `Magick++/lib/libMagick++.la'
#
#
sorry for the long post. I have attached my error log file for both GD and imagemagick.
Thanks
rohit