Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 354295 - net-ftp/proftpd libiconv detection problem on g/fbsd
Summary: net-ftp/proftpd libiconv detection problem on g/fbsd
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: All FreeBSD
: High enhancement (vote)
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 235940
  Show dependency tree
 
Reported: 2011-02-09 22:09 UTC by Dmitri Bogomolov
Modified: 2011-12-29 23:29 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log for net-ftp/proftpd on g/fbsd-7.2 (build.log,8.87 KB, text/plain)
2011-07-27 08:01 UTC, Dmitri Bogomolov
Details
work/proftpd-1.3.4rc2/config.log (config.log,70.16 KB, text/plain)
2011-07-27 08:07 UTC, Dmitri Bogomolov
Details
equery files dev-libs/libiconv (libiconv.files,1.06 KB, text/plain)
2011-08-11 11:52 UTC, Dmitri Bogomolov
Details
ProFTPD 1.3.4rc2 r2 ebuild with "--with-libraries=/lib:/usr/lib" (proftpd-1.3.4_rc2-r2.ebuild,6.82 KB, text/plain)
2011-09-04 13:29 UTC, Bernd Lommerzheim
Details
files/proftpd-1.3.4a-iconv.patch (proftpd-1.3.4a-iconv.patch,1.51 KB, patch)
2011-12-12 06:35 UTC, Naohiro Aota
Details | Diff
Upstream patch to fix ProFTPD Bug 3682 for ProFTPD 1.3.4a (proftpd-1.3.4a-ubug-3682.patch,4.14 KB, patch)
2011-12-12 08:58 UTC, Bernd Lommerzheim
Details | Diff
ProFTPD 1.3.4a ebuild using proftpd-1.3.4a-ubug-3682.patch (proftpd-1.3.4a.ebuild,6.41 KB, text/plain)
2011-12-12 08:59 UTC, Bernd Lommerzheim
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitri Bogomolov 2011-02-09 22:09:16 UTC
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
Comment 1 Bernard Cafarelli gentoo-dev 2011-04-04 20:59:26 UTC
ProFTPD part of this bug is fixed in ProFTPD 1.3.4rc2, adding dovecot maintainers for the remaining part of the bug
Comment 2 Bernd Lommerzheim 2011-04-04 21:44:19 UTC
Adding "virtual/libiconv" or "nls? ( virtual/libiconv )" to DEPEND should solve this problem in the net-mail/dovecot ebuild.
Comment 3 Eray Aslan gentoo-dev 2011-04-05 09:44:14 UTC
+  05 Apr 2011; Eray Aslan <eras@gentoo.org> dovecot-2.0.11.ebuild:
+  add virtual/libiconv to DEPEND - bug #354295
+
Comment 4 Dmitri Bogomolov 2011-07-27 07:58:06 UTC
DEPEND="nls? ( virtual/libiconv )" already in net-ftp/proftpd ebuild and this not helps. Just tested: on g/fbsd-7.2 the same.
Comment 5 Dmitri Bogomolov 2011-07-27 08:01:45 UTC
Created attachment 281099 [details]
build.log for net-ftp/proftpd on g/fbsd-7.2
Comment 6 Dmitri Bogomolov 2011-07-27 08:07:49 UTC
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
Comment 7 Bernd Lommerzheim 2011-08-11 09:10:43 UTC
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
Comment 8 Dmitri Bogomolov 2011-08-11 10:23:56 UTC
(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.
Comment 9 Bernd Lommerzheim 2011-08-11 11:15:56 UTC
Please post the output of the second command, too:
$ equery files dev-libs/libiconv
Comment 10 Dmitri Bogomolov 2011-08-11 11:52:54 UTC
Created attachment 282911 [details]
equery files dev-libs/libiconv
Comment 11 Bernd Lommerzheim 2011-08-12 16:11:26 UTC
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
Comment 12 Bernd Lommerzheim 2011-09-04 13:29:11 UTC
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.
Comment 13 Dmitri Bogomolov 2011-09-05 18:44:19 UTC
(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
...
Comment 14 Dmitri Bogomolov 2011-09-05 18:51:04 UTC
(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
Comment 15 Naohiro Aota gentoo-dev 2011-09-18 04:46:55 UTC
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.
Comment 16 Naohiro Aota gentoo-dev 2011-09-18 05:54:02 UTC
(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
Comment 17 Naohiro Aota gentoo-dev 2011-12-12 04:54:32 UTC
http://bugs.proftpd.org/show_bug.cgi?id=3682

Upstream fixed it it their CVS. I'll add this patch.
Comment 18 Naohiro Aota gentoo-dev 2011-12-12 06:35:24 UTC
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.
Comment 19 Bernd Lommerzheim 2011-12-12 08:56:59 UTC
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.
Comment 20 Bernd Lommerzheim 2011-12-12 08:58:31 UTC
Created attachment 295527 [details, diff]
Upstream patch to fix ProFTPD Bug 3682 for ProFTPD 1.3.4a
Comment 21 Bernd Lommerzheim 2011-12-12 08:59:42 UTC
Created attachment 295529 [details]
ProFTPD 1.3.4a ebuild using proftpd-1.3.4a-ubug-3682.patch
Comment 22 Naohiro Aota gentoo-dev 2011-12-12 23:17:43 UTC
(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!
Comment 23 Bernard Cafarelli gentoo-dev 2011-12-29 23:29:49 UTC
Patch applied (thanks Bernd and everyone here), looks like this bug is finally fixed :)