I'm trying to build net-ftp/proftpd and net-mail/dovecot on g/fbsd-8.0 and see the same problem at configure stage. Reproducible: Always emerge net-mail/dovecot ends with following messages: libtool: link: i686-gentoo-freebsd8.0-gcc -O2 -march=i686 -mtune=i686 -pipe -Wl,-O1 -Wl,--as-needed -o imap cmd-append.o cmd-capability.o cmd-cancelupdate.o cmd-check.o cmd-close.o cmd-copy.o cmd-create.o cmd-delete.o cmd-enable.o cmd-examine.o cmd-expunge.o cmd-fetch.o cmd-id.o cmd-idle.o cmd-list.o cmd-logout.o cmd-lsub.o cmd-namespace.o cmd-noop.o cmd-rename.o cmd-search.o cmd-select.o cmd-sort.o cmd-status.o cmd-store.o cmd-subscribe.o cmd-thread.o cmd-uid.o cmd-unselect.o cmd-unsubscribe.o cmd-x-cancel.o client.o commands.o commands-util.o imap-expunge.o imap-fetch.o imap-fetch-body.o imap-search.o imap-search-args.o imap-status.o imap-sync.o mail-storage-callbacks.o main.o ../lib/mountpoint.o /usr/lib/libiconv.so -Wl,--export-dynamic ../../src/lib-storage/register/libstorage-register.a ../../src/lib-storage/list/libstorage_list.a ../../src/lib-storage/index/maildir/libstorage_maildir.a ../../src/lib-storage/index/raw/libstorage_raw.a ../../src/lib-storage/index/shared/libstorage_shared.a ../../src/lib-storage/index/libstorage_index.a ../../src/lib-storage/libstorage.a ../../src/lib-index/libindex.a ../../src/lib-imap/libimap.a ../../src/lib-mail/libmail.a ../../src/lib-auth/libauth.a ../../src/lib-charset/libcharset.a ../../src/lib/liblib.a ../lib-dict/libdict.a -lrt ../../src/lib-charset/libcharset.a(charset-iconv.o): In function `charset_to_utf8_reset': charset-iconv.c:(.text+0x34): undefined reference to `libiconv' ../../src/lib-charset/libcharset.a(charset-iconv.o): In function `charset_to_utf8_try': charset-iconv.c:(.text+0xbb): undefined reference to `libiconv' ../../src/lib-charset/libcharset.a(charset-iconv.o): In function `charset_to_utf8_end': charset-iconv.c:(.text+0x35d): undefined reference to `libiconv_close' ../../src/lib-charset/libcharset.a(charset-iconv.o): In function `charset_to_utf8_begin': charset-iconv.c:(.text+0x3d3): undefined reference to `libiconv_open' collect2: ld returned 1 exit status emerge net-ftp/proftpd ends with next messages configure: error: libiconv support, required for NLS, not present -- aborting !!! Please attach the following file when seeking support: !!! /var/tmp/portage/net-ftp/proftpd-1.3.3d-r1/work/proftpd-1.3.3d/config.log Relevant /var/tmp/portage/net-ftp/proftpd-1.3.3d-r1/work/proftpd-1.3.3d/config.log excerpt is configure:15286: checking for iconv_open in -liconv configure:15321: i686-gentoo-freebsd8.0-gcc -o conftest -O2 -march=i686 -mtune=i686 -pipe -DHAVE_OPENSSL -Wall -I/usr/include/openssl -L$(top_srcdir)/lib -Wl,-O1 -Wl,--as-needed conftest.c -liconv -lcrypto >&5 /var/tmp/portage/net-ftp/proftpd-1.3.3d-r1/temp/cc6yvwuF.o: In function `main': conftest.c:(.text+0x7): undefined reference to `iconv_open' collect2: ld returned 1 exit status
ProFTPD part of this bug is fixed in ProFTPD 1.3.4rc2, adding dovecot maintainers for the remaining part of the bug
Adding "virtual/libiconv" or "nls? ( virtual/libiconv )" to DEPEND should solve this problem in the net-mail/dovecot ebuild.
+ 05 Apr 2011; Eray Aslan <eras@gentoo.org> dovecot-2.0.11.ebuild: + add virtual/libiconv to DEPEND - bug #354295 +
DEPEND="nls? ( virtual/libiconv )" already in net-ftp/proftpd ebuild and this not helps. Just tested: on g/fbsd-7.2 the same.
Created attachment 281099 [details] build.log for net-ftp/proftpd on g/fbsd-7.2
Created attachment 281101 [details] work/proftpd-1.3.4rc2/config.log configure script refers to this log. I think this strings are relevant: configure:15417: checking for iconv_open in -liconv configure:15452: i686-gentoo-freebsd7.2-gcc -o conftest -O2 -march=i686 -pipe -Wall -L$(top_srcdir)/lib conftest.c -liconv >&5 /var/tmp/portage/net-ftp/proftpd-1.3.4_rc2-r1/temp/ccFM0XZa.o: In function `main': conftest.c:(.text+0x7): undefined reference to `iconv_open' collect2: ld returned 1 exit status configure:15458: $? = 1 configure: failed program was: | /* confdefs.h. */ | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PR_BUILD_OPTS " '--prefix=/usr' '--build=i686-gentoo-freebsd7.2' '--host=i686-gentoo-freebsd7.2' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--localstatedir=/var/run/proftpd' '--sysconfdir=/etc/proftpd' '--disable-facl' '--disable-auth-file' '--disable-cap' '--disable-ident' '--disable-ipv6' '--disable-memcache' '--enable-ncurses' '--enable-nls' '--enable-auth-pam' '--enable-pcre' '--disable-trace' '--disable-shadow' '--disable-autoshadow' '--enable-openssl' '--with-modules=mod_clamav:mod_ldap:mod_sql:mod_sql_passwd:mod_sql_postgres:mod_radius:mod_tls:mod_tls_shmcache:mod_wrap2:mod_wrap2_file:mod_wrap2_sql' 'build_alias=i686-gentoo-freebsd7.2' 'host_alias=i686-gentoo-freebsd7.2' 'CFLAGS=-O2 -march=i686 -pipe' 'LDFLAGS=' 'LIBS='" | #define PR_PLATFORM "FREEBSD7 (FREEBSD7_2)" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_GETOPT 1 | #define HAVE_GETOPT_H 1 | #define HAVE_GETOPT_LONG 1 | #define PR_USE_SYSTEM_GETOPT 1 | #define LT_MODULE_EXT ".so" | #define LT_MODULE_PATH_VAR "LD_LIBRARY_PATH" | #define LT_DLSEARCH_PATH "/lib:/usr/lib" | #define HAVE_LIBDL 1 | #define HAVE_DLERROR 1 | #define HAVE_LIBDLLOADER 1 | #define error_t int | #define __error_t_defined 1 | #define HAVE_PRELOADED_SYMBOLS 1 | #define HAVE_LIBINTL 1 | #define PR_USE_NLS 1 | /* end confdefs.h. */ | | /* Override any GCC internal prototype to avoid an error. | Use char because int might match the return type of a GCC | builtin and then its argument prototype would still apply. */ | #ifdef __cplusplus | extern "C" | #endif | char iconv_open (); | int | main () | { | return iconv_open (); | ; | return 0; | } configure:15476: result: no configure:15493: checking for iconv_open in -lc configure:15528: i686-gentoo-freebsd7.2-gcc -o conftest -O2 -march=i686 -pipe -Wall -L$(top_srcdir)/lib conftest.c -lc >&5 /var/tmp/portage/net-ftp/proftpd-1.3.4_rc2-r1/temp/cc86VZ1c.o: In function `main': conftest.c:(.text+0x7): undefined reference to `iconv_open' collect2: ld returned 1 exit status configure:15534: $? = 1 configure: failed program was: | /* confdefs.h. */ | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PR_BUILD_OPTS " '--prefix=/usr' '--build=i686-gentoo-freebsd7.2' '--host=i686-gentoo-freebsd7.2' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--localstatedir=/var/run/proftpd' '--sysconfdir=/etc/proftpd' '--disable-facl' '--disable-auth-file' '--disable-cap' '--disable-ident' '--disable-ipv6' '--disable-memcache' '--enable-ncurses' '--enable-nls' '--enable-auth-pam' '--enable-pcre' '--disable-trace' '--disable-shadow' '--disable-autoshadow' '--enable-openssl' '--with-modules=mod_clamav:mod_ldap:mod_sql:mod_sql_passwd:mod_sql_postgres:mod_radius:mod_tls:mod_tls_shmcache:mod_wrap2:mod_wrap2_file:mod_wrap2_sql' 'build_alias=i686-gentoo-freebsd7.2' 'host_alias=i686-gentoo-freebsd7.2' 'CFLAGS=-O2 -march=i686 -pipe' 'LDFLAGS=' 'LIBS='" | #define PR_PLATFORM "FREEBSD7 (FREEBSD7_2)" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_GETOPT 1 | #define HAVE_GETOPT_H 1 | #define HAVE_GETOPT_LONG 1 | #define PR_USE_SYSTEM_GETOPT 1 | #define LT_MODULE_EXT ".so" | #define LT_MODULE_PATH_VAR "LD_LIBRARY_PATH" | #define LT_DLSEARCH_PATH "/lib:/usr/lib" | #define HAVE_LIBDL 1 | #define HAVE_DLERROR 1 | #define HAVE_LIBDLLOADER 1 | #define error_t int | #define __error_t_defined 1 | #define HAVE_PRELOADED_SYMBOLS 1 | #define HAVE_LIBINTL 1 | #define PR_USE_NLS 1 | /* end confdefs.h. */ | | /* Override any GCC internal prototype to avoid an error. | Use char because int might match the return type of a GCC | builtin and then its argument prototype would still apply. */ | #ifdef __cplusplus | extern "C" | #endif | char iconv_open (); | int | main () | { | return iconv_open (); | ; | return 0; | } configure:15552: result: no configure:15563: error: libiconv support, required for NLS, not present -- aborting
Please provide the following two information after merging ProFTPD with USE="nls" failed: $ emerge --search libiconv The packages virtual/libiconv and dev-libs/libiconv should be installed on your machine. And if the dev-libs/libiconv package is installed please list it's installed files: $ equery files dev-libs/libiconv
(In reply to comment #7) > Please provide the following two information after merging ProFTPD with > USE="nls" failed: > $ emerge --search libiconv Searching... [ Results for search key : libiconv ] [ Applications found : 2 ] * dev-libs/libiconv Latest version available: 1.13.1 Latest version installed: 1.13.1 Size of files: 4,605 kB Homepage: http://www.gnu.org/software/libiconv/ Description: GNU charset conversion library for libc which doesn't implement it License: GPL-3 * virtual/libiconv Latest version available: 0 Latest version installed: 0 Size of files: 0 kB Homepage: Description: Virtual for the GNU conversion library License: > The packages virtual/libiconv and dev-libs/libiconv should be installed on your > machine. It is.
Please post the output of the second command, too: $ equery files dev-libs/libiconv
Created attachment 282911 [details] equery files dev-libs/libiconv
Dmitri, thanks for these information. I am not sure if this issue is Gentoo FreeBSD or ProFTPD related. Therefore I opened a bug report in the ProFTPD Bugzilla: http://bugs.proftpd.org/show_bug.cgi?id=3682
Created attachment 285525 [details] ProFTPD 1.3.4rc2 r2 ebuild with "--with-libraries=/lib:/usr/lib" Dmitri, please test this ebuild with USE="nls" on your FreeBSD machine where this issue occured before. Thanks.
(In reply to comment #12) > Created attachment 285525 [details] > ProFTPD 1.3.4rc2 r2 ebuild with "--with-libraries=/lib:/usr/lib" > > Dmitri, please test this ebuild with USE="nls" on your FreeBSD machine where > this issue occured before. Thanks. The same result: ... checking whether libtool supports -dlopen/-dlpreopen... yes checking for bindtextdomain in -lintl... yes checking for iconv_open in -liconv... no checking for iconv_open in -lc... no configure: error: libiconv support, required for NLS, not present -- aborting ...
(In reply to comment #13) > (In reply to comment #12) > > Created attachment 285525 [details] > > ProFTPD 1.3.4rc2 r2 ebuild with "--with-libraries=/lib:/usr/lib" BTW without this change I also see this string in configure output: checking for the default library search path... /lib /usr/lib
http://lists.samba.org/archive/samba-technical/2003-February/027227.html Seems this is the same problem. libiconv doesn't have iconv_open but libiconv_open. ProFTPd should also try to detect -liconv and libiconv_open case.
(In reply to comment #15) > http://lists.samba.org/archive/samba-technical/2003-February/027227.html > > Seems this is the same problem. libiconv doesn't have iconv_open but > libiconv_open. ProFTPd should also try to detect -liconv and libiconv_open > case. Actually iconv.h convert "iconv_open" to "libiconv_open" in the header file using #define. so - we should check iconv_open #including iconv.h or - we should check libiconv_open instead of iconv_open
http://bugs.proftpd.org/show_bug.cgi?id=3682 Upstream fixed it it their CVS. I'll add this patch.
Created attachment 295517 [details, diff] files/proftpd-1.3.4a-iconv.patch Bernd, Could you help me adding this patch to ebuild? I've tried > epatch "${FILESDIR}"/${P}-iconv.patch > AT_M4DIR="${S}/m4" eautoreconf but it failed to build with configure: error: conditional "INSTALL_LTDL" was never defined. Usually this means the macro was only invoked conditionally. !!! Please attach the following file when seeking support: !!! /var/tmp/portage/net-ftp/proftpd-1.3.4a/work/proftpd-1.3.4a/config.log I've added "--enable-dso" to econf and it get built, but I don't know this is the right fix. Maybe we should fix configure.in to call LTDL_INIT always? Thanks.
Hello Naohiro, thanks for your valuable help. I think we should stick close to upsteam and hence we should use the offical backport of this patch. I will attach this backport and a patching proftpd-1.3.4a.ebuild. Please test it. Thanks.
Created attachment 295527 [details, diff] Upstream patch to fix ProFTPD Bug 3682 for ProFTPD 1.3.4a
Created attachment 295529 [details] ProFTPD 1.3.4a ebuild using proftpd-1.3.4a-ubug-3682.patch
(In reply to comment #19) > Hello Naohiro, thanks for your valuable help. I think we should stick close to > upsteam and hence we should use the offical backport of this patch. I will > attach this backport and a patching proftpd-1.3.4a.ebuild. Please test it. > Thanks. aha, I missed backport patch. It worked fine on FreeBSD with your attached ebuild. Thanks!
Patch applied (thanks Bernd and everyone here), looks like this bug is finally fixed :)