[gdal-dev] Building GDAL on linux with minimal drivers

Ari Jolma ari.jolma at gmail.com
Wed Mar 29 07:00:05 PDT 2017


Gane,

The reason for the errors below are because you left out MapInfo and 
JSON driver. Parts of them are used by other drivers. I tried some time 
ago to try to build a minimal GDAL but it seemed to be not so simple and 
I did not succeed.

If you succeed, please update the Wiki page.

Best regards,

Ari


29.03.2017, 12:17, Gane R kirjoitti:
> Hi all,
>
> I am looking for building gdal with minimal set of drivers like gdal 
> with geotiff, jpg, png and sqlite gpkg
>
> so it should do basic warp geotiff and work with geopkg raster. I 
> don't need OGR part I need the core, alg and raster tif, gpkg, jpg and 
> png alone is enought.
> the problem is I get a fat static lib. I want to reduce its size.
>
> I tried to follow the post 
> https://trac.osgeo.org/gdal/wiki/BuildingOnUnixWithMinimizedDrivers It 
> seems it is old.
>
> When I build i get error during building the apps like gdalinfo, 
> gdalwarp ....
>
> Any suggestions
>
> my ogr/ogrsf_frmts/GNUmakefile  is
> like
>
> include ../../GDALmake.opt
>
> SUBDIRS-yes    := \
>     generic rec shape
>
> SUBDIRS-$(HAVE_DODS)    += dods
> SUBDIRS-$(HAVE_DWGDIRECT) += dxfdwg
> SUBDIRS-$(HAVE_FME)    += fme
> SUBDIRS-$(HAVE_GRASS)    += grass
> SUBDIRS-$(HAVE_IDB)    += idb
>
> I get the following error
>
> /home/user/home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined 
> reference to `TABINDFile::~TABINDFile()'
> /home/user/home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined 
> reference to `TABINDFile::FindNext(int, unsigned char*)'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `gdal_json_object_object_add'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `TABINDFile::Open(char const, char const, int)'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `OGRMemLayer::CreateField(OGRFieldDefn*, int)'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `gdal_json_object_to_file'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `MITABSpatialRef2CoordSys(OGRSpatialReference*)'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `gdal_json_tokener_free'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `gdal_json_object_new_int64'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `gdal_json_object_get_string'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `OGRMemLayer::GetFeatureCount(int)'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `TABINDFile::BuildKey(int, int)'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `gdal_json_object_array_add'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `gdal_json_object_new_object'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `OGRXPlane_ExtendPosition(double, double, double, double, double*, 
> double*)'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `OGRMemLayer::SetNextByIndex(long long)'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `OGRMemLayer::CreateGeomField(OGRGeomFieldDefn*, int)'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `OGRMemLayer::ResetReading()'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `OGRMemLayer::ICreateFeature(OGRFeature*)'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `OGRXPlane_Distance(double, double, double, double)'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `TABINDFile::AddEntry(int, unsigned char*, int)'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `gdal_json_object_put'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `json_object_new_double_with_precision'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `OGRMemLayer::TestCapability(char const*)'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `OGRMemLayer::DeleteFeature(long long)'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `gdal_json_object_new_int'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `TABINDFile::Close()'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `gdal_json_object_get_type'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `OGRMemLayer::GetNextFeature()'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `OGRMemLayer::OGRMemLayer(char const, OGRSpatialReference, 
> OGRwkbGeometryType)'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `TABINDFile::BuildKey(int, char const*)'
> /home/user/x64/gdal-2.1.0/.libs/libgdal.so: undefined reference to 
> `gdal_json_object_from_file'
>
> Thanks
> Gane
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170329/e1f4dcb8/attachment-0001.html>


More information about the gdal-dev mailing list