Bug 450983 - Gdal 1.5.1-10 cpl_config.h header is broken
Summary: Gdal 1.5.1-10 cpl_config.h header is broken
Alias: None
Product: Fedora
Classification: Fedora
Component: gdal
Version: 9
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Balint Cristian
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2008-06-12 02:55 UTC by Matt Fago
Modified: 2008-06-13 02:25 UTC (History)
2 users (show)

Fixed In Version: 1.5.1-13.fc9
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-06-13 02:25:01 UTC
Type: ---

Attachments (Terms of Use)

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:

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 12:03:48 UTC

  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 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:

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 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.

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