From nobody@FreeBSD.org  Fri Sep 28 14:25:21 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F2F52106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 28 Sep 2012 14:25:20 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id D36918FC16
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 28 Sep 2012 14:25:20 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q8SEPK2p082951
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 28 Sep 2012 14:25:20 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id q8SEPKNi082934;
	Fri, 28 Sep 2012 14:25:20 GMT
	(envelope-from nobody)
Message-Id: <201209281425.q8SEPKNi082934@red.freebsd.org>
Date: Fri, 28 Sep 2012 14:25:20 GMT
From: Miklos Magyari <magyarimiki@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: mail/filtermail fails to build using clang
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         172145
>Category:       ports
>Synopsis:       mail/filtermail fails to build using clang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    sylvio
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 28 14:30:06 UTC 2012
>Closed-Date:    Sun Jan 06 23:57:08 UTC 2013
>Last-Modified:  Sun Jan 06 23:57:08 UTC 2013
>Originator:     Miklos Magyari
>Release:        9.0-RELEASE
>Organization:
>Environment:
FreeBSD mira 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
mail/filtermail fails to build using clang.

[...snip...]

flex -+ -i -Prfc -orfc822.cc rfc822.ll
clang++ -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -I. -I../include -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -I../intl -I.. -I../include -I.  -I/usr/local/include -Wall -O2 -pipe -fno-strict-aliasing -MT rfc822.o -MD -MP -MF .deps/rfc822.Tpo -c -o rfc822.o rfc822.cc
mv -f .deps/rfc822.Tpo .deps/rfc822.Po
clang++ -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -I. -I../include -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -I../intl -I.. -I../include -I.  -I/usr/local/include -Wall -O2 -pipe -fno-strict-aliasing -MT filtermail.o -MD -MP -MF .deps/filtermail.Tpo -c -o filtermail.o filtermail.cc
mv -f .deps/filtermail.Tpo .deps/filtermail.Po
clang++ -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -I. -I../include -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -I../intl -I.. -I../include -I.  -I/usr/local/include -Wall -O2 -pipe -fno-strict-aliasing -MT header.o -MD -MP -MF .deps/header.Tpo -c -o header.o header.cc
mv -f .deps/header.Tpo .deps/header.Po
clang++ -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -I. -I../include -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -I../intl -I.. -I../include -I.  -I/usr/local/include -Wall -O2 -pipe -fno-strict-aliasing -MT weeder.o -MD -MP -MF .deps/weeder.Tpo -c -o weeder.o weeder.cc
mv -f .deps/weeder.Tpo .deps/weeder.Po
clang++ -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -I. -I../include -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -I../intl -I.. -I../include -I.  -I/usr/local/include -Wall -O2 -pipe -fno-strict-aliasing -MT preferences.o -MD -MP -MF .deps/preferences.Tpo -c -o preferences.o preferences.cc
preferences.cc:86:51: error: expression is not assignable
  ((Size_score)(Preferences :: size_score)).score = 0;
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
preferences.cc:87:51: error: expression is not assignable
  ((Size_score)(Preferences :: size_score)).size  = 0;
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
2 errors generated.
gmake[2]: *** [preferences.o] Error 1
gmake[2]: Leaving directory `/usr/ports/mail/filtermail/work/filtermail-0.8.2/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/mail/filtermail/work/filtermail-0.8.2'
gmake: *** [all] Error 2
*** [do-build] Error code 1

Stop in /usr/ports/mail/filtermail.
>How-To-Repeat:
# cd /usr/ports/mail/filtermail
# make
>Fix:
I have managed to compile the port applying the below patch to the source code:

--- src/preferences.cc.old      2012-09-28 16:19:14.000000000 +0200
+++ src/preferences.cc  2012-09-28 16:19:49.000000000 +0200
@@ -83,8 +83,8 @@

 void Preferences :: init (void)
 {
-  ((Size_score)(Preferences :: size_score)).score = 0;
-  ((Size_score)(Preferences :: size_score)).size  = 0;
+  Preferences :: size_score.score = 0;
+  Preferences :: size_score.size  = 0;
 }

 void Preferences :: kill (void)

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->sylvio 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Fri Sep 28 14:30:21 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=172145 

From: =?ISO-8859-1?Q?Mikl=F3s_Magyari?= <magyarimiki@gmail.com>
To: bug-followup@FreeBSD.org, magyarimiki@gmail.com
Cc:  
Subject: Re: ports/172145: mail/filtermail fails to build using clang
Date: Fri, 28 Sep 2012 16:49:29 +0200

 Sorry, I'm new to ports, and just found how the patches are commited
 to the source.
 So, the fix for the build issue is replacing
 files/patch-src::preferences.cc with the below:
 
 br,
 mami
 
 # cat  files/patch-src::preferences.cc
 --- src/preferences.cc.orig 2009-01-18 09:20:23.000000000 +0100
 +++ src/preferences.cc      2012-09-28 16:19:49.000000000 +0200
 @@ -24,6 +24,7 @@
  #include <vector>
  #include <stdexcept>
  #include <cstdio>
 +#include <wordexp.h>
  #include "preferences.hh"
  #include "filter.hh"
  #include "filtermail.hh"
 @@ -34,7 +35,7 @@
 
  extern "C"
  {
 -#include <wordexp.h>
 +#include <glob.h>
  #include <sys/types.h>
  #include <regex.h>
  }
 @@ -82,8 +83,8 @@
 
  void Preferences :: init (void)
  {
 -  ((Size_score)(Preferences :: size_score)).score = 0;
 -  ((Size_score)(Preferences :: size_score)).size  = 0;
 +  Preferences :: size_score.score = 0;
 +  Preferences :: size_score.size  = 0;
  }
 
  void Preferences :: kill (void)
State-Changed-From-To: open->feedback 
State-Changed-By: sylvio 
State-Changed-When: Sun Nov 25 14:45:32 UTC 2012 
State-Changed-Why:  
Please, send file in format .patch or .diff 

http://www.freebsd.org/cgi/query-pr.cgi?pr=172145 

From: =?ISO-8859-1?Q?Sylvio_C=E9sar_Teixeira_Amorim?= <scjamorim@bsd.com.br>
To: bug-followup@FreeBSD.org, magyarimiki@gmail.com
Cc:  
Subject: Re: ports/172145: mail/filtermail fails to build using clang
Date: Sun, 25 Nov 2012 12:44:49 -0200

 Hi,
 
    Please, send the patch in format ".patch or .diff"

From: =?ISO-8859-1?Q?Sylvio_C=E9sar_Teixeira_Amorim?= <scjamorim@bsd.com.br>
To: bug-followup@FreeBSD.org, magyarimiki@gmail.com
Cc:  
Subject: Re: ports/172145: mail/filtermail fails to build using clang
Date: Mon, 26 Nov 2012 10:19:29 -0200

 This build is ok. Please, test it again.
State-Changed-From-To: feedback->closed 
State-Changed-By: sylvio 
State-Changed-When: Sun Jan 6 23:57:07 UTC 2013 
State-Changed-Why:  
no response. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=172145 
>Unformatted:
