Ticket #1579 (closed defect: fixed)
Missing includes in ILWIS driver for GCC 4.3
|Reported by:||mloskot||Owned by:||mloskot|
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: *** [../o/ilwisdataset.o] Error 1 make: Leaving directory `/build/tbm/gdal-1.4.1/frmts/ilwis'
Appropriate patch is attached.