Opened 15 years ago

Last modified 13 years ago

#795 closed defect (fixed)

ilwisdataset.cpp build problems.

Reported by: warmerdam Owned by: warmerdam
Priority: high Milestone:
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords:
Cc: lichun@…

Description

I tried to compile gdal-1.2.6beta5 but the process crashes with the
following error message.

My system: alpha tru64 5.1

gcc:
Reading specs from
/usr/local/gcc/bin/../lib/gcc-lib/alphaev67-dec-osf5.1/3.3/specs
Konfiguriert mit: configure --prefix=/usr/local/gcc-3.3
Thread model: single
gcc-Version 3.3

g++ -Wall -O2 -I../../port -I../../gcore -I../../alg -I../../ogr
-I../../ogr/ogrsf_frmts -c ilwisdataset.cpp  -DPIC -o ../o/.libs/ilwisdat
aset.o
ilwisdataset.cpp: In function `std::string TrimSpaces(const std::string&)':
ilwisdataset.cpp:50: warning: comparison is always false due to limited
range
  of data type
ilwisdataset.cpp:50: warning: comparison is always false due to limited
range
  of data type
ilwisdataset.cpp: In member function `void IniFile::Load()':
ilwisdataset.cpp:181: warning: comparison is always true due to limited
range
  of data type
ilwisdataset.cpp:195: warning: comparison is always true due to limited
range
  of data type
ilwisdataset.cpp: In function `CPLErr GetRowCol(std::basic_string<char,
  std::char_traits<char>, std::allocator<char> >, int&, int&)':
ilwisdataset.cpp:313: warning: comparison is always true due to limited
range
  of data type
ilwisdataset.cpp:324: warning: comparison is always true due to limited
range
  of data type
ilwisdataset.cpp: In static member function `static GDALDataset*
  ILWISDataset::CreateCopy(const char*, GDALDataset*, int, char**, int
  (*)(double, const char*, void*), void*)':
ilwisdataset.cpp:1112: error: `isinf' undeclared (first use this function)
ilwisdataset.cpp:1112: error: (Each undeclared identifier is reported only
once
  for each function it appears in.)
ilwisdataset.cpp:1167: warning: unused variable `float fNoDataValue'
ilwisdataset.cpp: In member function `void
  ILWISRasterBand::FillWithNoData(void*)':
ilwisdataset.cpp:1492: warning: enumeration value `stByte' not handled in
  switch
ilwisdataset.cpp: In member function `virtual CPLErr
  ILWISRasterBand::IWriteBlock(int, int, void*)':
ilwisdataset.cpp:1516: warning: unused variable `GDALDataType eType'
gmake[2]: *** [../o/ilwisdataset.o] Fehler 1
gmake[2]: Verlassen des Verzeichnisses Verzeichnis
»/usr/local/src/gdal-1.2.6/frmts/ilwis«
gmake[1]: *** [ilwis-install-obj] Fehler 2
gmake[1]: Verlassen des Verzeichnisses Verzeichnis
»/usr/local/src/gdal-1.2.6/frmts«
gmake: *** [frmts-target] Fehler 2

Change History (6)

comment:1 Changed 15 years ago by warmerdam

I have emailed Horst asking for him to append information from the isinf()
man page.  My understanding was that math.h was sufficient for isinf() but
it would seem that is not always the case.  We may end up needing some ugly
configure magic. 

Also, I have had reports of this module (ilwisdataset.cpp) failing on 
Visual Studio 2003 though it works fine for me on Visual Studio 2002.  There
the problem appears to be related to the use of std::basic_str.  


comment:2 Changed 15 years ago by horst.duester@…

Frank

It seems, that tru64 does not support isinf. The text below I found at: 
http://gcc.gnu.org/ml/fortran/2004-07/msg00230.html


" ...The problem is that Tru64 doesn't
provide "isinf" (at all, not just that it doesn't honor +Inf/-Inf
conventions).  The workaround below is to use the slightly more
portable "isnan"..."


Perhapt this helps.

Horst  

comment:3 Changed 15 years ago by warmerdam

Horst, 

Thanks.  I have asked Lichun to look into this issue.  

But it seems that what we really need is a configure check for whether 
isinf() is available, and if not to just have the CPLIsInf() always return 
FALSE.

I will look into this aspect. 

comment:4 Changed 15 years ago by warmerdam

I have committed a change to cpl_port.h that should fallback to skipping
use of isinf() if the macro is not defined per the discussion in:

  http://lists.gnu.org/archive/html/autoconf-patches/2004-08/msg00011.html

I will email the updated cpl_port.h for you to test it. 

 

comment:5 Changed 15 years ago by warmerdam

Frank

Yes, the compilation process now works successful beside of some warnings
with respect to ilwis.

comment:6 Changed 13 years ago by hobu

Closing as this bug appears to be fixed.
Note: See TracTickets for help on using tickets.