wiki:BuildingOnUnixWithMinimizedDrivers

Version 8 (modified by Mateusz Łoskot, 7 years ago) ( diff )

Update --without-* set

Building On Unix With Minimized Drivers

Here are the ./configure options disabling driver and features that can be safely disabled:

./configure \
    --prefix=${PREFIX} \
    --with-geos \
    --with-geotiff=internal \
    --with-hide-internal-symbols \
    --with-libtiff=internal \
    --with-libz=internal \
    --with-threads \
    --without-bsb \
    --without-cfitsio \
    --without-cryptopp \
    --without-curl \
    --without-dwgdirect \
    --without-ecw \
    --without-expat \
    --without-fme \
    --without-freexl \
    --without-gif \
    --without-gif \
    --without-gnm \
    --without-grass \
    --without-grib \
    --without-hdf4 \
    --without-hdf5 \
    --without-idb \
    --without-ingres \
    --without-jasper \
    --without-jp2mrsid \
    --without-jpeg \
    --without-kakadu \
    --without-libgrass \
    --without-libkml \
    --without-libtool \
    --without-mrf \
    --without-mrsid \
    --without-mysql \
    --without-netcdf \
    --without-odbc \
    --without-ogdi \
    --without-openjpeg \
    --without-pcidsk \
    --without-pcraster \
    --without-pcre \
    --without-perl \
    --without-pg \
    --without-php \
    --without-png \
    --without-python \
    --without-qhull \
    --without-sde \
    --without-sqlite3 \
    --without-webp \
    --without-xerces \
    --without-xml2

From r15347, you can also replace --with-libz=internal by --with-libz=no.

On my system, here are the dependencies of libgdal.so with such a build :

$ ldd libgdal.so
        linux-gate.so.1 =>  (0xffffe000)
        libgeos_c.so.1 => /usr/lib/libgeos_c.so.1 (0xb7dca000)
        libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7db2000)
        librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7da8000)
        libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7da4000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7cb9000)
        libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7c94000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7c87000)
        libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7b3d000)
        libgeos.so.2 => /usr/lib/libgeos.so.2 (0xb7a3d000)
        /lib/ld-linux.so.2 (0x80000000)

Additionnaly, if you are willing to apply the below patch, you'll get a very minimal GDAL with only GeoTIFF, Imagine HFA (for overviews in HFA format), Raw (for some VRT operations), and VRT (for gdal_translate) support for the raster part, and Shapefile and REC (needed by OpenEV) for the vector part. The python bindings will also work with that minimized build.

Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.