On Friday, October 7, 2016 10:08:08 AM CEST Eli Zaretskii wrote: > The Windows runtime doesn't have 'pipe', it has '_pipe' (with a > slightly different argument list). I believe we need the Gnulib pipe > module to get this to compile. However, just as a quick hack, replace > the call to 'pipe' with a corresponding call to '_pipe', you can find > its documentation here: > > https://msdn.microsoft.com/en-us/library/edze9h7e.aspx > > (This problem is unrelated to your changes, the call to 'pipe' is > already in the repository.)
I just pushed a commit to add pipe-posix to bootstrap.conf. That makes pipe() available on Windows. > > url.o:url.c:(.text+0x1e78): undefined reference to `libiconv_open' > > url.o:url.c:(.text+0x1f25): undefined reference to `libiconv' > > url.o:url.c:(.text+0x1f57): undefined reference to `libiconv' > > url.o:url.c:(.text+0x1f7e): undefined reference to `libiconv_close' > > url.o:url.c:(.text+0x20ee): undefined reference to `libiconv_close' > > collect2: error: ld returned 1 exit status > > > > This was generated by: > > ./configure --host=i686-w64-mingw32 --without-ssl --without-libidn > > --without-metalink --with-gpgme-prefix=/dev/null > > CFLAGS=-I$BUILDDIR/tmp/include LDFLAGS=-L$BUILDDIR/tmp/lib > > --with-libiconv-prefix=$BUILDDIR/tmp CFLAGS=-liconv > I think you need to add -liconv to LIBS, not to CFLAGS. GNU ld is a > one-pass linker, so it needs to see -liconv _after_ all the object > files, not before. Cross-compilation (Linux -> Windows) and testing needs a recipe that works for other developers as well. I just pushed 3 changes that makes it easier - make pipe() available - properly include iconv.h - not using /dev/null for WGETRC in tests/Makefile.am Here is my current recipe, just hacked together on Debian. Maybe we can work on it together, there are some obvious flaws. ++++++++ # for iconv support: # apt-get install win-iconv-mingw-w64-dev # # for zlib support: # apt-get install libz-mingw-w64 libz-mingw-w64-dev PREFIX=i686-w64-mingw32 export CC=$PREFIX-gcc export CPP=$PREFIX-cpp export RANLIB=$PREFIX-ranlib export PKG_CONFIG=$PREFIX-pkg-config ./bootstrap ./configure --host=i686-w64-mingw32 --without-ssl --without-libidn --without- metalink make # copy DLLs to your library folder or where your .exe is cp -p /usr/$PREFIX/bin/iconv.dll src cp -p /usr/$PREFIX/lib/zlib1.dll src # run wget.exe wine src/wget.exe --help # for testing we need a link wget.exe->wget ln -s src/wget.exe src/wget # and we need the DLLs for unit-tests.exe cp -p /usr/$PREFIX/bin/iconv.dll tests cp -p /usr/$PREFIX/lib/zlib1.dll tests make check # This only works if you can run .exe files on your system (kernel feature) # The test suite should be amended to make use of $(EXEEXT) ++++++++ - Copying those DLLs is ugly. Any idea ? - In WgetTests.pm the executable is hard-coded to '../src/wget'. That should check $(EXEEXT) and use e.g. 'wine ../src/wget.$(EXEEXT)'. Any idea that works with wine 32-bit and 64-bit (depending on $PREFIX) ? Regards, Tim
signature.asc
Description: This is a digitally signed message part.