Build failure with pbuilder-dist xenial build

330 Views Asked by At

Why doesn't it build? Part of the problem is output as follows.

Making distclean in src
make[2]: Entering directory '/build/opensh-0.1/src'
 cd .. && /bin/sh ./config.status src/Makefile depfiles
config.status: creating src/Makefile
./config.status: 1517: ./config.status: gawk: not found
config.status: error: could not create src/Makefile
Makefile:689: recipe for target 'Makefile' failed
make[2]: *** [Makefile] Error 127
make[2]: Leaving directory '/build/opensh-0.1/src'
Makefile:810: recipe for target 'distclean-recursive' failed
make[1]: *** [distclean-recursive] Error 1
make[1]: Leaving directory '/build/opensh-0.1'
dh_auto_clean: make -j1 distclean returned exit code 2
debian/rules:18: recipe for target 'clean' failed
make: *** [clean] Error 2
dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit status 2
I: copying local configuration
E: Failed autobuilding of package
I: unmounting dev/pts filesystem
I: unmounting run/shm filesystem
I: unmounting proc filesystem
I: cleaning the build env 
I: removing directory /var/cache/pbuilder/build/23507 and its subdirectories

I definitely have gawk installed and there's nothing strange about my configuration. My debian/control is

$ more debian/control 
Source: opensh
Section: utils
Priority: optional
Maintainer: Niklas Larsson <[email protected]>
Build-Depends: debhelper (>=9),autotools-dev
Standards-Version: 3.9.6
Homepage: <insert the upstream URL, if relevant>
#Vcs-Git: git://anonscm.debian.org/collab-maint/opensh.git
#Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/opensh.git

Package: opensh
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: <insert up to 60 chars description>
 <insert long description, indented with spaces>
1

There are 1 best solutions below

2
On BEST ANSWER

The debian/control file is incorrect. gawk is not a required or build-essential package, so it is not included in a default pbuilder environment. If it is required by the build process, you need to list it explicitly:

Build-Depends: debhelper (>=9), autotools-dev, gawk

It does not matter that it is installed outside of the pbuilder environment. The environment is deliberately kept minimal to enforce correct build dependencies.