Cross compilation failed
He, Li
i.demonstrate at gmail.com
Thu Feb 19 06:33:34 CET 2009
Hi all. I want to make a Win32 port of GnuPG 2.0.10 from my sid with
the help of mingw32.
$ dpkg -l "mingw32*"
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-
aWait/Trig-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err:
uppercase=bad)
||/ Name Version Description
+++-=====================-=====================-
==========================================================
ii mingw32 4.2.1.dfsg-1 Minimalist GNU win32
(cross) compiler
ii mingw32-binutils 2.18.50-20080109-1 Minimalist GNU win32
(cross) binutils
ii mingw32-runtime 3.13-1 Minimalist GNU win32
(cross) runtime
I downloaded the following libraries for building GnuPG:
libgcrypt-1.4.4.tar.bz2
w32pth-2.0.2.tar.bz2
libgpg-error-1.7.tar.bz2
zlib-1.2.3.tar.gz
gettext-0.17.tar.gz
libiconv-1.12.tar.gz
readline-5.0-1-bin.zip
readline-5.0-1-lib.zip
libassuan-1.0.5
libksba-1.0.5.tar.bz2
libassuan-1.0.5.tar.bz2
When cross compiling libassuan, I got the following warnings:
configure: WARNING:
***
*** Data structure for sending ancillary data missing.
*** Descriptor passing won't work.
***
***
*** No implementation of fopencookie or funopen available.
*** The assuan_get_data_fp feature won't work.
***
But it succeeded in creating the library itself.
However when it comes to linking GnuPG, something went wrong:
i586-mingw32msvc-gcc -g -O2 -Wall -Wno-pointer-sign -Wpointer-arith
-L/home/heli/w32root/lib -o gpg2.exe gpg.o server.o build-packet.o
compress.o free-packet.o getkey.o keydb.o keyring.o seskey.o kbnode.o
mainproc.o armor.o mdfilter.o textfilter.o progress.o misc.o rmd160.o
openfile.o keyid.o parse-packet.o cpr.o plaintext.o sig-check.o
keylist.o pkglue.o pkclist.o skclist.o pubkey-enc.o passphrase.o
seckey-cert.o encr-data.o cipher.o encode.o sign.o verify.o revoke.o
decrypt.o keyedit.o dearmor.o import.o export.o trustdb.o tdbdump.o
tdbio.o delkey.o keygen.o helptext.o keyserver.o photoid.o call-
agent.o card-util.o exec.o ../common/libcommon.a ../jnlib/libjnlib.a
../gl/libgnu.a ../common/libgpgrl.a -lz -lreadline -lws2_32 -
lgcrypt -lassuan -lgpg-error /home/heli/w32root/lib/libiconv.dll.a -
L/home/heli/w32root/lib
/home/heli/w32root/lib/libassuan.a(assuan-socket.o): In function
`_assuan_sock_bind':
/home/heli/w32src/libassuan-1.0.5/src/assuan-socket.c:300: undefined
reference to `_bind at 12'
/home/heli/w32src/libassuan-1.0.5/src/assuan-socket.c:260: undefined
reference to `_htonl at 4'
/home/heli/w32src/libassuan-1.0.5/src/assuan-socket.c:280: undefined
reference to `_bind at 12'
/home/heli/w32src/libassuan-1.0.5/src/assuan-socket.c:282: undefined
reference to `_getsockname at 12'
/home/heli/w32src/libassuan-1.0.5/src/assuan-socket.c:292: undefined
reference to `_ntohs at 4'
/home/heli/w32root/lib/libassuan.a(assuan-socket.o): In function
`_assuan_sock_connect':
/home/heli/w32src/libassuan-1.0.5/src/assuan-socket.c:228: undefined
reference to `_connect at 12'
/home/heli/w32src/libassuan-1.0.5/src/assuan-socket.c:203: undefined
reference to `_htons at 4'
/home/heli/w32src/libassuan-1.0.5/src/assuan-socket.c:204: undefined
reference to `_htonl at 4'
/home/heli/w32src/libassuan-1.0.5/src/assuan-socket.c:211: undefined
reference to `_connect at 12'
/home/heli/w32root/lib/libassuan.a(assuan-socket.o): In function
`_assuan_sock_new':
/home/heli/w32src/libassuan-1.0.5/src/assuan-socket.c:176: undefined
reference to `_socket at 12'
/home/heli/w32root/lib/libassuan.a(assuan-uds.o): In function
`uds_writer':
/home/heli/w32src/libassuan-1.0.5/src/assuan-uds.c:187: undefined
reference to `_sendto at 24'
/home/heli/w32root/lib/libassuan.a(assuan-uds.o): In function
`uds_reader':
/home/heli/w32src/libassuan-1.0.5/src/assuan-uds.c:155: undefined
reference to `_recvfrom at 24'
collect2: ld returned 1 exit status
make[2]: *** [gpg2.exe] Error 1
make[2]: Leaving directory `/home/heli/MyDownloads/gnupg-2.0.10/g10'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/heli/MyDownloads/gnupg-2.0.10'
make: *** [all] Error 2
I think there might be something wrong with my compilation of
libassuan. But I am not sure what caused it. Could anybody tell me how
to fix it?
Thank you a lot!
--
He, Li
Shanghai Key Lab of Intelligent Information Processing
School of Computer Science, Fudan University, Shanghai, China
E-mail: I.demonstrate at gmail.com
More information about the Gnupg-devel
mailing list