Bug 450983 - Gdal 1.5.1-10 cpl_config.h header is broken
Gdal 1.5.1-10 cpl_config.h header is broken
Product: Fedora
Classification: Fedora
Component: gdal (Show other bugs)
All Linux
low Severity urgent
: ---
: ---
Assigned To: Balint Cristian
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-06-11 22:55 EDT by Matt Fago
Modified: 2008-06-12 22:25 EDT (History)
2 users (show)

See Also:
Fixed In Version: 1.5.1-13.fc9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-06-12 22:25:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Matt Fago 2008-06-11 22:55:10 EDT
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:

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

Expected results:

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"
error "Unknown word size"

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 08:03:48 EDT

  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,
Comment 2 Matt Fago 2008-06-12 11:03:22 EDT
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 11:42:08 EDT
Building it right now:

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@rdsor.ro> - 1.5.1-13
- fix pkgconfig too

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

* Tue May 27 2008 Balint Cristian <rezso@rdsor.ro> - 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 13:30:14 EDT
submitted to stable.
Comment 5 Fedora Update System 2008-06-12 22:24:59 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.