NetBSD Problem Report #37920

From martin@duskware.de  Wed Jan 30 09:26:56 2008
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 149C863B101
	for <gnats-bugs@gnats.netbsd.org>; Wed, 30 Jan 2008 09:26:56 +0000 (UTC)
Message-Id: <20080130092429.55A0663B101@narn.NetBSD.org>
Date: Wed, 30 Jan 2008 09:24:29 +0000 (UTC)
From: asau@inbox.ru
Reply-To: asau@inbox.ru
To: netbsd-bugs-owner@NetBSD.org
Subject: [fix] editors/abiword doesn't build on FreeBSD
X-Send-Pr-Version: www-1.0

>Number:         37920
>Category:       pkg
>Synopsis:       [fix] editors/abiword doesn't build on FreeBSD
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-pkg-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 30 09:30:00 +0000 2008
>Closed-Date:    Wed May 13 20:33:37 +0000 2015
>Last-Modified:  Wed May 13 20:33:37 +0000 2015
>Originator:     Aleksej Saushev
>Release:        
>Organization:
>Environment:
FreeBSD 6.2-STABLE-200706 i386
>Description:
editors/abiword doesn't build.
>How-To-Repeat:
cd editors/abiword; bmake

>Fix:
Bring following patches from FreeBSD ports (modified):


First hunk taken from FreeBSD's patch-src_af_util_xp_ut_iconv.cpp

--- src/af/util/xp/ut_iconv.cpp.orig	Thu Jan 24 09:18:16 2008
+++ src/af/util/xp/ut_iconv.cpp	Thu Jan 24 09:20:24 2008
@@ -67,7 +67,7 @@
 #if defined (WIN32) || defined(__QNXNTO__) || defined(__CYGWIN__) ||  \
 (defined (__MACH__) && defined (__APPLE__)) || \
 (defined(TARGET_OS_MAC) && TARGET_OS_MAC) || \
-defined (__AIX__) || defined(__OpenBSD__) || \
+defined (__AIX__) || defined(__OpenBSD__) || defined(__FreeBSD__) || \
 (defined(__linux__) && defined(__powerpc__) && (__GLIBC__ <= 2) && (__GLIBC_MINOR__ <= 1)) || \
 defined(__NetBSD__) || (defined(_LIBICONV_VERSION) && _LIBICONV_VERSION >= 0x0109 && !defined(__DragonFly__))

@@ -340,7 +340,7 @@
 #ifdef UT_ICONV_USING_GLIB
   return g_iconv((GIConv)cd, (char **)inbuf, inbytesleft, outbuf, outbytesleft);
 #else
-  return iconv( (iconv_t)cd, (ICONV_CONST char **)inbuf, inbytesleft, outbuf, outbytesleft );
+  return iconv( (iconv_t)cd, (char **)inbuf, inbytesleft, outbuf, outbytesleft );
 #endif
 }

FreeBSD's patch-src_af_util_xp_ut_string_class.cpp

--- src/af/util/xp/ut_string_class.cpp.orig	Mon Jan 17 14:38:20 2005
+++ src/af/util/xp/ut_string_class.cpp	Mon Jan 17 14:38:43 2005
@@ -352,9 +352,6 @@
 #  else /* va_list is a pointer */
 #  define VA_COPY(ap1, ap2)	  ((ap1) = (ap2))
 #  endif /* va_list is a pointer */
