From owner-freebsd-ports-bugs@FreeBSD.ORG Fri May 20 13:00:23 2005 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4126916A4EB for ; Fri, 20 May 2005 13:00:23 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E9A4B43DC8 for ; Fri, 20 May 2005 13:00:22 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j4KD0MDB035965 for ; Fri, 20 May 2005 13:00:22 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j4KD0Mkw035964; Fri, 20 May 2005 13:00:22 GMT (envelope-from gnats) Date: Fri, 20 May 2005 13:00:22 GMT Message-Id: <200505201300.j4KD0Mkw035964@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: Anton Berezin Subject: Re: ports/81299: rdesktop compile error X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Anton Berezin List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 May 2005 13:00:23 -0000 The following reply was made to PR ports/81299; it has been noted by GNATS. From: Anton Berezin To: Thomas Schweikle Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: ports/81299: rdesktop compile error Date: Fri, 20 May 2005 14:52:42 +0200 On Fri, May 20, 2005 at 10:53:00AM +0000, Thomas Schweikle wrote: > FreeBSD hazel.tps 5.4-STABLE FreeBSD 5.4-STABLE #37: Fri May 20 11:15:49 CEST 2005 screen@hazel.tps:/usr/obj/usr/src/sys/HAZEL i386 > >Description: > rdesktop upgrade to 1.4.1 fails because of missing variables in "iconv_h.c" > > hazel# make install > ===> Building for rdesktop-1.4.1 > p\" -DPACKAGE_VERSION=\"1.4.1\" -DPACKAGE_STRING=\"rdesktop\ 1.4.1\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DL_ENDIAN=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_SELECT_H=1 -DHAVE_SYS_FILIO_H=1 -DHAVE_LOCALE_H=1 -DHAVE_LANGINFO_H=1 -Dssldir=\"/usr/local\" -DEGD_SOCKET=\"/var/run/egd-pool\" -DWITH_RDPSND=1 -DHAVE_DIRENT_H=1 -DHAVE_DECL_DIRFD=1 -DHAVE_ICONV=1 -DICON V_CONST=const -DHAVE_SYS_STATVFS_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_MOUNT_H=1 -DSTAT_STATVFS=1 -DHAVE_STRUCT_STATVFS_F_NAMEMAX=1 -DKEYMAP_PATH=\"/usr/local/share/rdesktop/keymaps/\" -o rdp.o -c rdp.c > rdp.c: In function `rdp_out_unistr': > rdp.c:164: error: syntax error before "iconv_h" > rdp.c:171: error: `iconv_h' undeclared (first use in this function) > rdp.c:171: error: (Each undeclared identifier is reported only once > rdp.c:171: error: for each function it appears in.) > rdp.c:171: error: `iconv_t' undeclared (first use in this function) > rdp.c:174: warning: implicit declaration of function `iconv_open' > rdp.c:183: warning: implicit declaration of function `iconv' > rdp.c:186: warning: implicit declaration of function `iconv_close' > rdp.c: In function `rdp_in_unistr': > rdp.c:239: error: syntax error before "iconv_h" > rdp.c:243: error: `iconv_h' undeclared (first use in this function) > rdp.c:243: error: `iconv_t' undeclared (first use in this function) > gmake: *** [rdp.o] Error 1 > *** Error code 2 The problem here is that ${LOCALBASE}/include is not taken into account by rdesktop's configure script. So it finds the library (HAVE_ICONV is set), but fails to find the include (HAVE_ICONV_H is not set). The following patch appears to correct the problem: --- Makefile.old Fri May 20 14:45:42 2005 +++ Makefile Fri May 20 14:46:58 2005 @@ -20,7 +20,9 @@ USE_GMAKE= yes USE_REINPLACE= yes USE_OPENSSL= yes HAS_CONFIGURE= yes +USE_ICONV= yes CONFIGURE_ARGS= --prefix=${PREFIX} --with-x=${X11BASE} +CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" DOCS= doc/AUTHORS doc/TODO doc/*.txt MAN1= rdesktop.1 A note to David: CONFIGURE_ENV fixes the problem by itself, so USE_ICONV is not, strictly speaking, necessary. However, without USE_ICONV, if libiconv is installed on the system when rdesktop is built and installed, it gets used, but the dependency is never recorded. So one can subsequently pkg_delete libiconv\* without any warnings whatsoever, and rdesktop will misteriously stop working. So I would sya that a dependency on libiconv is a lesser evil. Cheers, \Anton. -- The moronity of the universe is a monotonically increasing function. -- Jarkko Hietaniemi