Bug 121529 - portupgrade to mail/dkim-milter 2.5.0 failed
Summary: portupgrade to mail/dkim-milter 2.5.0 failed
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dirk Meyer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-09 15:10 UTC by Henri Hennebert
Modified: 2008-03-17 16:00 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henri Hennebert 2008-03-09 15:10:02 UTC
If mail/dkim-milter is already installed, during the build you get:

cc -O2 -fno-strict-aliasing -pipe  -I/usr/local/include -I. -I../libdkim/   -I../../include  -I/usr/local/include -D_FFR_DNS_UPGRADE  -DXP_MT -c dkim-filter.c

dkim-filter.c: In function 'dkimf_config_setlib':
dkim-filter.c:2454: error: 'DKIM_LIBFLAGS_FIXCRLF' undeclared (first use in this function)
dkim-filter.c:2454: error: (Each undeclared identifier is reported only once
dkim-filter.c:2454: error: for each function it appears in.)
dkim-filter.c: In function 'mlfi_eom':
dkim-filter.c:5553: error: too few arguments to function 'dkim_policy'
dkim-filter.c:5560: error: 'DKIM_POLICY_DISCARDABLE' undeclared (first use in this function)
dkim-filter.c:5562: error: 'DKIM_PRESULT_AUTHOR' undeclared (first use in this function)
dkim-filter.c:5563: error: 'DKIM_PRESULT_PARENT' undeclared (first use in this function)
*** Error code 1

Fix: 

The error is trigerred by the the include of dkim.h from the previous version (/usr/local/includes/dkim.h).

I think it would be better to have -I/usr/local/include as last -I parameter for cc.

As a workaround, remove /usr/local/includes/dkim.h.

Henri
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2008-03-09 15:32:25 UTC
Class Changed
From-To: maintainer-update->change-request

Fix category (submitter is not maintainer) (via the GNATS Auto Assign 
Tool)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2008-03-09 15:32:29 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Hirohisa Yamaguchi 2008-03-10 00:27:53 UTC
Hi, Henri.

I could not reproduce your error with newly installed 7.0-RELEASE.

But, setting ``-I/usr/local/include'' in CFLAGS causes the error the
same as in the pr.

Like following:
 # cd /usr/ports/mai/dkim-milter
 # env CFLAGS=" -O2 -fno-strict-aliasing -pipe -I/usr/local/include "
make clean build -DWITH_DNS_UPGRADE

Have you set extra include paths in /etc/make.conf or somewhere?

;;  Actually, ``-I../libdkim/'' is set at the front-most of the
;;  ``confINCDIRS'' definition in the build configuration.
;;  I think that should be okay in most cases.

Regards,
-- 
end

        Hirohisa Yamaguchi
          umq@ueo.co.jp
Comment 4 Henri Hennebert 2008-03-10 11:34:04 UTC
Hirohisa Yamaguchi wrote:
> Hi, Henri.
> 
> I could not reproduce your error with newly installed 7.0-RELEASE.

So no previous version of dkim-milter installed.

> 
> But, setting ``-I/usr/local/include'' in CFLAGS causes the error the
> same as in the pr.
> 
> Like following:
>  # cd /usr/ports/mai/dkim-milter
>  # env CFLAGS=" -O2 -fno-strict-aliasing -pipe -I/usr/local/include "
> make clean build -DWITH_DNS_UPGRADE
> 
> Have you set extra include paths in /etc/make.conf or somewhere?

Sorry

No extra flags but I forget to say that I build with:

WITH_SENDMAIL_PORT=yes WITH_DNS_UPGRADE=yes

The WITH_SENDMAIL_PORT must be the culprit then!
> 
> ;;  Actually, ``-I../libdkim/'' is set at the front-most of the
> ;;  ``confINCDIRS'' definition in the build configuration.
> ;;  I think that should be okay in most cases.
> 
> Regards,

Thank you for your time.

Henri
Comment 5 Hirohisa Yamaguchi 2008-03-10 18:31:40 UTC
Hi,

;; adding Cc: dinoex@, the maintainer of bsd.milter.mk

At Mon, 10 Mar 2008 12:34:04 +0100,
Henri Hennebert wrote:
> > I could not reproduce your error with newly installed 7.0-RELEASE.
> 
> So no previous version of dkim-milter installed.

What I did was:
 1. set up a FreeBSD 7.0-RELEASE box
 2. install dkim-milter-2.4.4 package
 3. portsnap fetch update
 4. cd /usr/ports/mail/dkim-milter
 5. make build -DWITH_DNS_UPGRADE


> > Have you set extra include paths in /etc/make.conf or somewhere?
> No extra flags but I forget to say that I build with:
> 
> WITH_SENDMAIL_PORT=yes WITH_DNS_UPGRADE=yes
> 
> The WITH_SENDMAIL_PORT must be the culprit then!

Sorry, I have not checked with sendmail port.

Now I see your problem:
 when WITH_SENDMAIL_PORT is set
 ${PORTSDIR}/mail/sendmail/bsd.milter.mk adds
 ``-I${LOCALBASE}/include'' to the CFLAGS.


I use bsd.milter.mk to manage dependencies, but I do not use
MILTERINIC variable in mail/dkim-milter port. Because dkim-milter has
its own configure parameter to set libmilter paths.

I'm wondering how can I solve this...


-- 

	Hirohisa Yamaguchi
	  umq@ueo.co.jp
Comment 6 Hirohisa Yamaguchi 2008-03-12 06:56:12 UTC
At Tue, 11 Mar 2008 03:31:40 +0900,
I wrote:
> > The WITH_SENDMAIL_PORT must be the culprit then!
> I'm wondering how can I solve this...

