Ticket #3468 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

swq.h does not get installed

Reported by: ajolma 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

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

Change History

Changed 3 years ago by warmerdam

  • status changed from new to assigned

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

Changed 3 years ago by ajolma

ogr_p.h:94

Changed 3 years ago by ajolma

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

Changed 3 years ago by rouault

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

Changed 3 years ago by jywarren

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.

Changed 3 years ago by jywarren

Changed 3 years ago by jywarren

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

Changed 3 years ago by jywarren

  • cc jywarren added

Changed 3 years ago by kiorky

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

Changed 3 years ago by kiorky

  • cc kiorky@… added

Changed 3 years ago by warmerdam

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.

Changed 3 years ago by warmerdam

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.

Changed 3 years ago by jmckenty

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

Changed 3 years ago by warmerdam

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/

Changed 3 years ago by jmckenty

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.

Changed 2 years ago by rouault

  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.