From nobody@FreeBSD.org  Mon Jul 15 01:58:44 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	by hub.freebsd.org (Postfix) with ESMTP id 00E1ACC9
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 15 Jul 2013 01:58:43 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	by mx1.freebsd.org (Postfix) with ESMTP id E72FDE9C
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 15 Jul 2013 01:58:43 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r6F1whCB025529
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 15 Jul 2013 01:58:43 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r6F1whq6025528;
	Mon, 15 Jul 2013 01:58:43 GMT
	(envelope-from nobody)
Message-Id: <201307150158.r6F1whq6025528@oldred.freebsd.org>
Date: Mon, 15 Jul 2013 01:58:43 GMT
From: dt71 <dt71@gmx.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Aspell compilation error with Clang
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         180565
>Category:       ports
>Synopsis:       textproc/aspell compilation error with Clang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    office
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 15 02:00:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Sat Oct 26 10:49:27 CEST 2013
>Originator:     dt71
>Release:        -CURRENT
>Organization:
>Environment:
FreeBSD  10.0-CURRENT FreeBSD 10.0-CURRENT #0 r253214M: Thu Jul 11 19:45:17 CEST 2013     root@:/usr/obj/usr/src/sys/CUSTOM  i386

>Description:
In file included from prog/aspell.cpp:38:
In file included from prog/check_funs.hpp:10:
In file included from prog/checker_string.hpp:14:
In file included from ./common/document_checker.hpp:10:
In file included from ./common/filter.hpp:13:
In file included from ./common/posib_err.hpp:13:
./common/errors.hpp:17:36: error: redefinition of 'aerror_other' with a
      different type: 'const acommon::ErrorInfo *const' vs 'const struct AspellErrorInfo *const'
extern "C" const ErrorInfo * const aerror_other;
                                   ^
./interfaces/cc/aspell.h:240:45: note: previous definition is here
extern const struct AspellErrorInfo * const aerror_other;
                                            ^

This error message is repeated for a multitude of types.
>How-To-Repeat:
Try to build Aspell with a recent version of Clang (eg., r186084).
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->office 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat Jul 20 21:16:45 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

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

From: dt71@gmx.com
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/180565: textproc/aspell compilation error with Clang
Date: Sun, 13 Oct 2013 20:52:53 +0200

 This is a multi-part message in MIME format.
 --------------000209060005000400040704
 Content-Type: text/plain; charset=UTF-8; format=flowed
 Content-Transfer-Encoding: 7bit
 
 When compiling the C++ parts, essentially the following is given to the compiler:
 
 
 // in aspell.h
 
 #ifdef __cplusplus__
 extern "C" {
 #endif
 
 extern const struct AspellErrorInfo * const aerror_other; // (1)
 
 #ifdef __cplusplus__
 }
 #endif
 
 
 // in errors.hpp
 
 namespace acommon {
 
 struct ErrorInfo;
 
 extern "C" const ErrorInfo * const aerror_other;
 
 }
 
 
 On the C side, the aerror_other symbol obviously must have a C type, it is ``const struct AspellErrorInfo *const''. There is a hack to give this symbol a C++ish type on the C++ side: ``const acommon::ErrorInfo *const''; the types are supposedly compatible. Unfortunately, Clang sees the type clash, because both are ``extern "C"''d.
 
 An instant fix would be to not define the C version of aerror_other when compiling C++ code, by placing a __cplusplus guard around the line marked as ``(1)'' above.
 
 --------------000209060005000400040704
 Content-Type: text/x-patch;
  name="aspell.patch"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="aspell.patch"
 
 --- interfaces/cc/aspell.h	2013-10-13 20:29:33.000000000 +0200
 +++ interfaces/cc/aspell.h	2013-10-13 20:30:01.000000000 +0200
 @@ -237,6 +237,7 @@
  /******************************** errors ********************************/
  
  
 +#ifndef __cplusplus
  extern const struct AspellErrorInfo * const aerror_other;
  extern const struct AspellErrorInfo * const aerror_operation_not_supported;
  extern const struct AspellErrorInfo * const   aerror_cant_copy;
 @@ -322,6 +323,7 @@
  extern const struct AspellErrorInfo * const   aerror_bad_magic;
  extern const struct AspellErrorInfo * const aerror_expression;
  extern const struct AspellErrorInfo * const   aerror_invalid_expression;
 +#endif
  
  
  /******************************* speller *******************************/
 
 --------------000209060005000400040704--
State-Changed-From-To: open->closed 
State-Changed-By: tijl 
State-Changed-When: Fri Oct 18 19:41:16 CEST 2013 
State-Changed-Why:  
It seems to build fine with clang now.  Let me know if that's not the 
case for you. 


Responsible-Changed-From-To: office->tijl 
Responsible-Changed-By: tijl 
Responsible-Changed-When: Fri Oct 18 19:41:16 CEST 2013 
Responsible-Changed-Why:  
It seems to build fine with clang now.  Let me know if that's not the 
case for you. 

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

From: dt71@gmx.com
To: tijl@FreeBSD.org, bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/180565: textproc/aspell compilation error with Clang
Date: Tue, 22 Oct 2013 23:18:50 +0200

 tijl@FreeBSD.org wrote, On 10/18/2013 19:42:
 > It seems to build fine with clang now.  Let me know if that's not the
 > case for you.
 
 Not the case. (Note: at the time of this writing, Clang r192389 is used here.)

From: Tijl Coosemans <tijl@FreeBSD.org>
To: dt71@gmx.com
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/180565: textproc/aspell compilation error with Clang
Date: Tue, 22 Oct 2013 23:51:59 +0200

 On Tue, 22 Oct 2013 23:18:50 +0200 dt71@gmx.com wrote:
 > tijl@FreeBSD.org wrote, On 10/18/2013 19:42:
 >> It seems to build fine with clang now.  Let me know if that's not the
 >> case for you.
 > 
 > Not the case. (Note: at the time of this writing, Clang r192389 is used here.)
 
 The last i386 build succeeded:
 http://beefy1.isc.freebsd.org/bulk/10i386-default/2013-10-17_04h52m04s/logs/aspell-0.60.6.1_2.log
State-Changed-From-To: closed->open 
State-Changed-By: tijl 
State-Changed-When: Sat Oct 26 10:48:32 CEST 2013 
State-Changed-Why:  
Reopen, submitter is using clang-devel port. 


Responsible-Changed-From-To: tijl->office 
Responsible-Changed-By: tijl 
Responsible-Changed-When: Sat Oct 26 10:48:32 CEST 2013 
Responsible-Changed-Why:  
Reopen, submitter is using clang-devel port. 

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