Re: libiconv 1.7 on Win32, QNX, etc.?


Subject: Re: libiconv 1.7 on Win32, QNX, etc.?
From: Paul Rohr (paul@abisource.com)
Date: Thu Aug 09 2001 - 15:36:30 CDT


OK, Hub, now I'm really stumped. The version of Makefile.abi checked into
CVS is *definitely* busted. See below.

Is *your* view of the libiconv tree in sync with what's in CVS? If you do a
"make realclean" does it really build for you? How?

I just ran through the entire build only to have it refuse to link because
none of the following libiconv symbols were found:

-- snip --
Linking /cygdrive/c/work/abi/src/WIN32_1.1.8_i386_DBG/bin/AbiWord.exe....
libAbiUtil_s.lib(ut_Encoding.obj) : error LNK2001: unresolved external
        symbol _libiconv_close
libAbiUtil_s.lib(ut_iconv.obj) : error LNK2001: unresolved external
        symbol _libiconv_close
libAbiImpExp_s.lib(ie_imp_RTF.obj) : error LNK2001: unresolved external
        symbol _libiconv_close
libAbiXAp_s.lib(xap_EncodingManager.obj) : error LNK2001: unresolved external
        symbol _libiconv_close
libAbiUtil_s.lib(ut_win_iconv.obj) : error LNK2001: unresolved external
        symbol _libiconv_close
libAbiSpell_s.lib(ispell_checker.obj) : error LNK2001: unresolved external
        symbol _libiconv_close
libAbiSpell_s.lib(lookup.obj) : error LNK2001: unresolved external
        symbol _libiconv_close
libAbiUtil_s.lib(ut_wctomb.obj) : error LNK2001: unresolved external
        symbol _libiconv_close
libAbiUtil_s.lib(ut_mbtowc.obj) : error LNK2001: unresolved external
        symbol _libiconv_close
libAbiXAp_s.lib(xap_EncodingManager.obj) : error LNK2001: unresolved external
        symbol _libiconv
libAbiUtil_s.lib(ut_win_iconv.obj) : error LNK2001: unresolved external
        symbol _libiconv
libAbiSpell_s.lib(ispell_checker.obj) : error LNK2001: unresolved external
        symbol _libiconv
libAbiUtil_s.lib(ut_wctomb.obj) : error LNK2001: unresolved external
        symbol _libiconv
libAbiUtil_s.lib(ut_mbtowc.obj) : error LNK2001: unresolved external
        symbol _libiconv
libAbiUtil_s.lib(ut_iconv.obj) : error LNK2001: unresolved external
        symbol _libiconv
libAbiImpExp_s.lib(ie_imp_RTF.obj) : error LNK2001: unresolved external
        symbol _libiconv_open
libAbiXAp_s.lib(xap_EncodingManager.obj) : error LNK2001: unresolved external
        symbol _libiconv_open
libAbiUtil_s.lib(ut_win_iconv.obj) : error LNK2001: unresolved external
        symbol _libiconv_open
libAbiUtil_s.lib(ut_Encoding.obj) : error LNK2001: unresolved external
        symbol _libiconv_open
libAbiSpell_s.lib(ispell_checker.obj) : error LNK2001: unresolved external
        symbol _libiconv_open
libAbiUtil_s.lib(ut_wctomb.obj) : error LNK2001: unresolved external
        symbol _libiconv_open
libAbiUtil_s.lib(ut_mbtowc.obj) : error LNK2001: unresolved external
        symbol _libiconv_open
libAbiUtil_s.lib(ut_iconv.obj) : error LNK2001: unresolved external
        symbol _libiconv_open
libAbi_libwv_s.lib(text.obj) : error LNK2001: unresolved external
        symbol _iconv_close
libAbi_libwv_s.lib(text.obj) : error LNK2001: unresolved external
        symbol _iconv_open
libAbi_libwv_s.lib(text.obj) : error LNK2001: unresolved external
        symbol _iconv
c:\work\abi\src\WIN32_1.1.8_i386_DBG\bin\AbiWord.exe : fatal error LNK1120:
        6 unresolved externals
-- snip --

Note that it's looking for both versions of the iconv name decorations,
which suggests that we need LIBICONV_PLUG defined *everywhere* that iconv.h
is included (libiconv, wv, and abi trees for now), or nowhere. And
shouldn't that setting be done in platform makefiles, instead of in XP?

Anyhow, digging to find out why the symbols aren't there, here's the
relevant config and make output for libiconv.

