Hi!

I have checked out the gdchart extension from cvs and am trying to compile
it for php 4.3.8.

What I did:

 (a) copy the directory to ext/gdchart

 (b) ./buildconf --force

 (c) ./configure ... --enable-gdchart 

 (d) make

I had to change the ext/gdchart/config.m4 script to use the right paths. My
current config.m4 config is:

------------< snip <------< snip <------< snip <------------
dnl $Id: config.m4,v 1.2 2003/08/22 18:16:57 rasmus Exp $
dnl config.m4 for extension gdchart

PHP_ARG_ENABLE(gdchart, whether to enable gdchart support,
[  --enable-gdchart           Enable gdchart support])

extra_sources="gdchart-src/gdc.c gdchart-src/gdc_pie.c \
gdchart-src/array_alloc.c gdchart-src/price_conv.c gdchart-src/gdchart.c"

if test "$PHP_GDCHART" != "no"; then
  PHP_ADD_INCLUDE($PHP_GDCHART)
  PHP_ADD_INCLUDE($ext_srcdir)
  PHP_ADD_INCLUDE($ext_srcdir/libgd)
  PHP_NEW_EXTENSION(gdchart, gdchart.c $extra_sources, $ext_shared)
fi
------------< snip <------< snip <------< snip <------------

Everything compiles fine until it gets to the end where it has to link
libphp4.so. Then I get:

------------< snip <------< snip <------< snip <------------
colorgcc -shared  ext/zlib/.libs/zlib.o ext/zlib/.libs/zlib_fopen_wrapper.o
ext/ctype/.libs/ctype.o ext/gd/.libs/gd.o ext/gd/.libs/gdttf.o
ext/gd/libgd/.libs/gd.o ext/gd/libgd/.libs/gd_gd.o
ext/gd/libgd/.libs/gd_gd2.o ext/gd/libgd/.libs/gd_io.o
ext/gd/libgd/.libs/gd_io_dp.o ext/gd/libgd/.libs/gd_io_file.o
ext/gd/libgd/.libs/gd_ss.o ext/gd/libgd/.libs/gd_io_ss.o
ext/gd/libgd/.libs/gd_png.o ext/gd/libgd/.libs/gd_jpeg.o
ext/gd/libgd/.libs/gdxpm.o ext/gd/libgd/.libs/gdfontt.o
ext/gd/libgd/.libs/gdfonts.o ext/gd/libgd/.libs/gdfontmb.o
ext/gd/libgd/.libs/gdfontl.o ext/gd/libgd/.libs/gdfontg.o
ext/gd/libgd/.libs/gdtables.o ext/gd/libgd/.libs/gdft.o
ext/gd/libgd/.libs/gdcache.o ext/gd/libgd/.libs/gdkanji.o
ext/gd/libgd/.libs/wbmp.o ext/gd/libgd/.libs/gd_wbmp.o
ext/gd/libgd/.libs/gdhelpers.o ext/gd/libgd/.libs/gd_topal.o
ext/gd/libgd/.libs/gd_gif_in.o ext/gd/libgd/.libs/xbm.o
ext/gdchart/.libs/gdchart.o ext/gdchart/gdchart-src/.libs/gdc.o
ext/gdchart/gdchart-src/.libs/gdc_pie.o
ext/gdchart/gdchart-src/.libs/array_alloc.o
ext/gdchart/gdchart-src/.libs/price_conv.o
ext/gdchart/gdchart-src/.libs/gdchart.o ext/posix/.libs/posix.o

[...snip ...lots of other modules ...snip]

Zend/.libs/zend_indent.o Zend/.libs/zend_builtin_functions.o
Zend/.libs/zend_sprintf.o Zend/.libs/zend_ini.o Zend/.libs/zend_qsort.o
Zend/.libs/zend_multibyte.o Zend/.libs/zend_execute.o
sapi/apache/.libs/sapi_apache.o sapi/apache/.libs/mod_php4.o
sapi/apache/.libs/php_apache.o main/.libs/internal_functions.o  -lcrypt
-lcrypt /usr/lib/libfreetype.so -lpng -lz -lz -lresolv -lm -ldl -lcrypt
-lcrypt  -Wl,-soname -Wl,libphp4.so -o .libs/libphp4.so
main/.libs/internal_functions.o(.data+0x0): multiple definition of
GDC_image_type'
ext/gdchart/.libs/gdchart.o(.data+0x0): first defined here
main/.libs/internal_functions.o(.data+0x4): multiple definition of
GDC_jpeg_quality'
ext/gdchart/.libs/gdchart.o(.data+0x4): first defined here
main/.libs/internal_functions.o(.data+0x8): multiple definition of

[...snip ...lots of other GDC_* multiple definition of errors ...snip]

ext/gdchart/.libs/gdchart.o(.bss+0xe0): first defined here
main/.libs/internal_functions.o(.bss+0xe4): multiple definition of
GDC_hard_grapheight'
ext/gdchart/.libs/gdchart.o(.bss+0xe4): first defined here
collect2: ld returned 1 exit status
make: *** [libphp4.la] Error 1
[EMAIL PROTECTED]:~/c++/projects/router/build/php-4.3.8#
------------< snip <------< snip <------< snip <------------

What am I doing wrong?

Any help would really be appreciated.

-- 

Regards
 Abraham

TODAY the Pond!
TOMORROW the World!
                -- Frogs (1972)

___________________________________________________
 Abraham vd Merwe - Frogfoot Networks CC
 1st Floor, Albion Springs, 183 Main Road, Newlands
 Phone: +27 21 689 3876 Cell: +27 82 565 4451
 Http: http://www.frogfoot.net/ Email: [EMAIL PROTECTED]

Reply via email to