ports/81299: rdesktop compile error
Anton Berezin
tobez at tobez.org
Fri May 20 13:00:23 UTC 2005
The following reply was made to PR ports/81299; it has been noted by GNATS.
From: Anton Berezin <tobez at tobez.org>
To: Thomas Schweikle <tps at vr-web.de>
Cc: freebsd-gnats-submit at 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 at 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
More information about the freebsd-ports-bugs
mailing list