NetBSD Problem Report #47403
From www@NetBSD.org Fri Jan 4 11:24:14 2013
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id 898BE63E77A
for <gnats-bugs@gnats.NetBSD.org>; Fri, 4 Jan 2013 11:24:14 +0000 (UTC)
Message-Id: <20130104112413.023B663E77A@www.NetBSD.org>
Date: Fri, 4 Jan 2013 11:24:12 +0000 (UTC)
From: richard.palo@baou.fr
Reply-To: richard.palo@baou.fr
To: gnats-bugs@NetBSD.org
Subject: pkgsrc/mail/milter-greylist fails when option "drac" is specified
X-Send-Pr-Version: www-1.0
>Number: 47403
>Category: pkg
>Synopsis: pkgsrc/mail/milter-greylist fails when option "drac" is specified
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jan 04 11:25:00 +0000 2013
>Closed-Date: Mon Jul 21 07:21:12 +0000 2014
>Last-Modified: Mon Jul 21 07:21:12 +0000 2014
>Originator: Richard PALO
>Release: pkgsrc trunk
>Organization:
>Environment:
SunOS devzone 5.11 oi_151a7 i86pc i386 i86pc Solaris
>Description:
this is a continuation of the new bug found as discussed for bug
47369:
so, after a bit of trial and error, I tried the following patch to
"compile" milter-greylist with drac support:
diff --git a/mail/milter-greylist/options.mk
b/mail/milter-greylist/options.mk
index 7bc06f7..1ad26f9 100644
--- a/mail/milter-greylist/options.mk
+++ b/mail/milter-greylist/options.mk
@@ -33,6 +33,9 @@ CONFIGURE_ARGS+= --disable-drac
DRACD_DB?= /etc/mail/dracd.db
CONFIGURE_ARGS+= --enable-drac --with-drac-db=${DRACD_DB}
+CFLAGS+=-DUSE_DB185_EMULATION
+USE_DB185=yes
+.include "../../databases/db/buildlink3.mk"
.endif
###
and it seems ok:
> ===> Building for milter-greylist-4.4.1
> gcc -O -DUSE_DB185_EMULATION -I/opt/pkg/include -I/opt/pkg/include/gettext -I/opt/pkg/include/db2 -I/usr/include -Wall -I/opt/pkg/include -DUSE_CURL -I/opt/pkg/include -DUSE_DRAC -DUSE_P0F -DUSE_SPAMD -DHAVE_DATA_CALLBACK -DUSE_DNSRBL -DCONFFILE=\"/etc/opt/pkg/mail/greylist.conf\" -DDUMPFILE=\"/var/opt/pkg/milter-greylist/greylist.db\" -DDRACDB=\"/etc/mail/dracd.db\" -D_BSD_SOURCE -I. -I. -I/opt/pkg/include -I/opt/pkg/include/gettext -I/opt/pkg/include/db2 -I/usr/include -I/opt/pkg/include -I/opt/pkg/include/gettext -I/opt/pkg/include/db2 -I/usr/include -c milter-greylist.c
but during link it bombs out with:
> gcc -o milter-greylist milter-greylist.o pending.o sync.o dnsrbl.o list.o macro.o conf_yacc.o dump_yacc.o conf.o store.o dump.o spf.o acl.o urlcheck.o stat.o clock.o geoip.o fd_pool.o prop.o ldapcheck.o dkimcheck.o p0f.o spamd.o mx.o ratelimit.o -L/opt/pkg/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.2 -Wl,-R/opt/pkg/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.2 -L/opt/pkg/gcc47/lib -Wl,-R/opt/pkg/gcc47/lib -L/opt/pkg/lib -Wl,-R/opt/pkg/lib -L/usr/lib -Wl,-R/usr/lib -L/opt/pkg/lib -Wl,-R/opt/pkg/lib -L/opt/pkg/lib -Wl,-R/opt/pkg/lib -lcurl -lpthread -lspf2 -lsocket -lresolv -lnsl -lmilter
> Undefined first referenced
> symbol in file
> dbopen milter-greylist.o
> ld: fatal: symbol referencing errors. No output written to milter-greylist
> collect2: error: ld returned 1 exit status
so I looked in the wrksrc's makefile and noticed that it looked for LIBS
and that databases/db/builtinlink3.mk had a line commented out:
# $NetBSD: buildlink3.mk,v 1.27 2012/02/05 12:16:56 obache Exp $
BUILDLINK_TREE+= db2
.if !defined(DB_BUILDLINK3_MK)
DB_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.db2+= db>=2.7.3
BUILDLINK_ABI_DEPENDS.db2+= db>=2.7.7nb2
BUILDLINK_PKGSRCDIR.db2?= ../../databases/db
BUILDLINK_INCDIRS.db2?= include/db2
BUILDLINK_LDADD.db2= -ldb2
. include "../../mk/bsd.fast.prefs.mk"
. if defined(USE_DB185) && !empty(USE_DB185:M[yY][eE][sS])
#BUILDLINK_LIBS.db2= ${BUILDLINK_LDADD.db2}
BUILDLINK_TRANSFORM+= l:db:db2
. endif
.endif # DB_BUILDLINK3_MK
BUILDLINK_TREE+= -db2
If I remove this comment then milter-greylist with build and link
successfully.
I'm not sure whether the fix is to db/buildlink3.mk or what?
Le 04/01/13 11:25, David Holland a écrit :> It is not -- the proper thing to do is to set BDB_ACCEPTED=db1 and
> include ../../mk/bdb.buildlink3.mk.
>
> (if it also accepts newer than db1, adjust accordingly)
>
> --
> David A. Holland
> dholland@netbsd.org
>
I tried this, but it definitely does not like db1
I tried setting BDB_ACCEPTED= db1 db2 db3 db4
and use BDB_DEFAULT=dbx on the build command to finally notice
that bdb2, bdb3 and bdb4 still don't link properly.
Perhaps there is still a problem in db when
USE_DB185=yes
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/47403: pkgsrc/mail/milter-greylist fails when option "drac"
is specified
Date: Fri, 04 Jan 2013 20:37:13 +0900
On Fri, 04 Jan 2013 20:25:00 +0900, <richard.palo@baou.fr> wrote:
> Le 04/01/13 11:25, David Holland a =C3=A9crit :> It is not -- the pr=
oper thing to do is to set BDB_ACCEPTED=3Ddb1 and
>> include ../../mk/bdb.buildlink3.mk.
>>
>> (if it also accepts newer than db1, adjust accordingly)
>>
>> --
>> David A. Holland
>> dholland@netbsd.org
>>
>
> I tried this, but it definitely does not like db1
>
> I tried setting BDB_ACCEPTED=3D db1 db2 db3 db4
> and use BDB_DEFAULT=3Ddbx on the build command to finally notice
> that bdb2, bdb3 and bdb4 still don't link properly.
> Perhaps there is still a problem in db when
> USE_DB185=3Dyes
LIBS+=3D ${BDB_LIBS}
-- =
OBATA Akio / obache@NetBSD.org
From: Richard PALO <richard.palo@baou.fr>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/47403: pkgsrc/mail/milter-greylist fails when option "drac"
is specified
Date: Fri, 04 Jan 2013 12:51:30 +0100
So, for testing, I use the following patch to options.mk:
diff -u -p -r1.9 options.mk
--- options.mk 22 Sep 2009 16:52:02 -0000 1.9
+++ options.mk 4 Jan 2013 11:36:18 -0000
@@ -33,6 +33,10 @@ CONFIGURE_ARGS+= --disable-drac
DRACD_DB?= /etc/mail/dracd.db
CONFIGURE_ARGS+= --enable-drac --with-drac-db=${DRACD_DB}
+CFLAGS+=-DUSE_DB185_EMULATION
+USE_DB185=yes
+BDB_ACCEPTED=db1 db2 db3 db4
+.include "../../mk/bdb.buildlink3.mk"
.endif
If I "bmake BDB_DEFAULT=db1", here is the output:
> PKG_OPTIONS.milter-greylist = drac
>
> ==========================================================================
> ==========================================================================
> The following variables will affect the build process of this package,
> milter-greylist-4.4.1. Their current value is shown below:
>
> * BDB185_DEFAULT = db1
> * BDB_DEFAULT = db1
> * MILTER_GROUP = smmsp
> * MILTER_USER = smmsp
> * SSLBASE (defined)
> * SSLCERTS = /etc/opt/pkg/openssl/certs
> * SSLDIR = /etc/opt/pkg/openssl
> * SSLKEYS = /etc/opt/pkg/openssl/private
> * VARBASE = /var/opt/pkg
>
> Based on these variables, the following variables have been set:
>
> * BDBBASE (defined, but empty)
> * BDB_LIBS (defined, but empty)
> * BDB_TYPE = db1
>
> You may want to abort the process now with CTRL-C and change their value
> before continuing. Be sure to run `/opt/pkg/bin/bmake clean' after
> the changes.
> ==========================================================================
> => Build dependency bison>=1.0: found bison-2.7
> => Build dependency findutils>=4.1: found findutils-4.2.33nb3
> => Build dependency flex>=2.5.4a: found flex-2.5.36nb1
> => Build dependency nbpatch-[0-9]*: found nbpatch-20100124
> => Build dependency pax>=20040802: found pax-20080110nb2
> => Build dependency libmilter>=8.14: found libmilter-8.14.6
> => Build dependency gcc47>=4.7.2: found gcc47-4.7.2
> => Full dependency curl>=7.28.1nb1: found curl-7.28.1nb1
> => Full dependency libspf2>=1.2.5: found libspf2-1.2.9nb1
> pkg_info: missing package name(s)
> usage: pkg_info [-BbcDdFfhIikLmNnpqrRSsVvX] [-e package] [-E package]
> [-K pkg_dbdir] [-l prefix] pkg-name ...
> pkg_info [-a | -u] [flags]
> pkg_info [-Q variable] pkg-name ...
> bmake: "../../mk/buildlink3/../../mk/buildlink3/bsd.buildlink3.mk" line 337: warning: Couldn't read shell's output for "true Computing BUILDLINK_PREFIX.db1; /opt/pkg/sbin/pkg_info -K . -qp | /opt/pkg/bin/nbsed -e "s,^[^/]*,,;q""
> ===> Overriding tools for milter-greylist-4.4.1
> ===> Extracting for milter-greylist-4.4.1
> ===> Patching for milter-greylist-4.4.1
> => Applying pkgsrc patches for milter-greylist-4.4.1
> ===> Creating toolchain wrappers for milter-greylist-4.4.1
> /usr/bin/bash: -c: line 0: syntax error near unexpected token `*not_found'
> /usr/bin/bash: -c: line 0: `set -e; case in *not_found) echo 1>&2 "ERROR:" " is not installed; can't buildlink files."; exit 1; ;; esac'
> *** Error code 2
>
> Stop.
> bmake: stopped in /home/richard/src/pkgsrc/mail/milter-greylist
> *** Error code 1
>
> Stop.
> bmake: stopped in /home/richard/src/pkgsrc/mail/milter-greylist
with BDB_DEFAULT=db2
> gcc -o milter-greylist milter-greylist.o pending.o sync.o dnsrbl.o list.o macro.o conf_yacc.o dump_yacc.o conf.o store.o dump.o spf.o acl.o urlcheck.o stat.o clock.o geoip.o fd_pool.o prop.o ldapcheck.o dkimcheck.o p0f.o spamd.o mx.o ratelimit.o -L/opt/pkg/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.2 -Wl,-R/opt/pkg/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.2 -L/opt/pkg/gcc47/lib -Wl,-R/opt/pkg/gcc47/lib -L/opt/pkg/lib -Wl,-R/opt/pkg/lib -L/usr/lib -Wl,-R/usr/lib -L/opt/pkg/lib -Wl,-R/opt/pkg/lib -L/opt/pkg/lib -Wl,-R/opt/pkg/lib -lcurl -lpthread -lspf2 -lsocket -lresolv -lnsl -lmilter
> Undefined first referenced
> symbol in file
> dbopen milter-greylist.o
> ld: fatal: symbol referencing errors. No output written to milter-greylist
with BDB_DEFAULT=db3 or db4
> gcc -o milter-greylist milter-greylist.o pending.o sync.o dnsrbl.o list.o macro.o conf_yacc.o dump_yacc.o conf.o store.o dump.o spf.o acl.o urlcheck.o stat.o clock.o geoip.o fd_pool.o prop.o ldapcheck.o dkimcheck.o p0f.o spamd.o mx.o ratelimit.o -L/opt/pkg/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.2 -Wl,-R/opt/pkg/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.2 -L/opt/pkg/gcc47/lib -Wl,-R/opt/pkg/gcc47/lib -L/opt/pkg/lib -Wl,-R/opt/pkg/lib -L/usr/lib -Wl,-R/usr/lib -L/opt/pkg/lib -Wl,-R/opt/pkg/lib -L/opt/pkg/lib -Wl,-R/opt/pkg/lib -lcurl -lpthread -lspf2 -lsocket -lresolv -lnsl -lmilter
> Undefined first referenced
> symbol in file
> __db185_open milter-greylist.o
> ld: fatal: symbol referencing errors. No output written to milter-greylist
So I come back with the question, why isn't LIBS= being built with BDB_LIBS?
From: Richard PALO <richard.palo@baou.fr>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/47403: pkgsrc/mail/milter-greylist fails when option "drac"
is specified
Date: Fri, 04 Jan 2013 13:15:44 +0100
Le 04/01/13 12:40, OBATA Akio a écrit :
> LIBS+=3D ${BDB_LIBS}
>
I was afraid of that, still seems to be an anomaly to me... oh well
With this updated patch
Index: options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mail/milter-greylist/options.mk,v
retrieving revision 1.9
diff -u -p -r1.9 options.mk
--- options.mk 22 Sep 2009 16:52:02 -0000 1.9
+++ options.mk 4 Jan 2013 12:11:43 -0000
@@ -33,6 +33,11 @@ CONFIGURE_ARGS+= --disable-drac
DRACD_DB?= /etc/mail/dracd.db
CONFIGURE_ARGS+= --enable-drac --with-drac-db=${DRACD_DB}
+CFLAGS+=-DUSE_DB185_EMULATION
+USE_DB185=yes
+BDB_ACCEPTED=db1 db2 db3 db4 db5
+LIBS+=${BDB_LIBS}
+.include "../../mk/bdb.buildlink3.mk"
.endif
###
I have been able to successfully build/install with db2 - db5 (added db5
for grins). db1 seems to be the only on that still does not work.
From: Richard PALO <richard.palo@baou.fr>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/47403: pkgsrc/mail/milter-greylist fails when option "drac"
is specified
Date: Fri, 04 Jan 2013 13:28:08 +0100
Is this to be tacked onto the last commit? If not, perhaps the following
is necessary...
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/mail/milter-greylist/Makefile,v
retrieving revision 1.57
diff -u -p -r1.57 Makefile
--- Makefile 3 Jan 2013 09:50:44 -0000 1.57
+++ Makefile 4 Jan 2013 12:26:23 -0000
@@ -1,6 +1,7 @@
# $NetBSD: Makefile,v 1.57 2013/01/03 09:50:44 tron Exp $
DISTNAME= milter-greylist-4.4.1
+PKGREVISION= 1
CATEGORIES= mail
MASTER_SITES= ftp://ftp.espci.fr/pub/milter-greylist/
EXTRACT_SUFX= .tgz
State-Changed-From-To: open->closed
State-Changed-By: obache@NetBSD.org
State-Changed-When: Mon, 21 Jul 2014 07:21:12 +0000
State-Changed-Why:
handled in 47420.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.