Subject: pkg/22262: [rkb] Balsa2 package fails to build on -current with built-in iconv
To: None <gnats-bugs@gnats.netbsd.org>
From: None <rafal@netbsd.org>
List: netbsd-bugs
Date: 07/25/2003 11:33:28
>Number:         22262
>Category:       pkg
>Synopsis:       Balsa2 package fails to build on -current with built-in iconv
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 25 15:34:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD 1.6U
>Organization:
or lack thereof?
>Environment:
System: NetBSD cyclops 1.6U NetBSD 1.6U (CYCLOPS.mp) #0: Sun Jul 20 23:56:54 EDT 2003 rafal@cyclops:/extra/i386/obj/sys/arch/i386/compile/CYCLOPS.mp i386
Architecture: i386
Machine: i386
>Description:
	The balsa2 package fails in the `libmutt' configure, since it's
	passed -liconv in LIBS and hence is unable to link even a simple
	test program.

	Here's the make log, note the line marked with **** 

===> Checking for vulnerabilities in balsa-2.0.10nb2
=> Checksum OK for balsa-2.0.10.tar.bz2.
===> Extracting for balsa-2.0.10nb2
[...]
===> Patching for balsa-2.0.10nb2
===> Applying pkgsrc patches for balsa-2.0.10nb2
===> Buildlinking for balsa-2.0.10nb2
===> Configuring for balsa-2.0.10nb2
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking for a BSD-compatible install... /usr/bin/install -c -o root -g wheel
checking whether build environment is sane... yes
checking whether make sets $(MAKE)... yes
checking for working aclocal-1.4... found
checking for working autoconf... found
checking for working automake-1.4... found
checking for working autoheader... found
checking for working makeinfo... found
checking whether to enable maintainer-specific portions of Makefiles... no
checking for i386--netbsdelf-gcc... cc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ANSI C... none needed
checking for strerror in -lcposix... no
checking for i386--netbsdelf-gcc... (cached) cc
checking whether we are using the GNU C compiler... (cached) yes
checking whether cc accepts -g... (cached) yes
checking for cc option to accept ANSI C... (cached) none needed
checking how to run the C preprocessor... cc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking build system type... i386-unknown-netbsdelf1.6U
checking host system type... i386--netbsdelf
checking for ld used by GCC... ld
checking if the linker (ld) is GNU ld... yes
checking for ld option to reload object files... -r
checking for BSD-compatible nm... nm
checking for a sed that does not truncate output... /usr/bin/sed
checking whether ln -s works... yes
checking how to recognise dependent libraries... match_pattern /lib[^/\.]+\.so$
checking command to parse nm output... ok
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for i386--netbsdelf-ranlib... no
checking for ranlib... ranlib
checking for i386--netbsdelf-strip... no
checking for strip... strip
checking for objdir... .libs
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.lo... yes
checking if cc supports -fno-rtti -fno-exceptions... yes
checking whether the linker (ld) supports shared libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... NetBSD ld.elf_so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether -lc should be explicitly linked in... yes
creating libtool
checking whether to build with gpgme/RFC3156 support... yes
checking for gpgme-config... yes
checking gpgme library version... 0.3.15
checking for xml2-config... yes
checking whether to use GtkHTML... yes
checking for pkg-config... /usr/pkg/bin/pkg-config
checking for
glib-2.0
libgnome-2.0
libgnomeui-2.0
gtk+-2.0 >= 2.0
gnome-vfs-2.0
gnome-vfs-module-2.0
 libgtkhtml-2.0
... yes
checking BALSA_CFLAGS... -DORBIT2=1 -D_REENTRANT -I/usr/pkg/include/glib/glib-2.0 -I/usr/pkg/lib/glib-2.0/include -I/usr/pkg/include/libgnome-2.0 -I/usr/pkg/include/orbit-2.0 -I/usr/pkg/include/libbonobo-2.0 -I/usr/pkg/include/gconf/2 -I/usr/pkg/include/gnome-vfs-2.0 -I/usr/pkg/lib/gnome-vfs-2.0/include -I/usr/pkg/include/linc-1.0 -I/usr/pkg/include/bonobo-activation-2.0 -I/usr/pkg/include/libgnomeui-2.0 -I/usr/pkg/include/libgnomecanvas-2.0 -I/usr/pkg/include/gtk-2.0 -I/usr/pkg/include/libart-2.0 -I/usr/pkg/include/libbonoboui-2.0 -I/usr/pkg/include/pango-1.0 -I/usr/pkg/include -I/usr/pkg/include/freetype2 -I/usr/pkg/lib/gtk-2.0/include -I/usr/pkg/include/atk-1.0 -I/usr/X11R6/include -I/usr/pkg/include/libxml2 -I/usr/pkg/include/gnome-vfs-module-2.0 -I/usr/pkg/include/gtkhtml-2.0  
checking BALSA_LIBS... -Wl,-R/usr/pkg/lib -Wl,--export-dynamic -Wl,-R/usr/X11R6/lib -L/usr/pkg/lib -L/usr/X11R6/lib -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lgnomecanvas-2 -lgnome-2 -lart_lgpl_2 -lpangoft2-1.0 -lbonobo-2 -lgconf-2 -lgnomevfs-2 -lbonobo-activation -lORBit-2 -llinc -lgthread-2.0 -lgtkhtml-2 -lgtk-x11-2.0 -lxml2 -lpthread -lz -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -lm  
checking for
  libgnomeprint-2.2 >= 2.1.4
  libgnomeprintui-2.2 >= 2.1.4
  ... yes
checking LGPRINT_CFLAGS... -I/usr/pkg/include/libgnomeprint-2.2 -I/usr/pkg/include/libart-2.0 -I/usr/pkg/include/glib/glib-2.0 -I/usr/pkg/lib/glib-2.0/include -I/usr/pkg/include/libxml2 -I/usr/pkg/include/pango-1.0 -I/usr/pkg/include/libgnomeprintui-2.2 -I/usr/pkg/include/libgnomecanvas-2.0 -I/usr/pkg/include -I/usr/pkg/include/freetype2 -I/usr/pkg/include/gtk-2.0 -I/usr/pkg/lib/gtk-2.0/include -I/usr/pkg/include/atk-1.0 -I/usr/X11R6/include  
checking LGPRINT_LIBS... -Wl,-R/usr/pkg/lib -Wl,--export-dynamic -L/usr/pkg/lib -lgnomeprintui-2-2 -lgnomeprint-2-2 -lgnomecanvas-2 -lxml2 -lpthread -lz -lart_lgpl_2 -lpangoft2-1.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -lm  
checking for scrollkeeper-config... /usr/pkg/bin/scrollkeeper-config
checking for new_aspell_speller in -laspell... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking for LC_MESSAGES... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking for dgettext in libc... yes
checking for bind_textdomain_codeset... yes
checking for msgfmt... /usr/bin/msgfmt
checking for dcgettext... yes
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for catalogs to be installed...  am az bg ca cs da de en_GB el es et fi fr ga he hi hu it ja ko lt lv ml ms nl no nn pl pt pt_BR ro ru sk sl sv tr uk vi wa zh_CN zh_TW
checking for perl... /usr/pkg/bin/perl
checking for isblank... yes
checking for gawk... /usr/bin/awk
checking whether to use LDAP... no
checking whether to build ESMTP support... yes
checking for smtp_start_session in -lesmtp... yes
checking for smtp_option_require_all_recipients in -lesmtp... yes
checking for smtp_starttls_set_password_cb in -lesmtp... yes
**** checking for iconv_open in -liconv... (cached) yes ****
checking whether to use PCRE... yes
checking whether to build SSL support... yes
checking for CVS information... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating balsa.1
config.status: creating balsa.spec
config.status: creating po/Makefile.in
config.status: creating sounds/Makefile
config.status: creating images/Makefile
config.status: creating doc/Makefile
config.status: creating doc/C/Makefile
config.status: creating libbalsa/Makefile
config.status: creating libinit_balsa/Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: executing default-1 commands
config.status: executing default-2 commands
config.status: executing default-3 commands
./config.status: cannot open ./intltool-extract.in: no such file
mv: rename intltool-extract.out to intltool-extract: No such file or directory
chmod: intltool-extract: No such file or directory
chmod: intltool-extract: No such file or directory
./config.status: cannot open ./intltool-merge.in: no such file
mv: rename intltool-merge.out to intltool-merge: No such file or directory
chmod: intltool-merge: No such file or directory
chmod: intltool-merge: No such file or directory
./config.status: cannot open ./intltool-update.in: no such file
mv: rename intltool-update.out to intltool-update: No such file or directory
chmod: intltool-update: No such file or directory
chmod: intltool-update: No such file or directory
configure: configuring in libmutt
configure: running /bin/sh './configure' --prefix=/usr/pkg  '--enable-gpgme' '--disable-more-warnings' '--enable-threads' '--enable-pcre' '--with-ssl=/usr' '--sysconfdir=/usr/pkg/etc' '--with-libintl-prefix=/usr' '--host=i386--netbsdelf' '--prefix=/usr/pkg' '--x-includes=/usr/X11R6/include' '--x-libraries=/usr/X11R6/lib' 'CC=cc' 'CFLAGS=-O2 -I/usr/pkg/include -I/usr/X11R6/include' 'CPPFLAGS= -I/usr/pkg/include/libglade-2.0 -I/usr/pkg/include -I/usr/X11R6/include' 'LDFLAGS= -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/X11R6/lib -L/usr/X11R6/lib' 'host_alias=i386--netbsdelf' --cache-file=/dev/null --srcdir=.
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking for a BSD-compatible install... /usr/bin/install -c -o root -g wheel
checking whether build environment is sane... yes
checking whether make sets $(MAKE)... yes
checking for working aclocal-1.4... found
checking for working autoconf... found
checking for working automake-1.4... found
checking for working autoheader... found
checking for working makeinfo... found
checking for i386--netbsdelf-gcc... cc
checking for C compiler default output... configure: error: C compiler cannot create executables
See `config.log' for more details.
configure: error: /bin/sh './configure' failed for libmutt
*** Error code 1

