Bug 450983

Summary: Gdal 1.5.1-10 cpl_config.h header is broken
Product: [Fedora] Fedora Reporter: Matt Fago <fago>
Component: gdalAssignee: Balint Cristian <cristian.balint>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: low    
Version: 9CC: pertusus, rvinyard
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.5.1-13.fc9 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-06-13 02:25:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Matt Fago 2008-06-12 02:55:10 UTC
Description of problem:
I have a product that uses gdal that no longer compiles (see bottom of report for solution):

In file included from /usr/include/gdal/cpl_port.h:90,
                 from /usr/include/gdal/gdal.h:41,
                 from ../Source_Code/ReadDEMFile.c:23:
/usr/include/gdal/cpl_config.h:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token
In file included from /usr/include/gdal/gdal.h:42,
                 from ../Source_Code/ReadDEMFile.c:23:
/usr/include/gdal/cpl_error.h:58: error: expected declaration specifiers or ‘...’ before ‘va_list’

Same error with system compiler or Intel ifort 10.1.015. Worked fine yesterday before update to gdal.
Time to figure out how to downgrade and set up version-lock I guess.

Version-Release number of selected component (if applicable):
It worked fine prior to updating to gdal 1.5.1-10 today. This is on x86_64, but I'm pretty sure that 
doesn't matter.

How reproducible:
100%

Steps to Reproduce:
1. Try linking something with gdal.h
2. Get error above.
3.
  
Actual results:
See above

Expected results:
Compiles.

Additional info:

The problem is the file /usr/include/gdal/cpl_config.h.  Here is the contents:
------
include <bits/wordsize.h>

if __WORDSIZE == 32
include "gdal/cpl_config-32.h"
elif __WORDSIZE == 64
include "gdal/cpl_config-64.h"
else
error "Unknown word size"
endif
------

Where are all of the "#" prefixes for the preprocessor commands!?!?!?!

Easy to fix, but how did this pass any sort of testing?!

Comment 1 Balint Cristian 2008-06-12 12:03:48 UTC
Matt,

  I am sorry for the bug induced. I was on the way to fix multilib issue
but seems i induced an ugly bug. I fix it right now and push it to stable.
  I never used in my suite cpl_config.h so i wasnt aware of it.

Thank you,
//cristian

Comment 2 Matt Fago 2008-06-12 15:03:22 UTC
Yea, I don't know how it's pulling in that header.

Thanks for the quick response and for building this package for Fedora. It's a pain to do oneself.

 - Matt

Comment 3 Balint Cristian 2008-06-12 15:42:08 UTC
Building it right now:
http://koji.fedoraproject.org/koji/buildinfo?buildID=52472


Can't recall what was in my mind when i pushed -10 insted of -13 ...

It was done quite a while, but i updated wrong version upstream:

* Tue May 27 2008 Balint Cristian <rezso> - 1.5.1-13
- fix pkgconfig too

* Tue May 27 2008 Balint Cristian <rezso> - 1.5.1-12
- fix once more gdal-config

* Tue May 27 2008 Balint Cristian <rezso> - 1.5.1-11
- fix multilib gdal-config, add wrapper around
- fix typos in cpl_config.h wrapper


Comment 4 Balint Cristian 2008-06-12 17:30:14 UTC
submitted to stable.

Comment 5 Fedora Update System 2008-06-13 02:24:59 UTC
gdal-1.5.1-13.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.