Ticket #1579 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

Missing includes in ILWIS driver for GCC 4.3

Reported by: mloskot Owned by: mloskot
Priority: normal Milestone: 1.4.2
Component: GDAL_Raster Version: 1.4.1
Severity: normal Keywords: gcc ilwis
Cc: lichun, warmerdam

Description (last modified by mloskot) (diff)

Reported by Martin Michlmayr and Francesco P. Lovergine by e-mail

Package: gdal
Version: 1.4.1-1
Usertags: ftbfs-gcc-4.3
Tags: patch

Your package fails to build with GCC 4.3. Version 4.3 has not been released yet but I'm building with a snapshot in order to find errors and give people an advance warning. In GCC 4.3, the C++ header dependencies have been cleaned up.

The advantage of this is that programs will compile faster. The downside is that you actually need to directly #include everything you use (but you really should do this anyway, otherwise your program won't work with any compiler other than GCC).

Some background of this can be found at  http://gcc.gnu.org/PR28080

You can reproduce this problem with gcc-snapshot (20070326-1 or higher) from unstable. (Currently not available for i386, but for amd64, powerpc and ia64. I hope to have i386 binaries in the archive in ~3 weeks.)

Automatic build of gdal_1.4.1-1 on em64t by sbuild/amd64 0.53

...
ilwisdataset.cpp: In function 'long int longConv(double)':
ilwisdataset.cpp:249: error: 'LONG_MAX' was not declared in this scope
ilwisdataset.cpp:249: error: 'LONG_MIN' was not declared in this scope
ilwisdataset.cpp: In function 'CPLErr GetRowCol(std::string, int&, int&)':
ilwisdataset.cpp:314: warning: comparison between signed and unsigned integer expressions
ilwisdataset.cpp:325: warning: comparison between signed and unsigned integer expressions
ilwisdataset.cpp: In function 'ilwisStoreType stNeeded(long unsigned int)':
ilwisdataset.cpp:1749: error: 'SHRT_MAX' was not declared in this scope
ilwisdataset.cpp: In member function 'void ValueRange::init(double)':
ilwisdataset.cpp:1793: error: 'ULONG_MAX' was not declared in this scope
ilwisdataset.cpp:1798: error: 'LONG_MAX' was not declared in this scope
make[3]: *** [../o/ilwisdataset.o] Error 1
make[3]: Leaving directory `/build/tbm/gdal-1.4.1/frmts/ilwis'

Appropriate patch is attached.

Attachments

frmts-ilwis-ilwisdataset.cpp.patch Download (0.6 KB) - added by mloskot 6 years ago.
Patch with missing includes added

Change History

Changed 6 years ago by mloskot

Patch with missing includes added

Changed 6 years ago by mloskot

  • description modified (diff)

Changed 6 years ago by warmerdam

  • cc lichun, warmerdam added; gcc ilwis removed
  • keywords gcc ilwis added
  • owner changed from warmerdam to mloskot

Mateusz,

Go ahead and apply the fixes in trunk and 1.4 branch as you see fit. I have added Lichun Wang, the author as a cc, so that he can review the changes once applied.

Changed 6 years ago by mloskot

  • status changed from new to assigned

Changed 6 years ago by mloskot

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

I applied the patch to the trunk (r11328) and to the branches/1.4 (r11329).

Note: See TracTickets for help on using tickets.