Using a CMAKE Build dh_auto_configure: says in Launchpad failed to to execute: No such file or directory

Asked by Pascal Mons on 2018-10-23

Well in my PPA https://launchpad.net/%7Eanton+/+archive/ubuntu/photo-video-apps/ I tried to build jasper packages.

It is building fine on my system Xenial 16.04 where I get for dh_auto_configure at build time:

make[1]: Entering directory '/home/ubuntu-xenial/pascal/Downloads/Launchpad/jasper/jasper-2.0.14'
dh_auto_configure -- \
 -DCMAKE_INSTALL_PREFIX=/usr \
 -DCMAKE_BUILD_TYPE=Release \
 -DCMAKE_SKIP_INSTALL_RPATH=YES \
 -DJAS_ENABLE_DOC=NO \
 -DJAS_ENABLE_SHARED=YES
 cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_INSTALL_RPATH=YES -DJAS_ENABLE_DOC=NO -DJAS_ENABLE_SHARED=YES
-- The C compiler identification is GNU 5.5.0
-- Check for working C compiler: /usr/bin/x86_64-linux-gnu-gcc
-- Check for working C compiler: /usr/bin/x86_64-linux-gnu-gcc -- works

However building for Trusty 14.04 in Launchpad I get the following
https://launchpadlibrarian.net/394560072/buildlog_ubuntu-trusty-amd64.jasper_2.0.14-1pmo1.0~trusty_BUILDING.txt.gz

make[1]: Entering directory `/<<PKGBUILDDIR>>'
dh_auto_configure -- \
  -DCMAKE_INSTALL_PREFIX=/usr \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_SKIP_INSTALL_RPATH=YES \
  -DJAS_ENABLE_DOC=NO \
  -DJAS_ENABLE_SHARED=YES
dh_auto_configure: cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_INSTALL_RPATH=YES -DJAS_ENABLE_DOC=NO -DJAS_ENABLE_SHARED=YES failed to to execute: No such file or directory
make[1]: *** [override_dh_auto_configure] Error 2
make[1]: Leaving directory `/<<PKGBUILDDIR>>'

Why is that such a difference ? And an error aborting the build for all Ubuntu releases ?
Is it because of the --parallel build ?

I've never seen that before.

the rules files is

#!/usr/bin/make -f

LDFLAGS = -Wl,--as-needed

# http://manpages.ubuntu.com/manpages/precise/man1/dpkg-buildflags.1.html
# https://www.gnu.org/software/make/manual/hoverridetml_node/Text-Functions.html
export DEB_CFLAGS_MAINT_STRIP := -O2
export DEB_CXXFLAGS_MAINT_STRIP := -O2
export DEB_CFLAGS_MAINT_APPEND := -O3
export DEB_CXXFLAGS_MAINT_APPEND := -O3

num_proc = $(shell grep -c ^processor /proc/cpuinfo)
export DEB_BUILD_OPTIONS := parallel=$(num_proc)

# https://www.debian.org/doc/debian-policy/ch-source.html
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
  NUMJOBS := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
# MAKEFLAGS += -j$(NUMJOBS)
endif

export DEB_BUILD_MAINT_OPTIONS := hardening=+all

%:
 dh $@ --parallel,buildsystem=cmake

override_dh_auto_configure:
 dh_auto_configure -- \
  -DCMAKE_INSTALL_PREFIX=/usr \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_SKIP_INSTALL_RPATH=YES \
  -DJAS_ENABLE_DOC=NO \
  -DJAS_ENABLE_SHARED=YES

override_dh_auto_build:
 dh_auto_build -- -j$(NUMJOBS)

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Colin Watson
Solved:
2018-10-23
Last query:
2018-10-23
Last reply:
2018-10-23
Best Colin Watson (cjwatson) said : #1

You're missing (at least) cmake from Build-Depends in debian/control. It works on your own system because you already have that package installed; but you haven't declared the build-dependency.

Pascal Mons (anton+) said : #2

OK sure I missed that.
Many thanks ...

The fact is that Debian no longer provides a packages since jasper moved to CMAKE builds in version 2 ...

Pascal Mons (anton+) said : #3

Thanks Colin Watson, that solved my question.