Hello dear list

I'm trying to build libmicrohttpd using mingw-w64, and it's not going so well. I'm met with a warning first:

/usr/lib/gcc/i686-w64-mingw32/4.6/../../../../i686-w64-mingw32/include/winsock2.h:15:2: warning: #warning Please include winsock2.h before windows.h [-Wcpp]

followed by errors like:

../../src/include/plibc/plibc.h:74:8: error: redefinition of 'struct _stat64' /usr/lib/gcc/i686-w64-mingw32/4.6/../../../../i686-w64-mingw32/include/_mingw_stat64.h:77:10: note: originally defined here ../../src/include/plibc/plibc.h:357:5: error: conflicting types for 'truncate' /usr/lib/gcc/i686-w64-mingw32/4.6/../../../../i686-w64-mingw32/include/unistd.h:45:5: note: previous declaration of 'truncate' was here ../../src/include/plibc/plibc.h:465:0: warning: "strcasecmp" redefined [enabled by default] /usr/lib/gcc/i686-w64-mingw32/4.6/../../../../i686-w64-mingw32/include/string.h:106:0: note: this is the location of the previous definition ../../src/include/plibc/plibc.h:466:0: warning: "strncasecmp" redefined [enabled by default] /usr/lib/gcc/i686-w64-mingw32/4.6/../../../../i686-w64-mingw32/include/string.h:105:0: note: this is the location of the previous definition

The following series of commands - to build libmicrohttpd - reproduces the bug for me on Ubuntu 12.04 (I've attached this as a bash script also)

svn --non-interactive --trust-server-cert checkout https://gnunet.org/svn/libmicrohttpd
   cd libmicrohttpd/
   autoreconf -fi
wget http://ovh.dl.sourceforge.net/project/plibc/plibc/0.1.5/plibc-0.1.5.zip
   unzip plibc-0.1.5.zip -d plibc
   export LIBMICROHHTPD_LDFLAGS="-L$(pwd)/plibc/lib"
   export LIBMICROHHTPD_FLAGS="-I$(pwd)/plibc/include"
wget -m ftp://sources.redhat.com/pub/pthreads-win32/dll-latest/include/ -nd -P plibc/include/ wget ftp://sources.redhat.com/pub/pthreads-win32/dll-latest/lib/x86/libpthreadGC2.a -P plibc/lib/ wget ftp://sources.redhat.com/pub/pthreads-win32/dll-latest/dll/x86/pthreadGC2.dll -P plibc/bin/
   mv plibc/lib/libpthreadGC2.a plibc/lib/libpthread.a
CFLAGS="$CFLAGS $LIBMICROHHTPD_FLAGS" CPPFLAGS="$CPPFLAGS $LIBMICROHHTPD_FLAGS" LDFLAGS="$LDFLAGS $LIBMICROHHTPD_LDFLAGS" ./configure --host=i686-w64-mingw32 --disable-curl --disable-https
   make

So it seems some things are defined both in mingw64's includes and in plibc's includes, but the configure script aborts if I don't have plibc installed. Any ideas on how to fix this?

Thanks! :)

/Rune

Attachment: build-libmicrohttpd.sh
Description: application/shellscript

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to