This occurs in src/auto/configure: When /lib/libiconv.so* is not present, the short program in configure which references iconv_open() compiles and links successfully, but if run it aborts due to the missing shared object: ld.so.1: conftest: fatal: libiconv.so.2: open failed: No such file or directory
Since configure detects incorrectly that libiconv is available to be used, it defines HAVE_ICONV_H as 1 and adds -liconv to LIBS. This causes failures a little later on in the configuration process: checking for iconv_open()... yes; with -liconv checking for nl_langinfo(CODESET)... yes checking for strtod in -lm... yes checking for strtod() and other floating point functions... yes checking --disable-acl argument... no checking for acl_get_file in -lposix1e... no checking for acl_get_file in -lacl... no checking for POSIX ACL support... no checking for Solaris ACL support... yes checking for AIX ACL support... no checking --disable-gpm argument... no checking for gpm... no checking --disable-sysmouse argument... no checking for sysmouse... no checking for FD_CLOEXEC... yes checking for rename... yes checking for sysctl... not usable checking for sysinfo... not usable checking for sysinfo.mem_unit... no checking for sysconf... yes checking size of int... 0 checking size of long... 0 checking size of time_t... 0 checking size of off_t... configure: error: in `/home/jrw/vim73/src': configure: error: cannot compute sizeof (off_t) See `config.log' for more details. (exit status = 77) Note that size of int, long, time_t are detected as 0 due to this same problem. from config.log: configure:11509: checking size of int configure:11514: cc -o conftest -g -I/usr/local/include -L/usr/local/lib conftest.c -lm -ltermlib -lelf -lnsl -lsocket -liconv >&5 "conftest.c", line 192: warning: statement not reached configure:11514: $? = 0 configure:11514: ./conftest ld.so.1: conftest: fatal: libiconv.so.2: open failed: No such file or directory auto/configure: line 1716: 7786 Killed ./conftest$ac_exeext configure:11514: $? = 137 configure: program exited with status 137 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define UNIX 1 | #define STDC_HEADERS 1 | #define HAVE_SYS_WAIT_H 1 | #define FEAT_NORMAL 1 | #define USE_XSMP_INTERACT 1 | #define HAVE_LIBSOCKET 1 | #define HAVE_LIBNSL 1 | #define FEAT_NETBEANS_INTG 1 | #define HAVE_X11 1 | #define HAVE_GTK_MULTIHEAD 1 | #define HAVE_X11_SM_SMLIB_H 1 | #define HAVE_X11_XPM_H 1 | #define HAVE_X11_SUNKEYSYM_H 1 | #define FEAT_XIM 1 | #define HAVE_DATE_TIME 1 | #define HAVE_ATTRIBUTE_UNUSED 1 | #define HAVE_LIBELF 1 | #define HAVE_DIRENT_H 1 | #define HAVE_STDARG_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_SGTTY_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_TERMIO_H 1 | #define HAVE_ICONV_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_MATH_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_STROPTS_H 1 | #define HAVE_ERRNO_H 1 | #define HAVE_SYS_RESOURCE_H 1 | #define HAVE_SYS_SYSTEMINFO_H 1 | #define HAVE_LOCALE_H 1 | #define HAVE_SYS_STREAM_H 1 | #define HAVE_TERMIOS_H 1 | #define HAVE_SYS_STATFS_H 1 | #define HAVE_POLL_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_PWD_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_LIBINTL_H 1 | #define HAVE_LIBGEN_H 1 | #define HAVE_SYS_ACL_H 1 | #define HAVE_SYS_SYSINFO_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_SYS_PTEM_H 1 | #define HAVE_STRINGS_H 1 | #define TIME_WITH_SYS_TIME 1 | #define WORDS_BIGENDIAN 1 | #define HAVE_LIBTERMLIB 1 | #define TERMINFO 1 | #define TGETENT_ZERO_ERR 0 | #define OSPEED_EXTERN 1 | #define UP_BC_PC_EXTERN 1 | #define SYS_SELECT_WITH_SYS_TIME 1 | #define HAVE_SVR4_PTYS 1 | #define PTYRANGE0 "pqr" | #define PTYRANGE1 "0123456789abcdef" | #define RETSIGTYPE void | #define SIGRETURN return | #define HAVE_SIGCONTEXT 1 | #define HAVE_BCMP 1 | #define HAVE_FCHDIR 1 | #define HAVE_FCHOWN 1 | #define HAVE_FSYNC 1 | #define HAVE_GETCWD 1 | #define HAVE_GETPWNAM 1 | #define HAVE_GETPWUID 1 | #define HAVE_GETRLIMIT 1 | #define HAVE_GETTIMEOFDAY 1 | #define HAVE_GETWD 1 | #define HAVE_LSTAT 1 | #define HAVE_MEMCMP 1 | #define HAVE_MEMSET 1 | #define HAVE_OPENDIR 1 | #define HAVE_PUTENV 1 | #define HAVE_QSORT 1 | #define HAVE_READLINK 1 | #define HAVE_SELECT 1 | #define HAVE_SETENV 1 | #define HAVE_SETPGID 1 | #define HAVE_SETSID 1 | #define HAVE_SIGALTSTACK 1 | #define HAVE_SIGSTACK 1 | #define HAVE_SIGSET 1 | #define HAVE_SIGSETJMP 1 | #define HAVE_SIGACTION 1 | #define HAVE_STRCASECMP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRFTIME 1 | #define HAVE_STRNCASECMP 1 | #define HAVE_STRPBRK 1 | #define HAVE_STRTOL 1 | #define HAVE_TGETENT 1 | #define HAVE_TOWLOWER 1 | #define HAVE_TOWUPPER 1 | #define HAVE_ISWUPPER 1 | #define HAVE_USLEEP 1 | #define HAVE_UTIME 1 | #define HAVE_UTIMES 1 | #define HAVE_FSEEKO 1 | #define _FILE_OFFSET_BITS 64 | #define HAVE_ST_BLKSIZE 1 | #define HAVE_ICONV 1 | #define HAVE_NL_LANGINFO_CODESET 1 | #define HAVE_LIBM 1 | #define HAVE_FLOAT_FUNCS 1 | #define HAVE_SOLARIS_ACL 1 | #define HAVE_FD_CLOEXEC 1 | #define HAVE_RENAME 1 | #define HAVE_SYSCONF 1 | /* end confdefs.h. */ | #include <stdio.h> | #ifdef HAVE_SYS_TYPES_H | # include <sys/types.h> | #endif | #ifdef HAVE_SYS_STAT_H | # include <sys/stat.h> | #endif | #ifdef STDC_HEADERS | # include <stdlib.h> | # include <stddef.h> | #else | # ifdef HAVE_STDLIB_H | # include <stdlib.h> | # endif | #endif | #ifdef HAVE_STRING_H | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | # include <memory.h> | # endif | # include <string.h> | #endif | #ifdef HAVE_STRINGS_H | # include <strings.h> | #endif | #ifdef HAVE_INTTYPES_H | # include <inttypes.h> | #endif | #ifdef HAVE_STDINT_H | # include <stdint.h> | #endif | #ifdef HAVE_UNISTD_H | # include <unistd.h> | #endif | static long int longval () { return (long int) (sizeof (int)); } | static unsigned long int ulongval () { return (long int) (sizeof (int)); } | #include <stdio.h> | #include <stdlib.h> | int | main () | { | | FILE *f = fopen ("conftest.val", "w"); | if (! f) | return 1; | if (((long int) (sizeof (int))) < 0) | { | long int i = longval (); | if (i != ((long int) (sizeof (int)))) | return 1; | fprintf (f, "%ld", i); | } | else | { | unsigned long int i = ulongval (); | if (i != ((long int) (sizeof (int)))) | return 1; | fprintf (f, "%lu", i); | } | /* Do not output a trailing newline, as this causes \r\n confusion | on some platforms. */ | return ferror (f) || fclose (f) != 0; | | ; | return 0; | } configure:11529: result: 0 This kind of bug is easily reproducible by copying a no-op program into conftest.c: int main () { return 0; } and compiling with: $ cc -o conftest -g -I/usr/local/include -L/usr/local/lib conftest.c -lm -ltermlib -lelf -lnsl -lsocket -liconv "conftest.c", line 192: warning: statement not reached $ ./conftest ld.so.1: conftest: fatal: libiconv.so.2: open failed: No such file or directory Killed $ echo $? 137 It seems to me that the correct solution is to *not* include -liconv unless libiconv.so is actually present (and working). I'm not sure how to achieve that with autoconf-style programs. The function being used in this case is ac_fn_c_try_link() which has the following comment: # Try to link conftest.$ac_ext, and return whether this succeeded. But, at least on SunOS 5.10, that's not enough -- it should also make sure that the resultant program can be successfully run. My work around is to prevent -liconv from being included in LIBS by forcing a compilation error when compiling the feature-probe programs containing iconv_open(). Thanks! -- John Wiersba -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php