[Qgis-developer] compiling GDAL/OGR C API Port
Marco Hugentobler
marco.hugentobler at karto.baug.ethz.ch
Tue Feb 19 05:04:14 EST 2008
Hi,
In general, the branch works fine for me.
I noticed one problem when I tried to create a new vector layer (Layer -> New
Vector Layer). QGIS crashed with the following backtrace:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1268041520 (LWP 30535)]
0xb6356ac9 in strcasecmp () from /lib/tls/i686/cmov/libc.so.6
(gdb) bt
#0 0xb6356ac9 in strcasecmp () from /lib/tls/i686/cmov/libc.so.6
#1 0xb68a297e in OGRSpatialReference::CopyGeogCSFrom ()
from /usr/lib/libgdal1.4.0.so.1
#2 0xb68a335a in OGRSpatialReference::SetWellKnownGeogCS ()
from /usr/lib/libgdal1.4.0.so.1
#3 0xb68aee69 in OGRSpatialReference::importFromProj4 ()
from /usr/lib/libgdal1.4.0.so.1
#4 0xb68b1224 in OSRImportFromProj4 () from /usr/lib/libgdal1.4.0.so.1
#5 0xb6eaef12 in QgsSpatialRefSys::toWkt (this=0xbfc1a9c8)
at /home/marco/src/qgis_gdal_c/src/core/qgsspatialrefsys.cpp:1152
#6 0xb27b2a2f in createEmptyDataSource (uri=@0xbfc1ab48, format=@0xbfc1ab50,
encoding=@0xbfc1ab4c, vectortype=QGis::WKBPolygon, attributes=@0xbfc1ab2c)
at /home/marco/src/qgis_gdal_c/src/providers/ogr/qgsogrprovider.cpp:1141
#7 0x0810a7ce in QgisApp::newVectorLayer (this=0x83a2900)
at /home/marco/src/qgis_gdal_c/src/app/qgisapp.cpp:2640
#8 0x082a30f9 in QgisApp::qt_metacall (this=0x83a2900,
_c=QMetaObject::InvokeMetaMethod, _id=36, _a=0xbfc1b17c)
at /home/marco/src/qgis_gdal_c/build/src/app/moc_qgisapp.cxx:281
#9 0xb7106c04 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#10 0xb7106e00 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#11 0xb7592878 in QAction::triggered () from /usr/lib/libQtGui.so.4
#12 0xb75945e6 in QAction::activate () from /usr/lib/libQtGui.so.4
#13 0xb797fabf in ?? () from /usr/lib/libQtGui.so.4
#14 0x085d0028 in ?? ()
#15 0x00000000 in ?? ()
(gdb)
Thanks,
Marco
Am Dienstag 19 Februar 2008 10:01:49 schrieb Marco Hugentobler:
> Hi,
>
> I compiled the qgis_gdal_c branch and noticed there are some compiler
> errors with debug enabled. All related to sections that print out some
> debugging messages to the console. Here my compiler output:
>
> /home/marco/src/qgis_gdal_c/src/core/raster/qgsrasterlayer.cpp: In static
> member function »static void
> QgsRasterLayer::buildSupportedRasterFileFilter(QString&)«:
> /home/marco/src/qgis_gdal_c/src/core/raster/qgsrasterlayer.cpp:174:
> Fehler: »void*« ist kein Zeiger auf Objekt
> /home/marco/src/qgis_gdal_c/src/core/raster/qgsrasterlayer.cpp: In member
> function »const QgsRasterBandStats
> QgsRasterLayer::getRasterBandStats(int)«:
> /home/marco/src/qgis_gdal_c/src/core/raster/qgsrasterlayer.cpp:2496:
> Fehler: »void*« ist kein Zeiger auf Objekt
> /home/marco/src/qgis_gdal_c/src/core/raster/qgsrasterlayer.cpp:2503:
> Fehler: »void*« ist kein Zeiger auf Objekt
> /home/marco/src/qgis_gdal_c/src/core/raster/qgsrasterlayer.cpp:2510:
> Fehler: »void*« ist kein Zeiger auf Objekt
> make[2]: *** [src/core/CMakeFiles/qgis_core.dir/raster/qgsrasterlayer.o]
> Fehler 1
>
> Regards,
> Marco
>
> Am Montag 18 Februar 2008 05:54:14 schrieb Frank Warmerdam:
> > Tim Sutton wrote:
> > > Hi
> > >
> > > Yes I can make at least ubuntu gutsy debs for testing and probably win
> > > MSVC build (sans grass and python) installer.
> > >
> > > One concern I have is that people reintroduce c++ calls later and undo
> > > Franks good work. I wonder if its possible via cmake to restrict the
> > > build to use only the C api?
> >
> > Tim,
> >
> > I have stripped out use of the C++ include files, so adding calls
> > to the C++ API will require adding new #includes, not just an
> > inadvertent method call or anything like that.
> >
> > It is also reasonable easy to verify by doing grepping the "nm"
> > output all all the .so files for OGR, GDAL and CPL. If only the
> > C API all that should show up in nice undecorated function names.
> >
> > Best regards,
--
Dr. Marco Hugentobler
Institute of Cartography
ETH Zurich
Technical Advisor QGIS Project Steering Committee
More information about the Qgis-developer
mailing list