-#  if defined (__GNUC__)
-#  define VA_COPY(ap1,ap2)     __va_copy((ap1),(ap2))
-#  endif
 #endif /* !VA_COPY */

 UT_String& UT_String_vprintf (UT_String & inStr, const char *format,

>Release-Note:

>Audit-Trail:
From: Juan RP <juan@xtrarom.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/37920: [fix] editors/abiword doesn't build on FreeBSD
Date: Wed, 30 Jan 2008 10:37:51 +0100

 On Wed, 30 Jan 2008 09:30:01 +0000 (UTC)
 asau@inbox.ru wrote:

 > - src/af/util/xp/ut_iconv.cpp.orig	Thu Jan 24 09:18:16 2008
 > +++ src/af/util/xp/ut_iconv.cpp	Thu Jan 24 09:20:24 2008
 > @@ -67,7 +67,7 @@
 >  #if defined (WIN32) || defined(__QNXNTO__) || defined(__CYGWIN__) ||  \
 >  (defined (__MACH__) && defined (__APPLE__)) || \
 >  (defined(TARGET_OS_MAC) && TARGET_OS_MAC) || \
 > -defined (__AIX__) || defined(__OpenBSD__) || \
 > +defined (__AIX__) || defined(__OpenBSD__) || defined(__FreeBSD__) || \
 >  (defined(__linux__) && defined(__powerpc__) && (__GLIBC__ <= 2) && (__GLIBC_MINOR__ <= 1)) || \
 >  defined(__NetBSD__) || (defined(_LIBICONV_VERSION) && _LIBICONV_VERSION >= 0x0109 && !defined(__DragonFly__))
 >  
 > @@ -340,7 +340,7 @@
 >  #ifdef UT_ICONV_USING_GLIB
 >    return g_iconv((GIConv)cd, (char **)inbuf, inbytesleft, outbuf, outbytesleft);
 >  #else
 > -  return iconv( (iconv_t)cd, (ICONV_CONST char **)inbuf, inbytesleft, outbuf, outbytesleft );
 > +  return iconv( (iconv_t)cd, (char **)inbuf, inbytesleft, outbuf, outbytesleft );
 >  #endif
 >  }

 Why did you remove ICONV_CONST? NetBSD expects this:

      size_t
      iconv(iconv_t cd, const char ** restrict src, size_t * restrict srcleft,
          char ** restrict dst, size_t * restrict dstleft);

 -- 
 Juan Romero Pardines             The NetBSD Project
 http://plog.xtrarom.org/         NetBSD/pkgsrc news in Spanish
 http://mklivecd.xtrarom.org/     Make your own NetBSD Live CD/DVD!

From: Aleksej Saushev <asau@inbox.ru>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/37920
Date: Wed, 30 Jan 2008 14:10:51 +0300

 I changed this because without it the build stops with message:

 ut_iconv.cpp: In function `size_t UT_iconv(void*, const char**, size_t*, char**, size_t*)':
 ut_iconv.cpp:343: error: invalid conversion from `const char**' to `char**'
 ut_iconv.cpp:343: error:   initializing argument 2 of `size_t libiconv(void*, char**, size_t*, char**, size_t*)'

From: Juan RP <juan@xtrarom.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/37920
Date: Wed, 30 Jan 2008 12:20:46 +0100

 On Wed, 30 Jan 2008 11:15:03 +0000 (UTC)
 Aleksej Saushev <asau@inbox.ru> wrote:

 > The following reply was made to PR pkg/37920; it has been noted by GNATS.
 > 
 > From: Aleksej Saushev <asau@inbox.ru>
 > To: gnats-bugs@netbsd.org
 > Cc: 
 > Subject: Re: pkg/37920
 > Date: Wed, 30 Jan 2008 14:10:51 +0300
 > 
 >  I changed this because without it the build stops with message:
 >  
 >  ut_iconv.cpp: In function `size_t UT_iconv(void*, const char**, size_t*, char**, size_t*)':
 >  ut_iconv.cpp:343: error: invalid conversion from `const char**' to `char**'
 >  ut_iconv.cpp:343: error:   initializing argument 2 of `size_t libiconv(void*, char**, size_t*, char**, size_t*)'
 >  

 So fix it properly, because with this patch it won't build on netbsd.

 -- 
 Juan Romero Pardines             The NetBSD Project
 http://plog.xtrarom.org/         NetBSD/pkgsrc news in Spanish
 http://mklivecd.xtrarom.org/     Make your own NetBSD Live CD/DVD!

From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/37920
Date: Wed, 30 Jan 2008 15:08:19 +0100

 On Wed, Jan 30, 2008 at 11:25:02AM +0000, Juan RP wrote:
 >  So fix it properly, because with this patch it won't build on netbsd.

 The correct fix is to actually have a configure check for this.
 The problem is that various native implementations use const, some
 don't. libiconv is not consistent either.

 Joerg

From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/37920: [fix] editors/abiword doesn't build on FreeBSD
Date: Wed, 30 Jan 2008 23:18:25 +0900

 First part of the patch to ut_iconv.cpp changes ICONV_CONST from "" to "const" for FreeBSD.
 Then I don't understand why this patch is required.

 -- 
 "Of course I love NetBSD":-)
 OBATA Akio / obache@NetBSD.org

Responsible-Changed-From-To: pkg-manager->freebsd-pkg-people
Responsible-Changed-By: wiz@narn.netbsd.org
Responsible-Changed-When: Fri, 01 Feb 2008 15:24:08 +0000
Responsible-Changed-Why:
FreeBSD pkgsrc problem.


State-Changed-From-To: open->closed
State-Changed-By: asau@NetBSD.org
State-Changed-When: Wed, 13 May 2015 20:33:37 +0000
State-Changed-Why:
Reported as fixed.
Thanks for checking!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.