Subject: Re: _jpeg_resync_to_restart
To: Tobias Seiler <tobi@themaster.de>
From: Frederick Bruckman <fb@enteract.com>
List: port-i386
Date: 10/12/2000 22:52:44
On Fri, 13 Oct 2000, Tobias Seiler wrote:

> I have configured php to load the gd addon.
> But when restarting the apache server I keep getting an error.
> 
> When I run a 'apachectl configtest' I get the following error message:
> 
> /usr/libexec/ld.so: Undefined symbol "_jpeg_resync_to_restart" in httpd:/usr/pkg/lib/libgd.so.1.9
> 
> Has one of  you guys an idea whats going on here ?
> 
> A 'nm libjpeg.so.62' showed me the the funtion exists in there.

It looks like php-gd is counting on the the inter-library dependencies
in libgd.so.1.9 to pull in libjpeg &c, but libtool strips them when it
builds libgd. (It really shouldn't do that...) Please try the
following patch. What's supposed to happen is that libtool should read
the dependencies from the libgd.la file and add them to the link line.


Frederick

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/php3-gd/Makefile,v
retrieving revision 1.4
diff -c -r1.4 Makefile
*** Makefile	1999/08/29 21:16:20	1.4
--- Makefile	2000/10/13 03:52:19
***************
*** 5,10 ****
--- 5,11 ----
  
  DEPENDS+=	gd-*:../../graphics/gd
  
+ USE_LIBTOOL=	yes
  USE_PERL5=	yes
  
  BUILDING_EXTENSION_MODULE=yes
***************
*** 12,18 ****
  do-build:
  	cd ${WRKSRC}/functions && \
  		${COMPILE.c} -I.. -I. -I${LOCALBASE}/include -fPIC -DPIC -DCOMPILE_DL gd.c && \
! 		ld -Bshareable -o gd.so gd.o -L${LOCALBASE}/lib -R${LOCALBASE}/lib -lgd
  
  do-install:
  	${INSTALL_DATA} ${WRKSRC}/functions/gd.so ${PREFIX}/lib/php3/
--- 13,19 ----
  do-build:
  	cd ${WRKSRC}/functions && \
  		${COMPILE.c} -I.. -I. -I${LOCALBASE}/include -fPIC -DPIC -DCOMPILE_DL gd.c && \
! 		${LIBTOOL} ld -Bshareable -o gd.so gd.o -L${LOCALBASE}/lib -R${LOCALBASE}/lib -lgd
  
  do-install:
  	${INSTALL_DATA} ${WRKSRC}/functions/gd.so ${PREFIX}/lib/php3/