Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#2690 closed defect (fixed)

Minor issue with gcc 4.4

Reported by: frankie Owned by: pka
Priority: high Milestone: 1.5.4
Component: OGR_SF Version: 1.5.3
Severity: normal Keywords: interlis
Cc: warmerdam

Description

See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=505629.

This also applies to 1.5.3 at least.

Change History (4)

comment:1 by warmerdam, 15 years ago

Cc: warmerdam added
Keywords: interlis added
Owner: changed from warmerdam to pka

Your package fails to build with the upcoming GCC 4.4. Version 4.4 has not been released yet but I'm building with a snapshot in order to find errors and give people an advance warning.

GCC 4.4 cleaned up some more C++ headers. You always have to #include headers directly and cannot rely for things to be included indirectly.

You can reproduce this problem with gcc-snapshot from unstable.

> Automatic build of gdal_1.5.2-3 on em64t by sbuild/amd64 0.53
...
> /bin/sh /build/tbm/gdal-1.5.2/libtool --mode=compile --tag=CXX g++ -g -O2  -Wall  -I/usr/include -I/usr/include/xercesc -DOGR_ENABLED -I/build/tbm/gdal-1.5.2/port  -I.. -c -o ../../o/iom_utilities.o iom_utilities.cpp
>  g++ -g -O2 -Wall -I/usr/include -I/usr/include/xercesc -DOGR_ENABLED -I/build/tbm/gdal-1.5.2/port -I.. -c iom_utilities.cpp  -fPIC -DPIC -o ../../o/.libs/iom_utilities.o
> iom_utilities.cpp: In function 'char* iom_gettmpnam()':
> iom_utilities.cpp:230: error: 'tempnam' was not declared in this scope
> make[5]: *** [../../o/iom_utilities.o] Error 1
> make[5]: Leaving directory `/build/tbm/gdal-1.5.2/ogr/ogrsf_frmts/ili/iom'

--- ogr/ogrsf_frmts/ili/iom/iom_utilities.cpp~	2008-11-13 22:02:15.000000000 +0000
+++ ogr/ogrsf_frmts/ili/iom/iom_utilities.cpp	2008-11-13 22:02:21.000000000 +0000
@@ -33,6 +33,7 @@
  * @{
  */
 
+#include <cstdio>
 #include <iostream>
 #include <string>
 #include <string.h>

-- Martin Michlmayr http://www.cyrius.com/

comment:2 by warmerdam, 15 years ago

Priority: normalhigh

Pirmin,

Can you take care of this - also I suppose seeing the change get into the upstream source? If you won't have time let me know and I'll take care of applying it (should go in 1.5 and trunk).

in reply to:  2 comment:3 by pka, 15 years ago

Resolution: fixed
Status: newclosed

Fix applied in trunk and 1.5

comment:4 by warmerdam, 15 years ago

For the record, the fixes are r15777 and r15779.

Note: See TracTickets for help on using tickets.