[gdal-dev] Building GDAL on linux with minimal drivers
Dmitry Baryshnikov
bishop.dev at gmail.com
Thu Mar 30 03:06:10 PDT 2017
Hi Gane,
You can try to use Cmake build of GDAL
(https://github.com/nextgis-borsch/lib_gdal).
It can be configured via CMake-gui or command line.
This is an example of minimal static build of GDAL -
https://github.com/nextgis/nextgis_datastore/blob/master/cmake/extlib.cmake#L94-L175
Best regards,
Dmitry
29.03.17 12:17, Gane R пишет:
> 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/20170330/9c9f5092/attachment-0001.html>
More information about the gdal-dev
mailing list