NetBSD Problem Report #57672

From www@netbsd.org  Sat Oct 21 14:23:03 2023
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id A2E171A9239
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 21 Oct 2023 14:23:03 +0000 (UTC)
Message-Id: <20231021142302.475461A923A@mollari.NetBSD.org>
Date: Sat, 21 Oct 2023 14:23:02 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: pkgsrc guide should mention the iconv const issue
X-Send-Pr-Version: www-1.0

>Number:         57672
>Category:       pkg
>Synopsis:       pkgsrc guide should mention the iconv const issue
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Oct 21 14:25:00 +0000 2023
>Last-Modified:  Sun Nov 17 19:25:01 +0000 2024
>Originator:     Taylor R Campbell
>Release:        current
>Organization:
The Const NetBSD *Foundation
>Environment:
>Description:
The iconv const issue -- where different operating systems and standards, and even pages within a single standard, disagree about whether the source buffer pointer is `const char **' or `char **' -- is prevalent enough that we have several dozen patches to address it, and new developers are likely to encounter it in new packages.

The guide should mention the issue and describe what to do.
>How-To-Repeat:
build wip/newsboat as of today
>Fix:
Yes, please!

>Audit-Trail:
From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/57672: pkgsrc guide should mention the iconv const issue
Date: Sat, 21 Oct 2023 17:18:17 +0200

 On Sat, Oct 21, 2023 at 02:25:00PM +0000, campbell+netbsd@mumble.net wrote:
 > >Number:         57672
 > >Category:       pkg
 > >Synopsis:       pkgsrc guide should mention the iconv const issue

 Starting from NetBSD 10, iconv on NetBSD is the same as everywhere
 else - should we still document this? I think it's too late now :)
  Thomas

From: Taylor R Campbell <riastradh@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org,
	pkgsrc-bugs@netbsd.org, campbell+netbsd@mumble.net
Subject: Re: pkg/57672: pkgsrc guide should mention the iconv const issue
Date: Sat, 21 Oct 2023 15:26:37 +0000

 > Date: Sat, 21 Oct 2023 17:18:17 +0200
 > From: Thomas Klausner <wiz@NetBSD.org>
 >=20
 > On Sat, Oct 21, 2023 at 02:25:00PM +0000, campbell+netbsd@mumble.net wrot=
 e:
 > > >Number:         57672
 > > >Category:       pkg
 > > >Synopsis:       pkgsrc guide should mention the iconv const issue
 >=20
 > Starting from NetBSD 10, iconv on NetBSD is the same as everywhere
 > else - should we still document this? I think it's too late now :)

 A user reported this issue today with wip/newsboat, and netbsd-9 still
 has const and probably won't be EOL for another couple of years, so,
 yes, I think it is still relevant:

 =3D=3D=3D> Building for newsboat-2.13
 c++ -std=3Dc++11 -O2 -ggdb -Iinclude -Istfl -Ifilter -I. -Irss -Werror -Wal=
 l -Wextra -Wunreachable-code -DLOCALEDIR=3D\"/usr/local/share/locale\" -I/h=
 ome/gnc/pkgsrc/pkg/include -I/home/gnc/pkgsrc/pkg/include/libxml2 -I/home/g=
 nc/pkgsrc/pkg/include -I/home/gnc/pkgsrc/pkg/include -I/home/gnc/pkgsrc/pkg=
 /include/json-c -DHAVE_OPENSSL=3D1 -O2 -I/usr/include -I/home/gnc/pkgsrc/pk=
 g/include -I/usr/include/krb5 -o src/utils.o -c src/utils.cpp
 src/utils.cpp: In static member function 'static std::string newsboat::util=
 s::convert_text(const string&, const string&, const string&)':
 src/utils.cpp:363:8: error: invalid conversion from 'const char**' to 'char=
 **' [-fpermissive]
   363 |    cd, &inbufp, &inbytesleft, &outbufp, &outbytesleft);
       |        ^~~~~~~
       |        |
       |        const char**
 In file included from /home/gnc/pkgsrc/tree/work/wip/newsboat213/work/.buil=
 dlink/include/libxml2/libxml/encoding.h:28,
                  from /home/gnc/pkgsrc/tree/work/wip/newsboat213/work/.buil=
 dlink/include/libxml2/libxml/parser.h:810,
                  from include/utils.h:5,
                  from src/utils.cpp:1:
 /usr/include/iconv.h:46:23: note:   initializing argument 2 of 'size_t icon=
 v(iconv_t, char**, size_t*, char**, size_t*)'
    46 | size_t iconv(iconv_t, char ** __restrict,
       |                       ^
 gmake: *** [Makefile:114: src/utils.o] Error 1

From: Ludit Gaj <gludit@proton.me>
To: "gnats-bugs@NetBSD.org" <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/57672
Date: Sun, 17 Nov 2024 19:24:51 +0000

 --b1=_h5aj0bKQ1pZLbkO1r7ieNROybCS9vUn1VTm5aidv1U
 Content-Type: text/plain; charset=utf-8
 Content-Transfer-Encoding: base64

 SSd2ZSBqdXN0IHJ1biBpbnRvIHRoZSBzYW1lIGVycm9yIHRyeWluZyB0byBidWlsZCBuZXdzYm9h
 dDIxMyBmcm9tIHdpcCBvbiBOZXRCU0QgMTAuMC4gSSd2ZSB0cmllZCByZW1vdmluZyBsaWJpY29u
 diBkZXBlbmRlbmN5IGZyb20gYm90aCBuZXdzYm9hdDIxMyBhbmQgc3RmbCB0byB1c2Ugc3lzdGVt
 IGljb252LCBidXQgdGhpcyBkaWRuJ3QgaGVscC4gV2hhdCB3b3VsZCBiZSBhIHBvc3NpYmxlIHdv
 cmthcm91bmQ/

 --b1=_h5aj0bKQ1pZLbkO1r7ieNROybCS9vUn1VTm5aidv1U
 Content-Type: text/html; charset=utf-8
 Content-Transfer-Encoding: base64

 PGRpdiBzdHlsZT0iZm9udC1mYW1pbHk6IEFyaWFsLCBzYW5zLXNlcmlmOyBmb250LXNpemU6IDE0
 cHg7IGNvbG9yOiByZ2IoMCwgMCwgMCk7IGJhY2tncm91bmQtY29sb3I6IHJnYigyNTUsIDI1NSwg
 MjU1KTsiPkkndmUganVzdCBydW4gaW50byB0aGUgc2FtZSBlcnJvciB0cnlpbmcgdG8gYnVpbGQg
 bmV3c2JvYXQyMTMgZnJvbSB3aXAgb24gTmV0QlNEIDEwLjAuIEkndmUgdHJpZWQgcmVtb3Zpbmcg
 bGliaWNvbnYgZGVwZW5kZW5jeSBmcm9tIGJvdGggbmV3c2JvYXQyMTMgYW5kIHN0ZmwgdG8gdXNl
 IHN5c3RlbSBpY29udiwgYnV0IHRoaXMgZGlkbid0IGhlbHAuIFdoYXQgd291bGQgYmUgYSBwb3Nz
 aWJsZSB3b3JrYXJvdW5kPzwvZGl2Pg==


 --b1=_h5aj0bKQ1pZLbkO1r7ieNROybCS9vUn1VTm5aidv1U--

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.