Opened 13 years ago

Closed 13 years ago

#1579 closed defect (fixed)

Missing includes in ILWIS driver for GCC 4.3

Reported by: Mateusz Łoskot Owned by: Mateusz Łoskot
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 Mateusz Łoskot)

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 (1)

frmts-ilwis-ilwisdataset.cpp.patch (640 bytes) - added by Mateusz Łoskot 13 years ago.
Patch with missing includes added

Download all attachments as: .zip

Change History (5)

Changed 13 years ago by Mateusz Łoskot

Patch with missing includes added

comment:1 Changed 13 years ago by Mateusz Łoskot

Description: modified (diff)

comment:2 Changed 13 years ago by warmerdam

Cc: lichun warmerdam added; gcc ilwis removed
Keywords: gcc ilwis added
Owner: changed from warmerdam to Mateusz Łoskot

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.

comment:3 Changed 13 years ago by Mateusz Łoskot

Status: newassigned

comment:4 Changed 13 years ago by Mateusz Łoskot

Resolution: fixed
Status: assignedclosed

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

Note: See TracTickets for help on using tickets.