Subject: pkg/22857: Fix benchmarks/httperf on SunOS
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <jonathan@perkin.org.uk>
List: netbsd-bugs
Date: 09/19/2003 14:43:54
>Number: 22857
>Category: pkg
>Synopsis: Fix benchmarks/httperf on SunOS
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Sep 19 14:44:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Jonathan Perkin
>Release: N/A
>Organization:
British Broadcasting Corporation
>Environment:
SunOS build1 5.9 Generic_112233-01 sun4u sparc SUNW,UltraSPARC-IIi-cEngine
>Description:
httperf needs the -lsocket -lnsl -lresolv dance on Solaris.
To do this, we need to genericise the supplied Makefile a bit. In doing
so we may help a little if host compiler isn't gcc (untested as yet).
>How-To-Repeat:
/home/jonp/pkg/gcc-3.3/bin/gcc -g httperf.o object.o call.o conn.o sess.o core.o event.o http.o timer.o lib/getopt.o lib/getopt1.o gen/libgen.a stat/libstat.a /lib/libm.so -o httperf
Undefined first referenced
symbol in file
socket core.o
gethostbyname core.o
bind core.o
setsockopt core.o
inet_aton core.o
getsockopt core.o
connect core.o
ld: fatal: Symbol referencing errors. No output written to httperf
collect2: ld returned 1 exit status
gmake: *** [httperf] Error 1
*** Error code 2
>Fix:
http://www.perkin.org.uk/projects/netbsd/httperf.diff
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/benchmarks/httperf/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- Makefile 2003/07/17 21:24:28 1.4
+++ Makefile 2003/09/19 14:36:28
@@ -13,6 +13,12 @@
USE_GMAKE= yes
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "SunOS"
+LDFLAGS+= -lsocket -lnsl -lresolv
+.endif
+
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/httperf ${LOCALBASE}/bin/httperf
${INSTALL_MAN} ${WRKSRC}/httperf.man ${LOCALBASE}/man/man1/httperf.1
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/benchmarks/httperf/distinfo,v
retrieving revision 1.2
diff -u -r1.2 distinfo
--- distinfo 2001/04/20 09:13:26 1.2
+++ distinfo 2003/09/19 14:36:28
@@ -2,3 +2,4 @@
SHA1 (httperf-0.6.tar.gz) = 6e0bcc21e2a94061b231c50182528a17ba22f14f
Size (httperf-0.6.tar.gz) = 85351 bytes
+SHA1 (patch-aa) = eb5e6431c62f1ec631a0d6b598de0e4029dc97fc
--- /dev/null Fri Sep 19 15:36:14 2003
+++ patches/patch-aa Fri Sep 19 15:34:45 2003
@@ -1,0 +1,17 @@
+$NetBSD$
+
+--- Makefile.orig Tue Jun 2 04:06:52 1998
++++ Makefile Fri Sep 19 15:34:28 2003
+@@ -38,9 +38,9 @@
+ CPPDEBUG := -DDEBUG $(CPPDEBUG)
+ CPPOPTIM := -DNDEBUG $(CPPOPTIM)
+
+-CPPFLAGS = -I. -Ilib $(CPP$(HOW))
+-CFLAGS = $(CONFIG) $(CFLAGS$(HOW))
+-LDFLAGS = $(LDFLAGS$(HOW))
++CPPFLAGS += -I. -Ilib $(CPP$(HOW))
++#CFLAGS = $(CONFIG) $(CFLAGS$(HOW))
++#LDFLAGS = $(LDFLAGS$(HOW))
+
+ HTTPERF = httperf object call conn sess core event http timer $(EXTRA)
+
>Release-Note:
>Audit-Trail:
>Unformatted: