Ticket #1005 (closed defect: fixed)

Opened 3 years ago

Last modified 9 months ago

Proble with VSIStatBufL

Reported by: jdenisgiguere@fastmail.fm Assigned to: mloskot
Priority: low Milestone: 1.5.0
Component: ConfigBuild Version: unspecified
Severity: normal Keywords: CPL mingw msys
Cc: warmerdam

Description (Last modified by mloskot)

When I'm trying to compile gdal with mingw, I get the following error message :

make[1]: Entering directory `/c/opensource/gdal/port'
/bin/sh.exe ../libtool --mode=compile g++ -Wall  -O2   -I../port  -c -o
cpl_conv.o cpl_conv.cpp
mkdir .libs
 g++ -Wall -O2 -I../port -c cpl_conv.cpp  -DDLL_EXPORT -DPIC -o .libs/cpl_conv.o
cpl_conv.cpp: In function `void* CPLScanPointer(const char*, int)':
cpl_conv.cpp:936: warning: cast to pointer from integer of different size
 g++ -Wall -O2 -I../port -c cpl_conv.cpp -o cpl_conv.o >/dev/null 2>&1
/bin/sh.exe ../libtool --mode=compile g++ -Wall  -O2   -I../port  -c -o
cpl_error.o cpl_error.cpp
 g++ -Wall -O2 -I../port -c cpl_error.cpp  -DDLL_EXPORT -DPIC -o .libs/cpl_error.o
 g++ -Wall -O2 -I../port -c cpl_error.cpp -o cpl_error.o >/dev/null 2>&1
/bin/sh.exe ../libtool --mode=compile g++ -Wall  -O2   -I../port  -c -o
cpl_string.o cpl_string.cpp
 g++ -Wall -O2 -I../port -c cpl_string.cpp  -DDLL_EXPORT -DPIC -o .libs/cpl_string.o
 g++ -Wall -O2 -I../port -c cpl_string.cpp -o cpl_string.o >/dev/null 2>&1
/bin/sh.exe ../libtool --mode=compile g++ -Wall  -O2   -I../port  -c -o
cplgetsymbol.o cplgetsymbol.cpp
 g++ -Wall -O2 -I../port -c cplgetsymbol.cpp  -DDLL_EXPORT -DPIC -o
.libs/cplgetsymbol.o
 g++ -Wall -O2 -I../port -c cplgetsymbol.cpp -o cplgetsymbol.o >/dev/null 2>&1
/bin/sh.exe ../libtool --mode=compile g++ -Wall  -O2   -I../port  -c -o
cpl_dir.o cpl_dir.cpp
 g++ -Wall -O2 -I../port -c cpl_dir.cpp  -DDLL_EXPORT -DPIC -o .libs/cpl_dir.o
 g++ -Wall -O2 -I../port -c cpl_dir.cpp -o cpl_dir.o >/dev/null 2>&1
/bin/sh.exe ../libtool --mode=compile g++ -Wall  -O2   -I../port  -c -o
cpl_path.o cpl_path.cpp
 g++ -Wall -O2 -I../port -c cpl_path.cpp  -DDLL_EXPORT -DPIC -o .libs/cpl_path.o
 g++ -Wall -O2 -I../port -c cpl_path.cpp -o cpl_path.o >/dev/null 2>&1
/bin/sh.exe ../libtool --mode=compile g++ -Wall  -O2   -I../port  -c -o
cpl_csv.o cpl_csv.cpp
 g++ -Wall -O2 -I../port -c cpl_csv.cpp  -DDLL_EXPORT -DPIC -o .libs/cpl_csv.o
 g++ -Wall -O2 -I../port -c cpl_csv.cpp -o cpl_csv.o >/dev/null 2>&1
/bin/sh.exe ../libtool --mode=compile g++ -Wall  -O2   -I../port  -c -o
cpl_findfile.o cpl_findfile.cpp
 g++ -Wall -O2 -I../port -c cpl_findfile.cpp  -DDLL_EXPORT -DPIC -o
