I am trying to compile using gitian using Ubuntu (so cross-compile for windows).
I have it mostly working. However, I can get miniupnpc to work.
There is an executable "wingenminiupnpcstrings" that is generated during the building process.
The issue can be replicated with
wget -O miniupnpc-1.6.tar.gz 'http://miniupnp.tuxfamily.org/files/download.php?file=miniupnpc-1.6.tar.gz'
tar xzf miniupnpc-1.6.tar.gz
cd miniupnpc-1.6/
make -f Makefile.mingw DLLWRAP=i586-mingw32msvc-dllwrap CC=i586-mingw32msvc-gcc AR=i586-mingw32msvc-ar
The error it gives is
i586-mingw32msvc-gcc -Wall -Os -DNDEBUG -D_WIN32_WINNT=0X501 -DSTATICLIB -c -o upnpc.o upnpc.c
i586-mingw32msvc-gcc -Wall -Os -DNDEBUG -D_WIN32_WINNT=0X501 -c -o dll/upnpc.o upnpc.c
i586-mingw32msvc-gcc -Wall -Os -DNDEBUG -D_WIN32_WINNT=0X501 -DSTATICLIB -c -o wingenminiupnpcstrings.o wingenminiupnpcstrings.c
i586-mingw32msvc-gcc -Wall -Os -DNDEBUG -D_WIN32_WINNT=0X501 -DMINIUPNP_EXPORTS -c -o dll/wingenminiupnpcstrings.o wingenminiupnpcstrings.c
i586-mingw32msvc-gcc wingenminiupnpcstrings.o -lws2_32 -liphlpapi -o wingenminiupnpcstrings
wingenminiupnpcstrings miniupnpcstrings.h.in miniupnpcstrings.h
make: wingenminiupnpcstrings: Command not found
make: *** [miniupnpcstrings.h] Error 127
What is happening is that it is generating "wingenminiupnpcstrings" as a windows executable, but it can't run the .exe, since it is cross compiled.
A simple workaround is to generate the file using linux, but then it gives the wrong string.
If i added the 2 sed commands to update the make file, I get this
i586-mingw32msvc-ar
i586-mingw32msvc-gcc -Wall -Os -DNDEBUG -D_WIN32_WINNT=0X501 -DSTATICLIB -c -o upnpc.o upnpc.c
i586-mingw32msvc-gcc -Wall -Os -DNDEBUG -D_WIN32_WINNT=0X501 -c -o dll/upnpc.o upnpc.c
i586-mingw32msvc-gcc wingenminiupnpcstrings.o -lws2_32 -liphlpapi -o wingenminiupnpcstrings
./wingenminiupnpcstrings miniupnpcstrings.h.in miniupnpcstrings.h
./wingenminiupnpcstrings: 1: ./wingenminiupnpcstrings: MZ����@���: not found
./wingenminiupnpcstrings: 1: ./wingenminiupnpcstrings: .data: not found
./wingenminiupnpcstrings: 2: ./wingenminiupnpcstrings: 6�R2��
0: not found
./wingenminiupnpcstrings: 10: ./wingenminiupnpcstrings: Syntax error: Unterminated quoted string
[/quote]