NetBSD Problem Report #56028

From oster@fween.ca  Mon Mar  1 00:51:18 2021
Return-Path: <oster@fween.ca>
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 8652E1A921F
	for <gnats-bugs@gnats.NetBSD.org>; Mon,  1 Mar 2021 00:51:18 +0000 (UTC)
Message-Id: <20210301005115.C0E5D52D753@thog.fween.ca>
Date: Sun, 28 Feb 2021 18:51:15 -0600 (CST)
From: oster@netbsd.org
Reply-To: oster@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: mail/neomutt fails to build if converters/libiconv is installed. 
X-Send-Pr-Version: 3.95

>Number:         56028
>Category:       pkg
>Synopsis:       mail/neomutt fails to build if converters/libiconv is installed.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 01 00:55:01 +0000 2021
>Last-Modified:  Wed Mar 17 14:20:01 +0000 2021
>Originator:     Greg Oster
>Release:        NetBSD 9.1_STABLE
>Organization:
>Environment:
System: NetBSD thog 9.1_STABLE NetBSD 9.1_STABLE (GENERIC) #0: Wed Feb 17 12:02:07 CST 2021 oster@thog:/u1/builds/build337/src/obj/amd64/u1/builds/build337/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:


mail/neomutt fails to build if converters/libiconv is installed:
...
Checking for ncursesw/ncurses.h...ok
Checking for iconv() in /usr/pkg...no
Checking for iconv() in libiconv...no
Checking for iconv() in libc...no
Error: Unable to find iconv()
Try: 'configure --help' for options
*** Error code 1


Looking at config.log we find:
conftest__.c:(.text.startup+0xa): undefined reference to `libiconv_open'
ld: conftest__.c:(.text.startup+0x1e): undefined reference to `libiconv'
ld: conftest__.c:(.text.startup+0x26): undefined reference to `libiconv_close'

Compiling the test program (by hand) without "-I/usr/pkg/include" results in success,
whereas with "-I/usr/pkg/include" before "-I/usr/include" things fail. 


>How-To-Repeat:

cd /usr/pkgsrc/converters/libiconv
make install
cd /usr/pkgsrc/mail/neomutt
make install
*boom*


>Fix:

Unsure.  I don't know how to convince the build mechanism to ignore 
iconv.h from /usr/pkgsrc/include.

Usual workaround is just:

  mv /usr/pkg/include/iconv.h /usr/pkg/include/iconv.h.no
  cd /usr/pkgsrc/mail/neomutt
  make install
  mv /usr/pkg/include/iconv.h.no /usr/pkg/include/iconv.h

but that's more of an ugly hack than anything else.

>Audit-Trail:
From: Ryo ONODERA <ryo@tetera.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/56028: mail/neomutt fails to build if converters/libiconv
 is installed.
Date: Wed, 17 Mar 2021 23:16:58 +0900

 I cannot reproduce this error on my NetBSD/amd64 9.99.81 and
 the latest pkgsrc tree.

 However this error pattern is common when converters/libiconv is installed.
 I have no idea how to fix this error.
 Anyone has a good idea to fix the problem?

 -- 
 Ryo ONODERA // ryo@tetera.org
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.