Subject: Re: Apache, PHP build failure
To: =?iso-8859-1?Q?R=E9mi_Zara?= <remi_zara@mac.com>
From: Johnny Lam <jlam@jgrind.org>
List: tech-pkg
Date: 10/20/2001 08:28:24
On Sat, Oct 20, 2001 at 03:54:37PM +0200, Rémi Zara wrote:
> 
> I'm having trouble updating PHP and Apache en my NetBSD 1.5 release 
> (GENERIC) mac68k box.
> The build seems to fail at link with a lot of (if not all) symbols 
> multiply defined.
> What I did was cd in the directory and make update.
> I had apache 1.3.20 installed and PHP 4.0.5  with php-gd and php-mysql.
> Here is below some of the output for apache, the output for PHP being 
> very similar:
> Can someone tell me what's going on ?

I think the following patch to www/apache/Makefile should fix things.
Please let me know if it does.

	Thanks,

	-- Johnny Lam <jlam@jgrind.org>

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/apache/Makefile,v
retrieving revision 1.78
diff -u -r1.78 Makefile
--- Makefile	2001/10/17 19:17:00	1.78
+++ Makefile	2001/10/20 15:26:52
@@ -77,11 +77,11 @@
 APACHE_CUSTOM_CFLAGS+=	-O6 -fomit-frame-pointer -fexpensive-optimizations
 .endif
 
-# On NetBSD, we need to link libgcc.a whole-archive so that certain symbols
-# from the C++ implementation (__get_eh_context, etc.) referenced by DSOs
-# written in C++ will resolve correctly.
+# On NetBSD ELF platforms, we need to link libgcc.a whole-archive so that
+# certain symbols from the C++ implementation (__get_eh_context, etc.)
+# referenced by DSOs written in C++ will resolve correctly.
 #
-.if (${OPSYS} == "NetBSD")
+.if (${OPSYS} == "NetBSD") && (${OBJECT_FMT} == "ELF")
 LINK_LIBGCC_LDFLAGS=	-Wl,--whole-archive -lgcc -Wl,--no-whole-archive
 MAKE_ENV+=		LINK_LIBGCC_LDFLAGS="${LINK_LIBGCC_LDFLAGS}"
 .endif