-- snip --
Found libiconv in peer directory
creating cache ./config.cache
checking whether make sets $(MAKE)... yes
checking for gcc... cl.exe
checking whether the C compiler (cl.exe ) works... yes
checking whether the C compiler (cl.exe ) is a cross-compiler... no
checking whether we are using GNU C... no
checking how to run the C preprocessor... cl.exe -nologo -E
checking for ranlib... ranlib
checking for a BSD compatible install... /usr/bin/install -c
checking how to copy files... cp -p
checking how to make hard links... ln
checking whether ln -s works... yes
checking host system type... i686-pc-cygwin
checking for AIX... no
checking for minix/config.h... no
checking for POSIXized ISC... no
checking for object suffix... obj
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for executable suffix... .exe
checking build system type... i686-pc-cygwin
checking for non-GNU ld... /bin/ld
checking if the linker (/bin/ld) is GNU ld... yes
checking for /bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking how to recognise dependant libraries... file_magic file format
pei*-i38
6(.*architecture: i386)?
checking command to parse /usr/bin/nm -B output... ok
checking for dlfcn.h... no
checking for ranlib... (cached) ranlib
checking for strip... strip
checking for objdir... .libs
checking for cl.exe option to produce PIC... -DDLL_EXPORT
checking if cl.exe PIC flag -DDLL_EXPORT works... yes
checking if cl.exe static flag works... yes
checking if cl.exe supports -c -o file.obj... no
checking if we can lock with hard links... yes
checking whether the linker (/bin/ld) supports shared libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... Win32 ld.exe
checking if libtool supports shared libraries... yes
creating libtool
checking for locale.h... yes
checking for stdlib.h... yes
checking for mbstate_t... yes
checking for iconv... no
checking for mbrtowc... no
checking for wcrtomb... no
checking for setlocale... yes
checking byte ordering... little endian
updating cache ./config.cache
creating ./config.status
creating Makefile
creating lib/Makefile
creating src/Makefile
creating man/Makefile
creating tests/Makefile
creating include/iconv.h
creating lib/config.h
configuring in libcharset
running bash.exe ./configure --cache-file=../config.cache --srcdir=.
loading cache ../config.cache
checking whether make sets ${MAKE}... (cached) yes
checking for gcc... (cached) cl.exe -nologo
checking whether the C compiler (cl.exe -nologo ) works... yes
checking whether the C compiler (cl.exe -nologo ) is a cross-compiler... no
checking whether we are using GNU C... (cached) no
checking whether cl.exe -nologo accepts -g... no
checking how to run the C preprocessor... (cached) cl.exe -nologo -E
checking for a BSD compatible install... /usr/bin/install -c
checking host system type... i686-pc-cygwin
checking for AIX... no
checking for minix/config.h... (cached) no
checking for POSIXized ISC... no
checking for object suffix... (cached) obj
checking for Cygwin environment... (cached) no
checking for mingw32 environment... (cached) no
checking for executable suffix... (cached) .exe
checking build system type... i686-pc-cygwin
checking for non-GNU ld... (cached) /bin/ld
checking if the linker (/bin/ld) is GNU ld... (cached) yes
checking for /bin/ld option to reload object files... (cached) -r
checking for BSD-compatible nm... (cached) /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependant libraries... (cached) file_magic file
format
 pei*-i386(.*architecture: i386)?
checking command to parse /usr/bin/nm -B output... (cached) ok
checking for dlfcn.h... (cached) no
checking for ranlib... (cached) ranlib
checking for strip... (cached) strip
checking for objdir... .libs
checking for cl.exe option to produce PIC... (cached) -DDLL_EXPORT
checking if cl.exe PIC flag -DDLL_EXPORT works... (cached) yes
checking if cl.exe static flag works... (cached) yes
checking if cl.exe supports -c -o file.obj... (cached) no
checking if we can lock with hard links... yes
checking whether the linker (/bin/ld) supports shared libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... Win32 ld.exe
checking if libtool supports shared libraries... yes
creating libtool
checking for langinfo.h... no
checking for nl_langinfo... no
checking for nl_langinfo and CODESET... no
checking whether we are using the GNU C Library 2.1 or newer... no
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... yes
checking for setlocale... (cached) yes
updating cache ../config.cache
creating ./config.status
creating Makefile
creating lib/Makefile
creating config.h
make[5]: Entering directory `/cygdrive/c/work/libiconv'
Building with [LicensedTrademarks:Off Debug:On BiDi:Off Pspell:Off
Scripting:Off
].
iconv.c
src/iconv.c(96) : warning C4013: '_setmode' undefined; assuming extern
returning
 int
src/iconv.c(118) : warning C4018: '<' : signed/unsigned mismatch
src/iconv.c(158) : warning C4018: '<' : signed/unsigned mismatch
src/iconv.c(272) : warning C4035: 'main' : no return value
Building library
/cygdrive/c/work/abi/src/WIN32_1.1.8_i386_DBG/obj/libAbi_libico
nv_s.lib
/cygdrive/c/work/abi/src/WIN32_1.1.8_i386_DBG/obj/libAbi_libiconv_s.lib
-- snip --

Note that it's complaining about a main() function, which no respectable
library should have. Digging a bit further, I realized that Makefile.abi is
currently *only* building the command-line wrapper (src/iconv.c) and
*nothing* in the library (lib/iconv.c).

IIRC from when I messed with this yesterday, I started making headway by
compiling the right file and/or removing the LIBICONV_PLUG definition, only
to realize that none of the necessary header files had been generated
either.
That's when I started asking questions. ;-)

In short, the various makefiles supplied with libiconv 1.7 are doing *much*
more work than Makefile.abi does, so it's no wonder this isn't working.

bottom line
-----------
Getting 0.9.1 out there is very desirable, but I'd hold off on announcing
the 0.9.1 sources, since it's not clear to me how buildable they are.

Paul,
designated grinch



This archive was generated by hypermail 2b25 : Thu Aug 09 2001 - 15:28:48 CDT