Opened 9 years ago

Closed 9 years ago

#6013 closed defect (fixed)

Can't compile from SVN under mingw64

Reported by: robe Owned by: warmerdam
Priority: normal Milestone: 2.0.1
Component: default Version: 2.0.0
Severity: normal Keywords:

Description (last modified by robe)

I've tried compiling both


Based on your suggestion I tried a fresh new copy without doing


In any case I get these errors during make

make[1]: Entering directory `/sources/gdal-2.0.0tag/port'
/bin/sh /sources/gdal-2.0.0tag/libtool --mode=compile --tag=CXX g++ -I/sources/gdal-2.0.0tag/port -I/sources/gdal-2.0.0tag/gcore  -I/sources/gdal-2.0.0tag/alg  -I/sources/gdal-2.0.0tag/ogr -I/sources/gdal-2.0.0tag/ogr/ogrsf_frmts -g -O2  -Wall  -DOGR_ENABLED -I/sources/gdal-2.0.0tag/port -I/min -I../frmts/zlib  -DHAVE_LIBZ -c -o cpl_conv.lo cpl_conv.cppDGDAL_COMPILATION
libtool: compile:  g++ -I/sources/gdal-2.0.0tag/port -I/sources/gdal-2.0.0tag/gcore -I/sources/gdal-2.0.0tag/alg -I/sources/gdal-2.0.0tag/ogr -I/sources/gdal-2.0.0tag/ogr/ogrsf_frmts -g -O2 -Wall -DOGR_ENABLED -I/sources/gdal-2.0.0tag/port -I/mingw/x86_64-w64-mingw32 -I/mingw/x86_64-w64-mingw32/include -DGDAL_COMPILATION -I../frmts/zlib -DHAVE_LIBZ -c cpl_conv.cpp  -DDLL_EXPORT -DPIC -o .libs/cpl_conv.o
In file included from cpl_conv.h:35:0,
                 from cpl_conv.cpp:33:
cpl_port.h:89:2: error: #error "Unexpected value for SIZEOF_INT"
 #error "Unexpected value for SIZEOF_INT"
cpl_port.h:93:2: error: #error "Unexpected value for SIZEOF_UNSIGNED_LONG"
 #error "Unexpected value for SIZEOF_UNSIGNED_LONG"
cpl_port.h:97:2: error: #error "Unexpected value for SIZEOF_VOIDP"
 #error "Unexpected value for SIZEOF_VOIDP"
cpl_conv.cpp: In function 'int CPLAtoGIntBigExHasOverflow(const char*, GIntBig)':
cpl_conv.cpp:966:41: warning: format '%I64d' expects argument of type 'long long int', but argument 3 has type 'GIntBig {aka long int}' [-Wformat=]
     sprintf(szBuffer, CPL_FRMT_GIB, nVal);
cpl_conv.cpp: In function 'void* CPLScanPointer(const char*, int)':
cpl_conv.cpp:1078:61: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
         pResult = (void *) CPLScanULong( szTemp, nMaxLength );
cpl_conv.cpp: In function 'int CPLPrintUIntBig(char*, GUIntBig, int)':
cpl_conv.cpp:1292:48: warning: format '%I64d' expects argument of type 'long long int', but argument 4 has type 'GUIntBig {aka long unsigned int}' [-Wformat=]
     sprintf( szTemp, "%*I64d", nMaxLen, iValue );
../GDALmake.opt:582: recipe for target `cpl_conv.lo' failed
make[1]: *** [cpl_conv.lo] Error 1
make[1]: Leaving directory `/sources/gdal-2.0.0tag/port'
GNUmakefile:51: recipe for target `port-target' failed
make: *** [port-target] Error 2

What I find puzzling is building from the tarball works fine.

So it doesn't seem to be the configure script at fault since when I swap out the configure script with the tar ball one it still doesn't work.

Change History (3)

comment:1 by robe, 9 years ago

Description: modified (diff)

comment:2 by robe, 9 years ago

Okay I think I may have fond the solution. When I check out in svn, the default is native mode so all the line breaks end up being windows line breaks instead of unix. I think when EvenR builds the tar, since he's on unix the line breaks are Unix style.

So what I did is edit the port/ and change it from windows line break to unix line break. So far so good.

Could we maybe set svn to svn:eol-style = LF.

comment:3 by Even Rouault, 9 years ago

Resolution: fixed
Status: newclosed

trunk r29432, branches/2.0 r29433 "port/ set svn:eol-style LF to avoid issues with msys mingw (#6013)"

Note: See TracTickets for help on using tickets.