Opened 15 years ago

Closed 15 years ago

#2982 closed defect (duplicate)

Build failure with gcc 4.4

Reported by: frankie Owned by: chaitanya
Priority: normal Milestone:
Component: ConfigBuild Version: 1.5.3
Severity: normal Keywords: interlis
Cc: pka, warmerdam

Description

Change History (2)

comment:1 by warmerdam, 15 years ago

Cc: pka warmerdam added
Component: defaultConfigBuild
Keywords: interlis added
Milestone: 1.5.5
Owner: changed from warmerdam to chaitanya

The essentials from this link are:

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>

Chaitanya,

Please look into adding this include in trunk, 1.6 branch and 1.5 branch as appropriate.

I have added Pirmin as a cc: in case he sees a need to upstream this change or has any other comment.

comment:2 by Even Rouault, 15 years ago

Milestone: 1.5.5
Resolution: duplicate
Status: newclosed
Version: 1.5.41.5.3
Note: See TracTickets for help on using tickets.