cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: compilation error of libcurl 7.21.7 with mingw-w64 (i686, gcc 4.7)

From: Guenter <lists_at_gknw.net>
Date: Thu, 08 Sep 2011 13:36:55 +0200

Hi Vincent,
Am 08.09.2011 08:50, schrieb Vincent Torri:
> I tried to compile libcurl 7.21.7 with mingw-w64 (i686, mingw, gcc 4.7)
> on Windows and I get that error:
>
>
>
> make[3]: Entering directory
> `/home/torri/packages/curl-7.21.7-src/release/mingw-w64-x86_32-curl-7.21.7/src'
> if i686-w64-mingw32-gcc -DHAVE_CONFIG_H -I../include/curl -I../include
> -I../include -I../lib -I../src -I../lib -I../src -isystem
> /opt/efl/include -IC:/MinGW_PKG/msys/1.0/opt/efl/include
> -I\{exec_prefix\}/include -IC:/MinGW_PKG/msys/1.0/opt/efl/include
> -I\{exec_prefix\}/include -march=i686 -mtune=i686 -mms-bitfields -O2
> -pipe -g0 -Wno-system-headers -MT main.o -MD -MP -MF ".deps/main.Tpo"
> -c -o main.o main.c; \
> then mv -f ".deps/main.Tpo" ".deps/main.Po"; else rm -f
> ".deps/main.Tpo"; exit 1; fi
> In file included from ../lib/strtoofft.h:25:0,
> from ../lib/curlx.h:40,
> from main.c:144:
> ../lib/setup.h:317:0: warning: "lseek" redefined [enabled by default]
> c:\mingw_pkg\mingw-w32\bin\../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/include/io.h:336:0:
> note: this is the location of the previous definition
hmm, I dont see this one though can see lseek defined in io.h at line
450 (I'm using an older version 4.5.2 and 64-bit native), but the whole
block is protected with '#ifdef _UWIN' ...

> main.c:467:12: error: static declaration of 'ftruncate64' follows
> non-static declaration
> c:\mingw_pkg\mingw-w32\bin\../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/include/unistd.h:30:5:
> note: previous declaration of 'ftruncate64' was here
> main.c:476:0: warning: "ftruncate" redefined [enabled by default]
> c:\mingw_pkg\mingw-w32\bin\../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/include/unistd.h:56:0:
> note: this is the location of the previous definition
> make[3]: *** [main.o] Error 1
>
>
> Maybe a check in configure.ac <http://configure.ac> should be added to
> check the availability of ftruncate64() and guard the definition of
> ftruncate64 correctly.
that wouldnt cover builds with static makefiles; I fixed it this way:
https://github.com/bagder/curl/commit/443ab77e1fefcaa8bdcd94df79617b43c024248f

Gün.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-09-08