[OTR-dev] gaim-otr for windows followup

Paul Wouters paul at cypherpunks.ca
Sun Dec 12 14:58:21 EST 2004


Bah, so close :)

So I got libgcrypt.dll using a mingw cross compiler setup. I should probably
diff my tree by now, as there are a few changes to make it compile. Google
should know it too, since all you find out there are the same questions,
from two years ago even, asking for a libgcrypt.dll.

The next step was to add it to the windows gaim plugin source dir. Sicne
that's a rather large built, I figured it was better to try and cross
compile gaim-otr too.

So I started to try and cross compile it.


warning: -fPIC ignored for target (all code is position independent)
[ just deleted it from teh Makefiles ]

privkey.c: In function `otrl_privkey_generate':
privkey.c:293: warning: implicit declaration of function `umask'
[ ifdef'ed using __MINGW32__ ]

proto.c:1: warning: -fPIC ignored for target (all code is position independent)
proto.c:27:23: arpa/inet.h: No such file or directory
[ ifdef'ed ]

dh.c:1: warning: -fPIC ignored for target (all code is position independent)
dh.c:22:24: netinet/in.h: No such file or directory
[ ifdef'ed ]

make[2]: Leaving directory `/uml/mingw/gaim-otr-0.9.9rc2/libotr'
/usr/local/bin/i386-mingw32-gcc -g -shared -module -avoid-version otr-plugin.o ui.o dialogs.o ../libotr/libotr.a -o ../gaim-otr.so -lgcrypt
../libotr/libotr.a: could not read symbols: Archive has no index; run ranlib to add one
[ manually ran: /usr/local/bin/i386-mingw32-ranlib libotr/libotr.a ]

make[2]: Leaving directory `/uml/mingw/gaim-otr-0.9.9rc2/libotr'
/usr/local/bin/i386-mingw32-gcc -g -shared -module -avoid-version otr-plugin.o ui.o dialogs.o ../libotr/libotr.a -o ../gaim-otr.so -lgcrypt
/usr/local/lib/gcc/i386-mingw32/3.4.2/../../../../i386-mingw32/bin/ld: cannot find -lgcrypt
collect2: ld returned 1 exit status
make[1]: *** [../gaim-otr.so] Error 1
[ This seems due to not all gcc calls using LDFLAGS, since I have set:
   CC=/usr/local/bin/i386-mingw32-gcc
   CPPFLAGS='-I/usr/local/i386-mingw32/include/ -I/uml/mingw/windows/include/'
   GCC=/usr/local/bin/i386-mingw32-gcc
   LDFLAGS='-L/usr/local/i386-mingw32/lib -L/uml/mingw/windows/lib/'
  I manually added it in the Makefile ]


make[1]: Entering directory `/uml/mingw/gaim-otr-0.9.9rc2/libotr'
make[1]: `libotr.a' is up to date.
make[1]: Leaving directory `/uml/mingw/gaim-otr-0.9.9rc2/libotr'
/usr/local/bin/i386-mingw32-gcc -L/usr/local/i386-mingw32/lib -L/uml/mingw/windows/lib/ -g -shared -module -avoid-version otr-plugin.o ui.o dialogs.o ../libotr/libotr.a -o ../gaim-otr.so -lgcrypt
otr-plugin.o(.text+0x81): In function `otrg_plugin_inject_message':
/uml/mingw/gaim-otr-0.9.9rc2/gaim-otr/otr-plugin.c:85: undefined reference to `_gaim_account_get_connection'
otr-plugin.o(.text+0x99):/uml/mingw/gaim-otr-0.9.9rc2/gaim-otr/otr-plugin.c:87: undefined reference to `_gaim_account_get_protocol_id'
otr-plugin.o(.text+0xa7):/uml/mingw/gaim-otr-0.9.9rc2/gaim-otr/otr-plugin.c:88: undefined reference to `_gaim_account_get_username'
otr-plugin.o(.text+0xb5):/uml/mingw/gaim-otr-0.9.9rc2/gaim-otr/otr-plugin.c:89: undefined reference to `_gaim_find_prpl'
[ etc etc etc ]

This is where I decided to stop for today and go back to book work :)

Does gaim-otr do any networking things itself? I really hope not, since
those would have to be ported to winsock2.h calls.

Also, I didn't set RANLIB, AR, AS or LD. Since autoconf is used to create the
makefiles, perhaps I've just missed a few more cross compile settings. But
regardless, any calls to 'gcc' or 'ranlib' etc, should check for these
environment variables properly. LDFLAGS might need the same 'override' syntax
as CFLAGS got.

Paul
-- 
    Math is case-sensitive
                             --- Ian Goldberg



More information about the OTR-dev mailing list