2018-07-19 06:07 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001315Orfeo Toolbox (OTB)Generalpublic2017-07-27 15:04
Assigned Torashadkm 
PrioritynormalSeverityminorReproducibilityhave not tried
Summary0001315: Superbuild fails to build GeoTiff on minimalist environment
DescriptionUsing the following Dockerfile :

FROM ubuntu:16.04

ENV DEBIAN_FRONTEND=noninteractive \

# Prepare base system
RUN apt-get update -qq \
 && apt-get upgrade -y \
 && apt-get install -y wget python cmake g++ \
 && rm -rf /var/lib/apt/lists/*
RUN mkdir -p /otb \
  && cd /otb \
  && wget -q -O otb.tar.gz https://www.orfeo-toolbox.org/packages/OTB-${OTB_VERSION}.tar.gz \
  && mkdir /otb/src \
  && tar xf otb.tar.gz -C /otb/src --strip-components 1 \
  && mkdir -p /otb/build \
  && cd /otb/build \
  && cmake -D CMAKE_INSTALL_PREFIX=/otb/install /otb/src/SuperBuild

RUN cd /otb/build \
  && make GEOTIFF

GeoTIFF fails to configure, and complains it does not find zlib.h, while it has just been built before.

The environment is voluntarily minimalist, so does not include any "-dev" package.

The build logs say :

checking zlib.h usability... no
checking zlib.h presence... no
checking for zlib.h... no
configure: error: cannot find zlib.h, bailing out
CMakeFiles/GEOTIFF.dir/build.make:112: recipe for target 'GEOTIFF/src/GEOTIFF-stamp/GEOTIFF-configure' failed
make[3]: *** [GEOTIFF/src/GEOTIFF-stamp/GEOTIFF-configure] Error 1
CMakeFiles/Makefile2:989: recipe for target 'CMakeFiles/GEOTIFF.dir/all' failed
make[2]: *** [CMakeFiles/GEOTIFF.dir/all] Error 2
CMakeFiles/Makefile2:1001: recipe for target 'CMakeFiles/GEOTIFF.dir/rule' failed
make[1]: *** [CMakeFiles/GEOTIFF.dir/rule] Error 2
Makefile:430: recipe for target 'GEOTIFF' failed
make: *** [GEOTIFF] Error 2
Steps To ReproduceDrop the Dockerfile somewhere.
Inside the directory where the Dockerfile exists, run :

   docker build .
TagsNo tags attached.
Attached Files




rashadkm (developer)

can you post contents of GEOTIFF-cfgcmd.txt file ?

it is in GEOTIFF/tmp/ of SuperBuild build directory.


julienm (developer)

I did not keep my intermediate layers since they generated errors.

Using docker (as described above) or any other container technology should help catching errors when building OTB on minimalist base systems.

Also would help documenting the required base packages to build the Superbuild. Currently I'm in trial-and-errors for installing the Superbuild in such minimalist environment.


rashadkm (developer)

following workaround works with zlib.h problem

CFLAGS='-I/home/otbval/exp/otb/superbuild_install/include' gmake GEOTIFF

maybe add them in SB_CONFIGURE_ENV ?

or switch to CMake and try avoid autoconf project as much as possible.

we are forced to use them in some cases, identify, fix, push patch to upstream


rashadkm (developer)

fixed in update_superbuild_6.2 branch

-Issue History
Date Modified Username Field Change
2016-11-28 19:22 julienm New Issue
2016-11-29 11:02 rashadkm Note Added: 0003876
2016-11-29 14:47 julienm Note Added: 0003879
2017-01-25 10:32 rashadkm Assigned To => rashadkm
2017-01-25 10:32 rashadkm Status new => assigned
2017-01-26 09:54 rashadkm Note Added: 0003961
2017-04-05 10:22 poughov Assigned To rashadkm =>
2017-07-27 15:04 rashadkm Note Added: 0004247
2017-07-27 15:04 rashadkm Status assigned => resolved
2017-07-27 15:04 rashadkm Resolution open => fixed
2017-07-27 15:04 rashadkm Assigned To => rashadkm
+Issue History