Stop.
make: stopped in /extra/pkgsrc/mail/balsa2
*** Error code 1

	And here's the config.log from the libmutt directory, note failure
	to build an executable because it's expecting to need -liconv and
	my system has no libiconv (using the built-in libc iconv code):

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.57.  Invocation command line was

  $ ./configure --prefix=/usr/pkg --enable-gpgme --disable-more-warnings --enable-threads --enable-pcre --with-ssl=/usr --sysconfdir=/usr/pkg/etc --with-libintl-prefix=/usr --host=i386--netbsdelf --prefix=/usr/pkg --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib CC=cc CFLAGS=-O2 -I/usr/pkg/include -I/usr/X11R6/include CPPFLAGS= -I/usr/pkg/include/libglade-2.0 -I/usr/pkg/include -I/usr/X11R6/include LDFLAGS= -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/X11R6/lib -L/usr/X11R6/lib host_alias=i386--netbsdelf --cache-file=/dev/null --srcdir=.

## --------- ##
## Platform. ##
## --------- ##

hostname = cyclops
uname -m = i386
uname -r = 1.6U
uname -s = NetBSD
uname -v = NetBSD 1.6U (CYCLOPS.mp) #0: Sun Jul 20 23:56:54 EDT 2003  rafal@cyclops:/extra/i386/obj/sys/arch/i386/compile/CYCLOPS.mp

