[httperf] Compiling httperf on Solaris 8 02/02

Martin Arlitt arlitt@granite.hpl.hp.com
Mon, 3 Jun 2002 12:36:06 -0700 (PDT)


Colin

here is the procedure I used to compile on a solaris system.  The system I
had access to did not have inet_aton so I had to handle that issue as
well.  If your system has the inet_aton function you can skip step 5.

1. set compiler to cc
export CC=cc

2. set solaris specific libraries
export LDFLAGS="-lsocket -lnsl -lelf"

3. remove a couple of flags from configure.in (comment them out)
13c13 (diff between modified and original)
< #CPPFLAGS="${CPPFLAGS} -D_GNU_SOURCE -D_XOPEN_SOURCE"
---
> CPPFLAGS="${CPPFLAGS} -D_GNU_SOURCE -D_XOPEN_SOURCE"

4. run autoconf to create a new configure script
autoconf

5. modify core.c and idleconn.c (I couldn't find inet_aton on solaris, so
I made the following changes:

in core.c
626c626
<       if (!inet_pton (AF_INET, server, &sin.sin_addr))
---
>       if (!inet_aton (server, &sin.sin_addr))

in idleconn.c
133c133
<     if (!inet_pton (AF_INET, server, &server_addr.sin_addr))
---
>     if (!inet_aton (server, &server_addr.sin_addr))

then do the standard procedure to build httperf; i.e.,
cd build
../configure
make

there were still a number of warning messages, but httperf did compile
and run for me.

Martin


On Mon, 3 Jun 2002, Colin Bitterfield wrote:

> 
> Help.. 
> 
> So far I have tried the latest version of GCC and Forte 6 the problem is
> the same:
> 
> # env | grep FLAG
> LDFLAGS=-L/usr/local/lib:/opt/sfw/lib -R/usr/local/lib:/opt/sfw/lib
> # env | grep LIBS
> LIBS=-lsocket -lnsl
> 
> CC = gcc
> RANLIB = ranlib
> MKDIR = $(top_srcdir)/mkinstalldirs
> INSTALL = /opt/sfw/bin/ginstall -c
> INSTALL_PROGRAM = ${INSTALL}
> INSTALL_DATA = ${INSTALL} -m 644
> 
> INCLUDES = -I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/lib
> DEFS = -DHAVE_CONFIG_H
> CPPFLAGS =  -DNDEBUG -D_GNU_SOURCE -D_XOPEN_SOURCE
> CFLAGS = -g -O2 -Wall
> LDFLAGS = -L/usr/local/lib:/opt/sfw/lib -R/usr/local/lib:/opt/sfw/lib
> LIBS = -lm -lsocket -lnsl
> 
> COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
> LINK = $(CC) $(LDFLAGS) -o $@
> 
> 
> --Problem follows:
> # make
> making all in lib
> gcc -c -DHAVE_CONFIG_H -I.. -I.. -I../lib   -DNDEBUG -D_GNU_SOURCE
> -D_XOPEN_SOURCE -g -O2 -Wall getopt.c
> getopt.c: In function `_getopt_initialize':
> getopt.c:356: warning: implicit declaration of function `getpid'
> getopt.c: In function `_getopt_internal':
> getopt.c:557: warning: implicit declaration of function `strncmp'
> getopt.c:601: warning: suggest explicit braces to avoid ambiguous `else'
> getopt.c:548: warning: `indfound' might be used uninitialized in this
> function
> gcc -c -DHAVE_CONFIG_H -I.. -I.. -I../lib   -DNDEBUG -D_GNU_SOURCE
> -D_XOPEN_SOURCE -g -O2 -Wall getopt1.c
> gcc -c -DHAVE_CONFIG_H -I.. -I.. -I../lib   -DNDEBUG -D_GNU_SOURCE
> -D_XOPEN_SOURCE -g -O2 -Wall ssl_writev.c
> ar r libutil.a getopt.o getopt1.o ssl_writev.o
> ar: creating libutil.a
> ranlib libutil.a
> making all in gen
> gcc -c -DHAVE_CONFIG_H -I.. -I. -I.. -I../lib   -DNDEBUG -D_GNU_SOURCE
> -D_XOPEN_SOURCE -g -O2 -Wall call_seq.c
> In file included from ../httperf.h:32,
>                  from call_seq.c:29:
> /usr/include/sys/resource.h:144: field `ru_utime' has incomplete type
> /usr/include/sys/resource.h:145: field `ru_stime' has incomplete type
> In file included from /usr/include/sys/stream.h:22,
>                  from
> /opt/sfw/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/include/sys/stream.h:5,
>                  from /usr/include/netinet/in.h:41,
>                  from ../core.h:27,
>                  from call_seq.c:31:
> /usr/include/sys/vnode.h:168: parse error before `timestruc_t'
> /usr/include/sys/vnode.h:168: warning: no semicolon at end of struct or
> union
> /usr/include/sys/vnode.h:169: warning: data definition has no type or
> storage class
> /usr/include/sys/vnode.h:170: parse error before `va_ctime'
> /usr/include/sys/vnode.h:170: warning: data definition has no type or
> storage class
> /usr/include/sys/vnode.h:175: parse error before `}'
> /usr/include/sys/vnode.h:175: warning: data definition has no type or
> storage class
> /usr/include/sys/vnode.h:202: parse error before `vattr32_t'
> /usr/include/sys/vnode.h:202: warning: data definition has no type or
> storage class
> *** Error code 1
> make: Fatal error: Command failed for target `call_seq.o'
> Current working directory /projects/httpperf/httperf-0.8/gen
> *** Error code 1
> make: Fatal error: Command failed for target `all-recursive'
> 
> 
> 
> -------------------------------------------
> Colin Bitterfield
> mailto:colin@bitterfield.com
> phone: (310) 497-8979
> fax: (928) 223-3178
> Consulting for the Internet:
> e-commerce, VPN, DSL, Network Design
> -------------------------------------------
> 
> 
> _______________________________________________
> httperf mailing list
> httperf@linux.hpl.hp.com
> http://linux.hpl.hp.com/cgi-bin/mailman/listinfo/httperf
>