[OTR-users] libtool: undefined symbols not allowed in i686-pc-mingw32 shared

Marcin Cieslak saper at saper.info
Fri Mar 12 07:01:53 EST 2010


Hello,

I am pretty new to OTR and somehow oblivious to the mingw building processes
but I try to tackle both with my UNIX experience.

I am trying to build libotr to supplement my win32 psi-0.14 installation
with the OTR functionality. 

I am using msys/mingw to build libotr, having successfully installed
libgpg-error and libgcrypt and friends. Msys and mingw are the newest
ones from the mingw sf site, supplemented by gcc 4.4.0 as required
by Qt development stack.

However, regardless of the --enable-shared, the build process
creates only static libotr.a library, and no DLL.
In fact, the error message on the way is:

/bin/sh ../libtool --tag=CC --mode=link gcc  -g -O2   -o libotr.la -rpath /mingw/lib -version-info 4:0:2  -L/usr/local/lib -lgcrypt -lgpg-error privkey.lo context.lo proto.lo b64.lo dh.lo mem.lo message.lo userstate.lo tlv.lo auth.lo sm.lo
libtool: link: warning: undefined symbols not allowed in i686-pc-mingw32 shared libraries
rm -fr  .libs/libotr.a .libs/libotr.la .libs/libotr.lai
ar cru .libs/libotr.a
ranlib .libs/libotr.a
creating libotr.la
(cd .libs && rm -f libotr.la && ln -s ../libotr.la libotr.la)

I have repeated the libtools command adding "-no-undefined" after the "gcc", and it
worked, so that libotr-2.dll has been produced. Here is what nm says:

C:\MinGW\bin>nm libotr-2.dll | awk " $2 == \"t\" && $3 != \".text\" { print } "
6c411f18 t .ctors.65535
6c401060 t ___dll_exit
6c410820 t ___mbrtowc_cp
6c40d130 t ___pformat_cvt
6c40dd40 t ___pformat_efloat
6c40dc80 t ___pformat_emit_efloat
6c40da40 t ___pformat_emit_float
6c40d450 t ___pformat_emit_inf_or_nan
6c40d950 t ___pformat_emit_radix_point
6c40e070 t ___pformat_emit_xfloat
6c40de00 t ___pformat_float
6c40dee0 t ___pformat_gfloat
6c40d4e0 t ___pformat_int
6c40d230 t ___pformat_putc
6c40d3a0 t ___pformat_putchars
6c40d290 t ___pformat_wputchars
6c40d6f0 t ___pformat_xint
6c40ccc0 t ___report_error
6c410660 t ___wcrtomb_cp
6c40cd10 t ___write_memory
6c401ba8 t _account_write
6c409068 t _calculate_pubkey_auth
6c40b258 t _check_expon
6c40b210 t _check_group_elem
6c40881c t _check_pubkey_auth
6c408704 t _create_key_message
6c4084c8 t _create_v1_key_exchange_message
6c410fe0 t _dtoa_lock
6c4110a0 t _dtoa_lock_cleanup
6c4110f0 t _dtoa_unlock
6c407474 t _go_encrypted
6c4078f0 t _init_respond_smp
6c405f8c t _maybe_resend
6c405a58 t _otrl_mem_free
6c405a0c t _otrl_mem_is_secure
6c405a94 t _otrl_mem_malloc
6c405ac8 t _otrl_mem_realloc
6c40b6c8 t _otrl_sm_check_equal_coords
6c40b464 t _otrl_sm_check_equal_logs
6c40b854 t _otrl_sm_check_know_log
6c40b2a0 t _otrl_sm_hash
6c40be70 t _otrl_sm_proof_equal_coords
6c40bae0 t _otrl_sm_proof_equal_logs
6c40bfec t _otrl_sm_proof_know_log
6c40ba84 t _randomExponent
6c411ef8 t _register_frame_ctor
6c4035dc t _reveal_macs
6c406138 t _send_or_error_auth
6c40b948 t _serialize_mpi_array
6c4060ec t _set_smp_trust
6c401b1c t _sexp_write
6c40b048 t _unserialize_mpi_array

psi-otr-0.5 compiles even fine with it, no idea whether
it actually works. (I am about to try building psi now).

I have tried adding AC_LIBTOOL_WIN32_DLL to the configure.ac,
but due to autotools hell I am unable to get any
meaningful results from autoconf and friends, so I can't tell
if this solves the issue for now.

Am I doing something wrong or is there a better way to get otr
as DLL for win32?

-- 
              << Marcin Cieslak // saper at saper.info >>




More information about the OTR-users mailing list