Under FreeBSD 7.0-RELEASE/6.3-RELEASE (or later),
sendmail in base system is 8.14.2.
This means libmilter installed with mail/sendmail port is
the same as in base system.

So, unless you delete base sendmail, just omitting
``WITH_SENDMAIL_PORT=yes'' would work okay
for the moment.

Regards,
-- 
end

 Hirohisa Yamaguchi
 umq@ueo.co.jp
Comment 7 dirk.meyer 2008-03-12 07:51:43 UTC
Hallo Hirohisa Yamaguchi,

unter dem Betreff 'Re: ports/121529: portupgrade to mail/dkim-milter 2.5.0 failed' geschrieben:

> I'm wondering how can I solve this...

Would a new Option like:

WITHOUT_MILTER_CFLAGS=yes

Before including bsd.milter.mk help?

I would add such an option in bsd.milter.mk.

kind regards Dirk

- Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany
- [dirk.meyer@dinoex.sub.org],[dirk.meyer@guug.de],[dinoex@FreeBSD.org]
http://people.freebsd.org/~dinoex/errorlogs/
Comment 8 Hirohisa Yamaguchi 2008-03-12 17:12:43 UTC
Hello, Herr Meyer.

Thank you for your suggestion.

At Wed, 12 Mar 2008 08:51:43 +0100,
Dirk Meyer wrote:
> Would a new Option like:

> WITHOUT_MILTER_CFLAGS=yes

> Before including bsd.milter.mk help?

That sounds good.

I've tested with a patch attached, and it looks working both under
environmens where libmilter SHLIBVER is the same (e.g. 7.0-RELEASE)
and different (e.g. 5.5-RELEASE).


> I would add such an option in bsd.milter.mk.

Yes, please.

Btw, I'm preparing a pr that adds patches to fix bugs noted in sf.net
bug tracker.
Would it be fine to include the change in patch below?

Regards,


-- 
end

	Hirohisa Yamaguchi
	  umq@ueo.co.jp

Index: dkim-milter/Makefile
===================================================================
RCS file: /home/ncvs/ports/mail/dkim-milter/Makefile,v
retrieving revision 1.43
diff -u -r1.43 Makefile
--- dkim-milter/Makefile	7 Mar 2008 13:26:39 -0000	1.43
+++ dkim-milter/Makefile	12 Mar 2008 16:55:05 -0000
@@ -136,6 +136,7 @@
 
 .include <bsd.port.pre.mk>
 
+WITHOUT_MILTER_CFLAGS=	yes
 .include "${PORTSDIR}/mail/sendmail/bsd.milter.mk"
 
 SITE+=		${FILESDIR}/site.config.m4
Index: sendmail/bsd.milter.mk
===================================================================
RCS file: /home/ncvs/ports/mail/sendmail/bsd.milter.mk,v
retrieving revision 1.2
diff -u -r1.2 bsd.milter.mk
--- sendmail/bsd.milter.mk	2 Feb 2007 20:17:17 -0000	1.2
+++ sendmail/bsd.milter.mk	12 Mar 2008 16:55:54 -0000
@@ -67,12 +67,13 @@
 MILTERRPATH=	${MILTERBASE}/lib
 MILTERLIB=	-L${MILTERBASE}/lib -rpath=${MILTERRPATH}
 
+.if !defined(WITHOUT_MILTER_CFLAGS)
 .if defined(CFLAGS)
 CFLAGS+=${MILTERINC}
 .else
 CFLAGS=${MILTERINC}
 .endif
-
+.endif
 
 .if defined(SENDMAIL_WITHOUT_MILTER)
 pre-everything::
@@ -90,11 +91,13 @@
 MILTERLIB=	-rpath=${MILTERRPATH}
 .endif
 
+.if !defined(WITHOUT_MILTER_CFLAGS)
 .if defined(LDFLAGS)
 LDFLAGS+=${MILTERLIB}
 .else
 LDFLAGS=${MILTERLIB}
 .endif
+.endif
 
 CONFIGURE_ENV+=	LDFLAGS="${LDFLAGS}"
 MAKE_ENV+=	LDFLAGS="${LDFLAGS}"
Comment 9 Hirohisa Yamaguchi 2008-03-14 13:17:56 UTC
Hi,

At Thu, 13 Mar 2008 02:12:43 +0900,
me wrote:
> > Would a new Option like:
> > WITHOUT_MILTER_CFLAGS=yes
> > Before including bsd.milter.mk help?
> 
> > I would add such an option in bsd.milter.mk.
> 
> Yes, please.
> 
> Btw, I'm preparing a pr that adds patches to fix bugs noted in sf.net
> bug tracker.
> Would it be fine to include the change in patch below?

I've just submitted a PR which includes fix for this.
 http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/121700


Regards,

-- 

	Hirohisa Yamaguchi
	  umq@ueo.co.jp
Comment 10 dfilter service freebsd_committer freebsd_triage 2008-03-17 15:13:36 UTC
dinoex      2008-03-17 15:13:32 UTC

  FreeBSD ports repository

  Modified files:
    mail/sendmail        bsd.milter.mk 
  Log:
  - new options WITHOUT_MILTER_CFLAGS, WITHOUT_MILTER_LDFLAGS
  PR:             121529
  
  Revision  Changes    Path
  1.3       +5 -1      ports/mail/sendmail/bsd.milter.mk
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 11 Dirk Meyer freebsd_committer freebsd_triage 2008-03-17 15:59:18 UTC
State Changed
From-To: feedback->closed

committed, thanks.
Comment 12 Dirk Meyer freebsd_committer freebsd_triage 2008-03-17 15:59:56 UTC
Responsible Changed
From-To: freebsd-ports-bugs->dinoex

I will take care of followups.