.libs/cpl_findfile.o
 g++ -Wall -O2 -I../port -c cpl_findfile.cpp -o cpl_findfile.o >/dev/null 2>&1
/bin/sh.exe ../libtool --mode=compile g++ -Wall  -O2   -I../port  -c -o
cpl_minixml.o cpl_minixml.cpp
 g++ -Wall -O2 -I../port -c cpl_minixml.cpp  -DDLL_EXPORT -DPIC -o
.libs/cpl_minixml.o
 g++ -Wall -O2 -I../port -c cpl_minixml.cpp -o cpl_minixml.o >/dev/null 2>&1
/bin/sh.exe ../libtool --mode=compile g++ -Wall  -O2   -I../port  -c -o
cpl_multiproc.o cpl_multiproc.cpp
 g++ -Wall -O2 -I../port -c cpl_multiproc.cpp  -DDLL_EXPORT -DPIC -o
.libs/cpl_multiproc.o
cpl_multiproc.cpp: In function `void CPLCleanupTLS()':
cpl_multiproc.cpp:689: warning: unused variable 'i'
 g++ -Wall -O2 -I../port -c cpl_multiproc.cpp -o cpl_multiproc.o >/dev/null 2>&1
/bin/sh.exe ../libtool --mode=compile g++ -Wall  -O2   -I../port  -c -o
cpl_list.o cpl_list.cpp
 g++ -Wall -O2 -I../port -c cpl_list.cpp  -DDLL_EXPORT -DPIC -o .libs/cpl_list.o
 g++ -Wall -O2 -I../port -c cpl_list.cpp -o cpl_list.o >/dev/null 2>&1
/bin/sh.exe ../libtool --mode=compile g++ -Wall  -O2   -I../port  -c -o
cpl_getexecpath.o cpl_getexecpath.cpp
 g++ -Wall -O2 -I../port -c cpl_getexecpath.cpp  -DDLL_EXPORT -DPIC -o
.libs/cpl_getexecpath.o
 g++ -Wall -O2 -I../port -c cpl_getexecpath.cpp -o cpl_getexecpath.o >/dev/null 2>&1
/bin/sh.exe ../libtool --mode=compile g++ -Wall  -O2   -I../port  -c -o
cplstring.o cplstring.cpp
 g++ -Wall -O2 -I../port -c cplstring.cpp  -DDLL_EXPORT -DPIC -o .libs/cplstring.o
 g++ -Wall -O2 -I../port -c cplstring.cpp -o cplstring.o >/dev/null 2>&1
/bin/sh.exe ../libtool --mode=compile g++ -Wall  -O2   -I../port  -c -o
cpl_vsisimple.o cpl_vsisimple.cpp
 g++ -Wall -O2 -I../port -c cpl_vsisimple.cpp  -DDLL_EXPORT -DPIC -o
.libs/cpl_vsisimple.o
 g++ -Wall -O2 -I../port -c cpl_vsisimple.cpp -o cpl_vsisimple.o >/dev/null 2>&1
/bin/sh.exe ../libtool --mode=compile g++ -Wall  -O2   -I../port  -c -o
cpl_vsil.o cpl_vsil.cpp
 g++ -Wall -O2 -I../port -c cpl_vsil.cpp  -DDLL_EXPORT -DPIC -o .libs/cpl_vsil.o
 g++ -Wall -O2 -I../port -c cpl_vsil.cpp -o cpl_vsil.o >/dev/null 2>&1
/bin/sh.exe ../libtool --mode=compile g++ -Wall  -O2   -I../port  -c -o
cpl_vsi_mem.o cpl_vsi_mem.cpp
 g++ -Wall -O2 -I../port -c cpl_vsi_mem.cpp  -DDLL_EXPORT -DPIC -o
.libs/cpl_vsi_mem.o
cpl_vsi_mem.cpp: In member function `virtual int
VSIMemFilesystemHandler::Stat(const char*, VSIStatBufL*)':
cpl_vsi_mem.cpp:395: error: invalid application of `sizeof' to incomplete type
`VSIStatBufL' 
cpl_vsi_mem.cpp:399: error: invalid use of undefined type `struct stat64'
cpl_vsi.h:216: error: forward declaration of `struct stat64'
cpl_vsi_mem.cpp:400: error: invalid use of undefined type `struct stat64'
cpl_vsi.h:216: error: forward declaration of `struct stat64'
cpl_vsi_mem.cpp:404: error: invalid use of undefined type `struct stat64'
cpl_vsi.h:216: error: forward declaration of `struct stat64'
cpl_vsi_mem.cpp:405: error: invalid use of undefined type `struct stat64'
cpl_vsi.h:216: error: forward declaration of `struct stat64'
make[1]: *** [cpl_vsi_mem.o] Error 1
make[1]: Leaving directory `/c/opensource/gdal/port'
make: *** [port-target] Error 2

I'm using cvs snapshot from 2005-11-23 14h45 (time is approx) and MSYS :

MSYS 1.0.10(0.46/3/2) 2004-03-15 07:17 i686 unknown; targ=MINGW32
GNU bash, version 2.04.0(1)-release (i686-pc-msys); ENV=.profile
GNU Make version 3.79.1,Built for i686-pc-msys; MAKE_MODE=unix
gcc.exe (GCC) 3.4.2 (mingw-special); targ=MINGW32
GNU ld version 2.15.91 20040904
   789320 Tue Mar 16 18:32:49 2004 /bin/msys-1.0.dll
    52064 Thu Jan 02 13:05:27 2003 /bin/msysltdl-3.dll
   135680 Tue Mar 16 18:32:48 2004 /bin/make.exe
    88064 Tue Sep 21 08:15:22 2004 /mingw/bin/gcc.exe
   642048 Sat Sep 04 23:45:44 2004 /mingw/bin/ld.exe

Change History

04/02/07 23:36:04 changed by warmerdam

  • severity changed from major to normal.
  • cc set to warmerdam.
  • component changed from GDAL_Raster to ConfigBuild.
  • priority changed from high to low.
  • owner changed from warmerdam to mloskot.
  • milestone set to 1.5.0.
  • keywords set to mingw msys.
  • description changed.

Mateusz,

For 1.5.0 I'd like to review mingw/msys build problems, and see what we can do to resolve them. If this still occurs it is likely because the large api is not enabled, and thus there is no type for VSIStatBufL. In this case we likely ought to typedef it to be VSIStatBuf.

But it is also possible this was already corrected.

04/17/07 23:04:59 changed by mloskot

  • status changed from new to assigned.
  • description changed.

04/18/07 14:36:34 changed by ajolma

I've seen this problem, and fixing it was simple although I didn't understand what was going on. cpl_vsi.h had to be changed a bit to declare VSIStatBufL twice(!) - also outside a #ifdef which should have been included. Anyway, I don't see it anymore in the newer versions of with the newer gcc/preprocessor in MinGW.

10/29/07 01:30:18 changed by mloskot

  • keywords changed from mingw msys to CPL mingw msys.

11/28/07 09:18:19 changed by mloskot

Ari,

Does it mean this problem does not occur anymore under newer MinGW? If it's true, then we could close this ticket and I could avoid maintaining new compilation environment for a while :-)

11/28/07 09:31:14 changed by ajolma

I have not seen this for awhile so I assume it is fixed.

Ari

11/28/07 09:45:03 changed by mloskot

  • status changed from assigned to closed.
  • resolution set to fixed.

Ari, thanks for confirmation. I'm closing this bug as fixed.

Jean-Denis, please reopen if you will find the problem still exists.