Compile problems with new port

Paul Schmehl pauls at utdallas.edu
Sat Jan 28 11:26:46 PST 2006


I recently discovered sara - http://www-arc.com/sara.  I thought I'd play 
around with it and wee what it could do, so I downloaded it, extracted it 
and tried to compile it.

I discovered that, if I configured it as follows, it compiled fine.

./configure --with-ssh=no --with-sqlat=no

So, I thought, well, I might as well make a port of it while I'm at it. 
But the port won't compile.  Any thoughts on what I'm doing wrong would be 
appreciated.

When I compile the app, the first thing I see with make is this:
 make
cd src/misc; make "LIBS=-lrpcsvc" "XFLAGS=-g -O   -DUSE_STDINT=1 
-DGETGROUPS_T=gid_t -DSYS_ERRLIST_DECLARED=1 " "RPCGEN=/usr/bin/rpcgen"

When I make in the port, I get this:
creating Makefile
===>  Building for sara-6.0.7d
cd src/misc; make "LIBS=" "XFLAGS=" "RPCGEN=/usr/bin/rpcgen"
cc -O -I.  -c md5.c
cc -O -I.  -c md5c.c
cc -O -I.  -o ../../bin/md5 md5.o md5c.o
cc -O -I.  -o ../../bin/sys_socket sys_socket.c
cc -O -I.  -o ../../bin/timeout timeout.c
cc -O -I.  -o ../../bin/rcmd rcmd.c
cc -O -I.  -o ../../bin/safe_finger safe_finger.c
/usr/bin/rpcgen rex.x 2>/dev/null
cc -O -I.  -c rex.c
rex.c: In function `rex_auth':
rex.c:140: error: syntax error before "gid"
rex.c:142: error: `gid' undeclared (first use in this function)
rex.c:142: error: (Each undeclared identifier is reported only once
rex.c:142: error: for each function it appears in.)
*** Error code 1

Stop in /usr/ports/security/sara/work/sara-6.0.7d/src/misc.
*** Error code 1

As you can see, after it cd's to src/misc, the make uses a null LIBS value 
as well as a null XFLAGS value, and several other values are missing.

Here's the Makefile I'm using (keep in mind this is preliminary for testing 
only)

# New ports collection makefile for:    sara
# Date created:                         26 Jan 2006
# Whom:                                 pauls
#
# $FreeBSD$
#

PORTNAME=       sara
PORTVERSION=    6.0.7d
CATEGORIES=     security
MASTER_SITES=   http://www-arc.com/sara/downloads/
EXTRACT_SUFX=   .tgz

MAINTAINER=     pauls at utdallas.edu
COMMENT=        An open source security auditing tool

USE_RC_SUBR=    sara.sh
GNU_CONFIGURE=  yes
CONFIGURE_ARGS+=        --with-ssh=no --with-sqlat=no
CONFIGURE_TARGET=       --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ENV=  CPPFLAGS="${CXXFLAGS} -I${LOCALBASE}/include"
SUB_FILES=      pkg-message

BUILD_DEPENDS=  openssl:${PORTSDIR}/security/openssl
USE_GCC=        3.4+
USE_LINUX=      yes
USE_PERL5=      yes

.include <bsd.port.pre.mk>

.include <bsd.port.post.mk>

I have tried using various AUTOTOOLS and a number of other things, but the 
make always fails at the same point.  I also noticed that config.cache 
shows the port make version using cc rather than gcc, even though the 
Makefile specifies using gcc.

diff work/sara-6.0.7d/config.cache 
/home/pauls/Downloads/sara-6.0.7d/config.cache
20d19
< lt_cv_sys_max_cmd_len=${lt_cv_sys_max_cmd_len='65536'}
22,23c21
< ac_cv_prog_CC=${ac_cv_prog_CC='cc'}
< ac_cv_c_cross=${ac_cv_c_cross='no'}
---
> ac_cv_prog_CC=${ac_cv_prog_CC='gcc'}
24a23
> ac_cv_c_cross=${ac_cv_c_cross='no'}
30c29,30
< ac_cv_prog_CPP=${ac_cv_prog_CPP=''cc -E''}
---
> ac_cv_prog_gcc_g=${ac_cv_prog_gcc_g='yes'}
> ac_cv_prog_CPP=${ac_cv_prog_CPP=''gcc -E''}

What am I missing?

Paul Schmehl (pauls at utdallas.edu)
Adjunct Information Security Officer
University of Texas at Dallas
AVIEN Founding Member
http://www.utdallas.edu/


More information about the freebsd-ports mailing list