pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/47369 (update pkgsrc/mail/milter-greylist to 4.4.1 and use bison instead of yacc to build on solaris)
The following reply was made to PR pkg/47369; it has been noted by GNATS.
From: Richard PALO <richard.palo%baou.fr@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: pkg/47369 (update pkgsrc/mail/milter-greylist to 4.4.1 and use
bison instead of yacc to build on solaris)
Date: Thu, 03 Jan 2013 12:36:06 +0100
trunk updated, I retested milter-greylist and realised that I hadn't
tried the "drac" option.
building thus, I received the following error:
> ===> Building for milter-greylist-4.4.1
> gcc -O -I/opt/pkg/include -I/opt/pkg/include/gettext -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/usr/include -I/opt/pkg/include
> -I/opt/pkg/include/gettext -I/usr/include -c milter-greylist.c
> milter-greylist.c:76:16: fatal error: db.h: No such file or directory
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?
Home |
Main Index |
Thread Index |
Old Index