libsipe.dll fails to cross-compile

Help
Matt Kraai
2013-11-27
2013-12-02
  • Matt Kraai
    Matt Kraai
    2013-11-27

    Hi,

    I'd like to rebuild libsipe.dll so that I can eliminate the "This
    message was not delivered to ... because one or more recipients are
    offline:" messages. When I try to follow the instructions in
    contrib/mingw-cross-compile/README.txt, the build fails as follows:

    /usr/bin/i586-mingw32msvc-cc -shared sip-soap.o sip-transport.o sipe-conf.o sipe-core.o sipe-domino.o sipe-buddy.o sipe-cal.o sipe-certificate.o sipe-cert-crypto-nss.o sipe-chat.o sipe-crypt-nss.o sipe-dialog.o sipe-digest-nss.o sipe-ft.o sipe-ft-tftp.o sipe-group.o sipe-groupchat.o sipe-http.o sipe-http-request.o sipe-http-transport.o sipe-im.o sipe-incoming.o sipe-notify.o sipe-ocs2005.o sipe-ocs2007.o sipe-schedule.o sipe-session.o sipe-status.o sipe-subscriptions.o sipe-svc.o sipe-tls.o sipe-ucs.o sipe-user.o sipe-utils.o sipe-ews.o sipe-ews-autodiscover.o sipmsg.o sipe-sign.o sip-sec.o sip-sec-basic.o sip-sec-digest.o sip-sec-tls-dsk.o sip-csta.o sipe-webticket.o sipe-xml.o uuid.o sipe-win32dep.o sip-sec-sspi.o ../purple/purple-buddy.o ../purple/purple-chat.o ../purple/purple-connection.o ../purple/purple-debug.o ../purple/purple-dnsquery.o ../purple/purple-ft.o ../purple/purple-groupchat.o ../purple/purple-im.o ../purple/purple-markup.o ../purple/purple-mime.o ../purple/purple-network.o ../purple/purple-notify.o ../purple/purple-plugin.o ../purple/purple-schedule.o ../purple/purple-search.o ../purple/purple-setting.o ../purple/purple-status.o ../purple/purple-transport.o ../purple/purple-user.o libsiperc.o -L../../../../win32-dev/gtk_2_0-2.14/lib -L../../../../win32-dev/libxml2-2.9.0/lib -L../../../../win32-dev/nss-3.13.6-nspr-4.9.2/lib -L../../../libpurple -lglib-2.0 -lgobject-2.0 -lintl -lxml2 -lnss3 -lsmime3 -lnspr4 -lws2_32 -lpurple -lsecur32 -Wl,--enable-auto-image-base -Wl,--enable-auto-import -Wl,--dynamicbase -Wl,--nxcompat -lssp -o libsipe.dll
    /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/libssp.a(ssp.o):(.text+0x100): multiple definition of `___stack_chk_fail'
    ../../../libpurple/libpurple.dll.a(d000002.o):(.text+0x0): first defined here
    collect2: ld returned 1 exit status
    make: *** [libsipe.dll] Error 1

    This is on an up-to-date Debian wheezy system.

    --
    Matt

     
  • Stefan Becker
    Stefan Becker
    2013-11-28

    I think you forgot to copy local.mk, because libssp.a should not be from /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/libssp.a but from ../win32-dev/mingw/lib/gcc/mingw32/4.4.0/libssp.a

    Also MinGW GCC >= 4.8 is binary incompatible to the Windows Pidgin release binary.

     
  • Matt Kraai
    Matt Kraai
    2013-12-02

    Hi,

    I've verified that I get the same error when build-2.10.7/pidgin-2.10.7/local.mak matches pidgin-sipe-1.17.1/contrib/mingw-cross-compile/local.mak.

    I also verified that "/usr/bin/i586-mingw32msvc-cc --version" outputs:

    i586-mingw32msvc-cc (GCC) 4.2.1-sjlj (mingw32-2)
    Copyright (C) 2007 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    

    --
    Matt

     
  • Stefan Becker
    Stefan Becker
    2013-12-02

    Maybe 4.2.1 is too old. I would try to replace mingw32 with gcc-mingw32. Please make sure to update local.mak accordingly.

     
  • Matt Kraai
    Matt Kraai
    2013-12-02

    Thanks for the suggestion. I was able to build libsipe.dll using the gcc-mingw32 package.

    When I enable the OCS2005 message hack, I still see "This message was not delivered to ... because one or more recipients are offline:", but instead of appearing one minute after each sent message, it now appears for all sent messages ten minutes after the last message.