/usr/bin/uname -p = i386
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
hostinfo               = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /extra/pkgsrc/mail/balsa2/work.i386/.buildlink/bin
PATH: /bin
PATH: /usr/bin
PATH: /usr/local/bin
PATH: /usr/X11R6/bin
PATH: /usr/pkg/bin
PATH: /sbin
PATH: /usr/sbin
PATH: /usr/local/bin
PATH: /usr/X11R6/bin
PATH: /sbin
PATH: /usr/sbin
PATH: /usr/local/bin
PATH: /usr/X11R6/bin
PATH: /usr/pkg/bin
PATH: /usr/X11R6/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1499: checking for a BSD-compatible install
configure:1553: result: /usr/bin/install -c -o root -g wheel
configure:1564: checking whether build environment is sane
configure:1607: result: yes
configure:1622: checking whether make sets $(MAKE)
configure:1642: result: yes
configure:1665: checking for working aclocal-1.4
configure:1672: result: found
configure:1680: checking for working autoconf
configure:1687: result: found
configure:1695: checking for working automake-1.4
configure:1702: result: found
configure:1710: checking for working autoheader
configure:1717: result: found
configure:1725: checking for working makeinfo
configure:1732: result: found
configure:1756: checking for i386--netbsdelf-gcc
configure:1782: result: cc
configure:2064: checking for C compiler version
configure:2067: cc --version </dev/null >&5
2.95.3
configure:2070: $? = 0
configure:2072: cc -v </dev/null >&5
Using builtin specs.
gcc version 2.95.3 20010315 (release) (NetBSD nb4)
configure:2075: $? = 0
configure:2077: cc -V </dev/null >&5
cc: argument to `-V' is missing
configure:2080: $? = 1
configure:2104: checking for C compiler default output
configure:2107: cc -O2 -I/usr/pkg/include -I/usr/X11R6/include  -I/usr/pkg/include/libglade-2.0 -I/usr/pkg/include -I/usr/X11R6/include  -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/X11R6/lib -L/usr/X11R6/lib conftest.c -liconv -laspell  -lintl -L/usr/pkg/lib -lgpgme -L/usr/pkg/lib -lxml2 -lz -lpthread -lm -lesmtp -lpthread -lesmtp >&5
ld: cannot find -liconv
configure:2110: $? = 1
configure: failed program was:
| #line 2084 "configure"
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:2148: error: C compiler cannot create executables
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_CC_set=set
ac_cv_env_CC_value=cc
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-O2 -I/usr/pkg/include -I/usr/X11R6/include'
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value=' -I/usr/pkg/include/libglade-2.0 -I/usr/pkg/include -I/usr/X11R6/include'
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value=' -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/X11R6/lib -L/usr/X11R6/lib'
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=i386--netbsdelf
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_lib_iconv_iconv_open=yes
ac_cv_prog_CC=cc
ac_cv_prog_make_make_set=yes
gt_cv_func_gnugettext1_libintl=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL='aclocal-1.4'
AUTOCONF='autoconf'
AUTOHEADER='autoheader'
AUTOMAKE='automake-1.4'
BUILD_IMAP_FALSE=''
BUILD_IMAP_TRUE=''
CC='cc'
CFLAGS='-O2 -I/usr/pkg/include -I/usr/X11R6/include'
CPP=''
CPPFLAGS=' -I/usr/pkg/include/libglade-2.0 -I/usr/pkg/include -I/usr/X11R6/include'
DEFS=''
ECHO='echo'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
INSTALL_DATA='install -c -o root -g wheel -m 444'
INSTALL_PROGRAM='install -c -s -o root -g wheel -m 555'
INSTALL_SCRIPT='install -c -o root -g wheel -m 555'
ISPELL=''
LDFLAGS=' -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/X11R6/lib -L/usr/X11R6/lib'
LIBICONV=''
LIBIMAP=''
LIBIMAPDEPS=''
LIBOBJS=''
LIBS='-liconv -laspell  -lintl -L/usr/pkg/lib -lgpgme -L/usr/pkg/lib -lxml2 -lz -lpthread -lm -lesmtp -lpthread -lesmtp'
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
LN_S=''
LTLIBOBJS=''
MAINT=''
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE=''
MAKEINFO='makeinfo'
MUTT_MAJOR='0'
MUTT_PATCHLEVEL='5'
MUTT_REVISION='94'
MUTT_VERSION='0.94.5'
OBJEXT=''
PACKAGE='libmutt'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
RANLIB=''
SENDMAIL=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
USE_GSS_FALSE=''
USE_GSS_TRUE=''
USE_NSS_FALSE=''
USE_NSS_TRUE=''
USE_SASL_FALSE=''
USE_SASL_TRUE=''
USE_SSL_FALSE=''
USE_SSL_TRUE=''
VERSION='0.94.5'
ac_ct_CC=''
ac_ct_RANLIB=''
ac_ct_STRIP=''
bindir='${exec_prefix}/bin'
build=''
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
datadir='${prefix}/share'
exec_prefix='NONE'
host='i386--netbsdelf'
host_alias='i386--netbsdelf'
host_cpu=''
host_os=''
host_vendor=''
includedir='${prefix}/include'
infodir='${prefix}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
oldincludedir='/usr/include'
prefix='/usr/pkg'
program_transform_name='s,x,x,'
sbindir='${exec_prefix}/sbin'
sharedir=''
sharedstatedir='${prefix}/com'
sysconfdir='/usr/pkg/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE_BUGREPORT ""
#define PACKAGE_NAME ""
#define PACKAGE_STRING ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""

configure: exit 77
>How-To-Repeat:
	Build balsa2 on a system without GNU libiconv installed, but which
	has iconv routines in libc.
>Fix:

	The following patch fixes it for me; I'm a little uneasy about using
	buildlink internals like this, but that's basically what was done
	before, only that it didn't work :-)

	I'd prefer we just got rid of the autoconf override, but I'm not
	sure why it's there, so didn't want to do that either.

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/mail/balsa2/Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile
--- Makefile	2003/07/17 21:45:42	1.5
+++ Makefile	2003/07/25 02:43:03
@@ -55,7 +55,7 @@ CONFIGURE_ARGS+=        --enable-ldap
 .include "../../mail/libesmtp/buildlink2.mk"
 .include "../../mk/pthread.buildlink2.mk"
 
-.if defined(BUILDLINK_LIBICONV_LDADD) && !empty(BUILDLINK_LIBICONV_LDADD)
+.if defined(_BLNK_LIBICONV_FOUND) && ${_BLNK_LIBICONV_FOUND} == "YES"
 CONFIGURE_ENV+=		ac_cv_lib_iconv_iconv_open=yes
 .endif
 

>Release-Note:
>Audit-Trail:
>Unformatted:
 		-current userland built 7/21 or 7/22 from sources of
 		that same vintage.