libgpg-error : code-from-errno.h not correctly generated when cross-compiling to Windows on Linux

Vincent Torri vincent.torri at gmail.com
Fri Sep 30 10:02:44 CEST 2011


Hey,

I'm trying to compile libgpg-error for Windows 64 bits with mingw-w64. I
cross compile it on linux (ubuntu).

configuration: ./configure --prefix=/opt/efl --host=x86_64-w64-mingw32
--disable-nls --disable-static

generation of the files:

make[3]: Entering directory
`/home/torri/gitroot/packages/packages/MinGW/libgpg-error-1.10-src/release/mingw-w64-x86_64-libgpg-error-1.10/src'
gawk -f ./mkerrnos.awk ./errnos.in >code-to-errno.h
gawk -f ./mkerrcodes1.awk ./errnos.in >_mkerrcodes.h
gawk -f ./mkstrtable.awk -v textidx=2 -v nogettext=1 \
        ./err-sources.h.in >err-sources-sym.h
gawk -f ./mkstrtable.awk -v textidx=2 -v nogettext=1 \
        ./err-codes.h.in >err-codes-sym.h
x86_64-w64-mingw32-gcc -E  _mkerrcodes.h | grep GPG_ERR_ | \
               gawk -f ./mkerrcodes.awk >mkerrcodes.h
gawk -f ./mkstrtable.awk -v textidx=2 -v nogettext=1 \
        -v prefix=GPG_ERR_ -v namespace=errnos_ \
        ./errnos.in >errnos-sym.h
rm extra-h.in
rm: cannot remove `extra-h.in': No such file or directory
make[3]: [extra-h.in] Error 1 (ignored)
cat ./w32-add.h >>extra-h.in
cat ./gpg-error.def.in >_gpg-error.def.h
echo EOF >>extra-h.in
x86_64-w64-mingw32-gcc -E -I. -I..   _gpg-error.def.h | \
      grep -v '^#' >gpg-error.def
echo "/*dummy*/" > mkw32errmap.map.c
rm _gpg-error.def.h
gawk -f ./mkheader.awk \
        ./err-sources.h.in \
        ./err-codes.h.in \
        ./errnos.in \
        extra-h.in \
        ./gpg-error.h.in > gpg-error.h
rm _mkerrcodes.h
cc -I. -I. -o mkerrcodes ./mkerrcodes.c
./mkerrcodes | gawk -f ./mkerrcodes2.awk >code-from-errno.h
make  all-am


Here is the beginning of code-from-errno.h :


-2147168224    GPG_ERR_EPROTO
static const int err_code_from_index[] = {
  GPG_ERR_EPERM,
etc....

So if someone has an idea of the fix....

thank you

Vincent Torri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20110930/f9036c8e/attachment.htm>


More information about the Gcrypt-devel mailing list