NetBSD Problem Report #43809
From www@NetBSD.org Sat Aug 28 17:19:40 2010
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 3BF2863B89F
for <gnats-bugs@gnats.NetBSD.org>; Sat, 28 Aug 2010 17:19:40 +0000 (UTC)
Message-Id: <20100828171939.83EDC63B89A@www.NetBSD.org>
Date: Sat, 28 Aug 2010 17:19:39 +0000 (UTC)
From: emmanuel@libera.cc
Reply-To: emmanuel@libera.cc
To: gnats-bugs@NetBSD.org
Subject: mtools build fails because of missing linker flag
X-Send-Pr-Version: www-1.0
>Number: 43809
>Category: pkg
>Synopsis: mtools build fails because of missing linker flag
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: is
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Aug 28 17:20:00 +0000 2010
>Closed-Date: Mon Aug 30 11:44:54 +0000 2010
>Last-Modified: Mon Aug 30 11:44:54 +0000 2010
>Originator: Emmanuel Kasper
>Release:
>Organization:
Myself
>Environment:
uname -srm
Darwin 9.8.0 Power Macintosh
>Description:
Building mtools on my system fails with the following error:
gcc -L/Volumes/Projects/netbsd/lib buffer.o charsetConv.o codepages.o config.o copyfile.o devices.o dirCache.o directory.o direntry.o expand.o fat.o fat_free.o file.o file_name.o filter.o floppyd_io.o force_io.o hash.o init.o llong.o match.o mainloop.o mattrib.o mbadblocks.o mcat.o mcd.o mclasserase.o mcopy.o mdel.o mdir.o mdoctorfat.o mdu.o mformat.o minfo.o misc.o missFuncs.o mk_direntry.o mlabel.o mmd.o mmount.o mmove.o mpartition.o mshowfat.o mzip.o mtools.o patchlevel.o plain_io.o precmd.o privileges.o scsi.o signal.o stream.o streamcache.o subdir.o unixdir.o tty.o vfat.o xdf_io.o -o mtools
Undefined symbols:
"_iconv", referenced from:
_wchar_to_dos in charsetConv.o
_dos_to_wchar in charsetConv.o
_cp_open in charsetConv.o
"_iconv_open", referenced from:
and more ...
it looks like cpp uses the system headers for libiconv, but then the linker uses pkgsrc libiconv at the linking stage
at quick look at the exported symbols show that _iconv_open is defined on the system libiconv but not on pkgsrc
manu@leo:~$ nm /Volumes/Projects/netbsd/lib/libiconv.dylib | grep _iconv_open
manu@leo:~$ nm /usr/lib/libiconv.dylib | grep _iconv_open
0001854c T _iconv_open
>How-To-Repeat:
bmake build
>Fix:
Adding
LDFLAGS.Darwin+= -liconv
to the Makefile fixes the problem.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->is
Responsible-Changed-By: gls@NetBSD.org
Responsible-Changed-When: Sun, 29 Aug 2010 03:25:00 +0000
Responsible-Changed-Why:
Over to maintainer.
State-Changed-From-To: open->feedback
State-Changed-By: obache@NetBSD.org
State-Changed-When: Mon, 30 Aug 2010 02:24:00 +0000
State-Changed-Why:
should be fixed in pkgsrc-HEAD.
From: OBATA Akio <obache@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/43809 CVS commit: pkgsrc/sysutils/mtools
Date: Mon, 30 Aug 2010 02:22:32 +0000
Module Name: pkgsrc
Committed By: obache
Date: Mon Aug 30 02:22:32 UTC 2010
Modified Files:
pkgsrc/sysutils/mtools: Makefile
Log Message:
* set LICENSE=gnu-gpl-v3
* honor PKG_SYSCONFDIR
* exactly buildlink with libiconv and tell library for iconv to configure,
fixes PR#43809.
To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 pkgsrc/sysutils/mtools/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: feedback->closed
State-Changed-By: obache@NetBSD.org
State-Changed-When: Mon, 30 Aug 2010 11:44:54 +0000
State-Changed-Why:
Confirmed fixed.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.