Opened 14 years ago

Closed 13 years ago

#3468 closed defect (fixed)

swq.h does not get installed

Reported by: Ari Jolma Owned by: warmerdam
Priority: normal Milestone:
Component: ConfigBuild Version: unspecified
Severity: normal Keywords:
Cc: jywarren, kiorky@…

Description

swq.h is a new header file that is required by other public gdal headers, thus it needs to be installed too.

Attachments (1)

gdal-easy_install (1.5 KB ) - added by jywarren 14 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 by warmerdam, 14 years ago

Status: newassigned

Ari, what public header includes swq.h? I would prefer not to treat this as a part of the public api.

comment:2 by Ari Jolma, 14 years ago

ogr_p.h:94

comment:3 by Ari Jolma, 14 years ago

At least ogr_p.h gets installed. It's not included by other installed headers. I did a fresh install, and some code, which uses GDAL, did not compile because swq.h was not found. It does not seem to be very general issue though (maybe a MinGW issue?).

comment:4 by Even Rouault, 14 years ago

Ari, it's strange that you notice that just now. Apparently, ogr_p.h includes swq.h since r10392 (3 years ago)...

comment:5 by jywarren, 14 years ago

Hmm, i'm getting a similar error on installing gdal-python using easy_install --upgrade GDAL:

[warren@cartagen cartagen]$ sudo easy_install --upgrade GDAL [sudo] password for warren: Searching for GDAL Reading http://pypi.python.org/simple/GDAL/ Reading http://www.gdal.org Best match: GDAL 1.7.1 Downloading http://pypi.python.org/packages/source/G/GDAL/GDAL-1.7.1.tar.gz#md5=38b838d528b309a28a3aa24d4fcef3cd Processing GDAL-1.7.1.tar.gz Running GDAL-1.7.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-iSB84W/GDAL-1.7.1/egg-dist-tmp-TcUFBD Could not run gdal-config!!!! extensions/gdal_wrap.cpp: In function ‘int PyProgressProxy(double, const char*, void*)’: extensions/gdal_wrap.cpp:2969: warning: the address of ‘_Py_NoneStruct’ will never be NULL extensions/gdal_wrap.cpp: In function ‘PyObject* _wrap_MajorObject_SetMetadataSWIG_0(PyObject*, PyObject*)’: extensions/gdal_wrap.cpp:5854: warning: deprecated conversion from string constant to ‘char*’ extensions/gdal_wrap.cpp: In function ‘PyObject* _wrap_PushErrorHandler(PyObject*, PyObject*)’: extensions/gdal_wrap.cpp:4888: warning: ‘argv[0]’ may be used uninitialized in this function extensions/osr_wrap.cpp:2906: warning: ‘char* GDALPythonObjectToCStr(PyObject*)’ defined but not used In file included from extensions/ogr_wrap.cpp:2808: /usr/local/include/ogr_p.h:94:17: error: swq.h: No such file or directory In file included from extensions/ogr_wrap.cpp:2808: /usr/local/include/ogr_p.h:105: error: ‘swq_field_type’ does not name a type error: Setup script exited with error: command 'gcc' failed with exit status 1 [warren@cartagen cartagen]$

I was trying to get gdal2tiles.py to register GDAL 1.7.2, and failing. gdalwarp --version gives 1.7.2, as do the other compiled tools. gdal2tiles presumably relies on gdal-python, so I'm trying to upgrade that. Perhaps I'm a little lost.

by jywarren, 14 years ago

Attachment: gdal-easy_install added

comment:6 by jywarren, 14 years ago

ok sorry for the terrible formatting, i attached the output separately.

comment:7 by jywarren, 14 years ago

Cc: jywarren added

comment:8 by kiorky, 14 years ago

I'm also hit by that bug. Is there someone hanging on it ?

comment:9 by kiorky, 14 years ago

Cc: kiorky@… added

comment:10 by warmerdam, 14 years ago

OK, it seems ogr_p.h includes swq.h primarily for the swq_field_type type used for SpecialFieldTypes[]. Then swig/include/ogr.i includes swq_p.h though I'm not exactly sure why. And it seems like python easy_install attempts to build the python extensions "out of tree" against only the public API. I'm not sure which aspect here is the most repugnant to me!

I'm somewhat doubtful that SpecialFieldTypes[] really belongs in ogr_p.h. I'd like to suggest we break this dependence on swq.h in ogr_p.h.

I'll take a crack at doing this in trunk. In the meantime of course folks can just manually copy swq.h into the installed tree as needed. The one at:

http://svn.osgeo.org/gdal/branches/1.7/gdal/ogr/swq.h

should do ok for any 1.7.x installs.

comment:11 by warmerdam, 14 years ago

I have made a preliminary effort to disentangle swq.h from ogr_p.h in trunk (r20616). I am not immediately able to test the easy install stuff with this though. Feedback welcome.

comment:12 by jmckenty, 14 years ago

I was able to use the workaround above (download swq.h) to build successfully. We need PPAs of GDAL for testing these fixes.

comment:13 by warmerdam, 14 years ago

Josh, I'm not sure what a PPA is - perhaps a pre-packaged archive?

For trunk there are nightly snapshots at:

http://www.gdal.org/daily/

comment:14 by jmckenty, 14 years ago

PPA is a personal package archive, it's a launchpad feature which automatically makes packages out of code branches. (Makes it easy for testers to install a branch with the patch applied). Not that I'm a fan of Launchpad or BZR, but that I'm a fan of APT.

comment:15 by Even Rouault, 13 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.