Pinentry does not support --disable-doc configure option
Open, NormalPublic

Description

Problem description

Fetching the Pinentry source code from Git repository, and then executing:

./configure --enable-maintainer-mode --disable-doc

produces following warning:

configure: WARNING: unrecognized options: --disable-doc

Configure script succeeds, however subsequent execution of:

make

fails with:

/usr/local/src/gpg-build-scripts/build/pinentry/build-aux/missing: line 81: makeinfo: command not found
WARNING: 'makeinfo' is missing on your system.
         You should only need it if you modified a '.texi' file, or
         any other file indirectly affecting the aspect of the manual.
         You might want to install the Texinfo package:
         <https://www.gnu.org/software/texinfo/>
         The spurious makeinfo call might also be the consequence of
         using a buggy 'make' (AIX, DU, IRIX), in which case you might
         want to install GNU make:
         <https://www.gnu.org/software/make/>
Makefile:404: recipe for target 'pinentry.info' failed
make[2]: *** [pinentry.info] Error 127
make[2]: Leaving directory '/usr/local/src/gpg-build-scripts/build/pinentry/doc'

Taking into account that most of other components do support --disable-doc option, and that this option removes plenty of dependencies (including Makeinfo), I believe that current behavior is a bug.

Steps to reproduce the issue

In a fresh instance of Ubuntu Xenial (booted with docker run -it ubuntu:xenial /bin/bash):

apt-get update
apt-get install -y automake bison gettext git

# Install Pinentry prerequisites from Git with `--disable-doc` configure option
# (I am not 100% sure which ones, I had libgpg-error, libgcrypt, libassuan, libksba,
# and npth all installed).
# Exact steps are not shown here.

git clone git://git.gnupg.org/pinentry
cd pinentry
./autogen.sh
./configure --enable-maintainer-mode --disable-doc
make

Expected behaviour

Pinentry should does not build documentation if --disable-doc has been passed to a ./configure script.

My Bash session

Here goes full record of my Bash session in fresh instance of Ubuntu Xenial from Docker image. Prerequisite GnuPG components (libgpg-error, libassuan, etc.) have been installed from Git head as well, but this is not shown here.

root@7194e484ac61:/usr/local/src/gpg-build-scripts/build# git clone git://git.gnupg.org/pinentry
Cloning into 'pinentry'...
remote: Counting objects: 3206, done.
remote: Compressing objects: 100% (3193/3193), done.
remote: Total 3206 (delta 2245), reused 0 (delta 0)
Receiving objects: 100% (3206/3206), 1.20 MiB | 764.00 KiB/s, done.
Resolving deltas: 100% (2245/2245), done.
Checking connectivity... done.
root@7194e484ac61:/usr/local/src/gpg-build-scripts/build# cd pinentry/
root@7194e484ac61:/usr/local/src/gpg-build-scripts/build/pinentry# ./autogen.sh
*** Activating trailing whitespace git pre-commit hook. ***
    For more information see this thread:
      https://mail.gnome.org/archives/desktop-devel-list/2009-May/msg00084.html
    To deactivate this pre-commit hook again move .git/hooks/pre-commit
    and .git/hooks/pre-commit.sample out of the way.
'.git/hooks/pre-commit.sample' -> '.git/hooks/pre-commit'
autogen.sh: Running aclocal -I m4 ...
autogen.sh: Running autoheader...
autogen.sh: Running automake --gnu ...
autogen.sh: Running autoconf ...
autogen.sh: You may now run:
  ./configure --enable-maintainer-mode && make
root@7194e484ac61:/usr/local/src/gpg-build-scripts/build/pinentry# ./configure --enable-maintainer-mode --disable-doc
configure: WARNING: unrecognized options: --disable-doc
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking whether make sets $(MAKE)... (cached) yes
checking whether build environment is sane... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking how to run the C preprocessor... gcc -E
checking for ranlib... ranlib
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking whether ln -s works... yes
checking for pkg-config... no
checking for windres... no
checking for gitlog-to-changelog... no
checking if gcc ignores unknown -Wno-* options... yes
checking if gcc supports -Wdeclaration-after-statement... yes
checking if gcc supports -Wpointer-arith... yes
checking for ANSI C header files... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking termio.h usability... yes
checking termio.h presence... yes
checking for termio.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking utime.h usability... yes
checking utime.h presence... yes
checking for utime.h... yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking for seteuid... yes
checking for stpcpy... yes
checking for mmap... yes
checking for stat... yes
checking for mlock... yes
checking whether mlock is broken... no
checking for uint32_t... yes
checking for gpg-error-config... /usr/local/bin/gpg-error-config
checking for GPG Error - version >= 1.16... yes (1.33-beta55)
checking for libassuan-config... /usr/local/bin/libassuan-config
checking for LIBASSUAN - version >= 2.1.0... yes (2.5.2-beta26)
checking LIBASSUAN API version... okay
checking for byte typedef... no
checking for ulong typedef... yes
checking for setcap... /sbin/setcap
checking for cap_set_proc in -lcap... no
checking for ncursesw... checking for ncurses... checking for initscr in -lncursesw... no
checking for initscr in -lncurses... yes
checking for ncurses include dir... none
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking for iconv... yes
checking for iconv declaration...
         extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking if Unix domain socket is supported... yes
checking for pkg-config... no
checking for gtk+-2.0 >= 2.4.0... ./configure: line 9647: no: command not found
./configure: line 9655: no: command not found
no
configure: WARNING: pkg-config could not find the module gtk+-2.0
checking for gcr-3,gcr-base-3... ./configure: line 9742: no: command not found
./configure: line 9750: no: command not found
no
configure: WARNING: pkg-config could not find the module gcr-3,gcr-base-3
checking for libsecret-1... ./configure: line 9848: no: command not found
./configure: line 9856: no: command not found
no
configure: WARNING: pkg-config could not find the module libsecret-1
checking for Qt5Core >= 5.0.0 Qt5Gui >= 5.0.0 Qt5Widgets >= 5.0.0... ./configure: line 9970: no: command not found
./configure: line 9978: no: command not found
no
./configure: line 9996: no: command not found
checking for QtCore >= 4.6.0 QtGui >= 4.6.0... ./configure: line 10425: no: command not found
./configure: line 10433: no: command not found
no
checking for fltk-config... no
configure: WARNING: fltk-config is not found
checking that generated files are newer than configure... done
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating m4/Makefile
config.status: creating secmem/Makefile
config.status: creating pinentry/Makefile
config.status: creating curses/Makefile
config.status: creating tty/Makefile
config.status: creating efl/Makefile
config.status: creating emacs/Makefile
config.status: creating gtk+-2/Makefile
config.status: creating gnome3/Makefile
config.status: creating qt/Makefile
config.status: creating tqt/Makefile
config.status: creating w32/Makefile
config.status: creating fltk/Makefile
config.status: creating doc/Makefile
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
configure: WARNING: unrecognized options: --disable-doc
configure:

	Pinentry v1.1.1-beta12 has been configured as follows:

	Revision:  d0eaec8  (53482)
	Platform:  x86_64-pc-linux-gnu

	Curses Pinentry ..: yes
	TTY Pinentry .....: maybe
	Emacs Pinentry ...: no
	EFL Pinentry .....: no
	GTK+-2 Pinentry ..: no
	GNOME 3 Pinentry .: no
	Qt Pinentry ......: no
	TQt Pinentry .....: no
	W32 Pinentry .....: no
	FLTK Pinentry ....: no

	Fallback to Curses: yes
	Emacs integration : yes

	libsecret ........: no

	Default Pinentry .: pinentry-curses

root@7194e484ac61:/usr/local/src/gpg-build-scripts/build/pinentry# make
make  all-recursive
make[1]: Entering directory '/usr/local/src/gpg-build-scripts/build/pinentry'
Making all in m4
make[2]: Entering directory '/usr/local/src/gpg-build-scripts/build/pinentry/m4'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/usr/local/src/gpg-build-scripts/build/pinentry/m4'
Making all in secmem
make[2]: Entering directory '/usr/local/src/gpg-build-scripts/build/pinentry/secmem'
gcc -DHAVE_CONFIG_H -I. -I..   -Wall  -g -O2 -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wformat -Wno-format-y2k -Wformat-security -W -Wno-sign-compare -Wno-missing-field-initializers -Wdeclaration-after-statement -Wno-pointer-sign -Wpointer-arith -MT secmem.o -MD -MP -MF .deps/secmem.Tpo -c -o secmem.o secmem.c
mv -f .deps/secmem.Tpo .deps/secmem.Po
gcc -DHAVE_CONFIG_H -I. -I..   -Wall  -g -O2 -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wformat -Wno-format-y2k -Wformat-security -W -Wno-sign-compare -Wno-missing-field-initializers -Wdeclaration-after-statement -Wno-pointer-sign -Wpointer-arith -MT util.o -MD -MP -MF .deps/util.Tpo -c -o util.o util.c
mv -f .deps/util.Tpo .deps/util.Po
rm -f libsecmem.a
ar cru libsecmem.a secmem.o util.o
ar: `u' modifier ignored since `D' is the default (see `U')
ranlib libsecmem.a
make[2]: Leaving directory '/usr/local/src/gpg-build-scripts/build/pinentry/secmem'
Making all in pinentry
make[2]: Entering directory '/usr/local/src/gpg-build-scripts/build/pinentry/pinentry'
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/local/include -I/usr/local/include  -I../secmem -Wall  -g -O2 -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wformat -Wno-format-y2k -Wformat-security -W -Wno-sign-compare -Wno-missing-field-initializers -Wdeclaration-after-statement -Wno-pointer-sign -Wpointer-arith -MT pinentry.o -MD -MP -MF .deps/pinentry.Tpo -c -o pinentry.o pinentry.c
mv -f .deps/pinentry.Tpo .deps/pinentry.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/local/include -I/usr/local/include  -I../secmem -Wall  -g -O2 -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wformat -Wno-format-y2k -Wformat-security -W -Wno-sign-compare -Wno-missing-field-initializers -Wdeclaration-after-statement -Wno-pointer-sign -Wpointer-arith -MT argparse.o -MD -MP -MF .deps/argparse.Tpo -c -o argparse.o argparse.c
mv -f .deps/argparse.Tpo .deps/argparse.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/local/include -I/usr/local/include  -I../secmem -Wall  -g -O2 -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wformat -Wno-format-y2k -Wformat-security -W -Wno-sign-compare -Wno-missing-field-initializers -Wdeclaration-after-statement -Wno-pointer-sign -Wpointer-arith -MT password-cache.o -MD -MP -MF .deps/password-cache.Tpo -c -o password-cache.o password-cache.c
mv -f .deps/password-cache.Tpo .deps/password-cache.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/local/include -I/usr/local/include  -I../secmem -Wall  -g -O2 -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wformat -Wno-format-y2k -Wformat-security -W -Wno-sign-compare -Wno-missing-field-initializers -Wdeclaration-after-statement -Wno-pointer-sign -Wpointer-arith -MT pinentry-emacs.o -MD -MP -MF .deps/pinentry-emacs.Tpo -c -o pinentry-emacs.o pinentry-emacs.c
mv -f .deps/pinentry-emacs.Tpo .deps/pinentry-emacs.Po
rm -f libpinentry.a
ar cru libpinentry.a pinentry.o argparse.o password-cache.o pinentry-emacs.o
ar: `u' modifier ignored since `D' is the default (see `U')
ranlib libpinentry.a
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/local/include -I/usr/local/include  -I../secmem -Wall  -g -O2 -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wformat -Wno-format-y2k -Wformat-security -W -Wno-sign-compare -Wno-missing-field-initializers -Wdeclaration-after-statement -Wno-pointer-sign -Wpointer-arith -MT libpinentry_curses_a-pinentry-curses.o -MD -MP -MF .deps/libpinentry_curses_a-pinentry-curses.Tpo -c -o libpinentry_curses_a-pinentry-curses.o `test -f 'pinentry-curses.c' || echo './'`pinentry-curses.c
mv -f .deps/libpinentry_curses_a-pinentry-curses.Tpo .deps/libpinentry_curses_a-pinentry-curses.Po
rm -f libpinentry-curses.a
ar cru libpinentry-curses.a libpinentry_curses_a-pinentry-curses.o
ar: `u' modifier ignored since `D' is the default (see `U')
ranlib libpinentry-curses.a
make[2]: Leaving directory '/usr/local/src/gpg-build-scripts/build/pinentry/pinentry'
Making all in curses
make[2]: Entering directory '/usr/local/src/gpg-build-scripts/build/pinentry/curses'
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/local/include -I/usr/local/include   -I../pinentry -Wall  -g -O2 -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wformat -Wno-format-y2k -Wformat-security -W -Wno-sign-compare -Wno-missing-field-initializers -Wdeclaration-after-statement -Wno-pointer-sign -Wpointer-arith -MT pinentry-curses.o -MD -MP -MF .deps/pinentry-curses.Tpo -c -o pinentry-curses.o pinentry-curses.c
mv -f .deps/pinentry-curses.Tpo .deps/pinentry-curses.Po
gcc  -g -O2 -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wformat -Wno-format-y2k -Wformat-security -W -Wno-sign-compare -Wno-missing-field-initializers -Wdeclaration-after-statement -Wno-pointer-sign -Wpointer-arith   -o pinentry-curses pinentry-curses.o ../pinentry/libpinentry.a ../pinentry/libpinentry-curses.a ../secmem/libsecmem.a -lassuan -L/usr/local/lib -lgpg-error -L/usr/local/lib -lgpg-error   -lncurses
make[2]: Leaving directory '/usr/local/src/gpg-build-scripts/build/pinentry/curses'
Making all in doc
make[2]: Entering directory '/usr/local/src/gpg-build-scripts/build/pinentry/doc'
Updating ./version.texi
restore=: && backupdir=".am$$" && \
am__cwd=`pwd` && CDPATH="${ZSH_VERSION+.}:" && cd . && \
rm -rf $backupdir && mkdir $backupdir && \
if (/bin/bash /usr/local/src/gpg-build-scripts/build/pinentry/build-aux/missing makeinfo --version) >/dev/null 2>&1; then \
  for f in pinentry.info pinentry.info-[0-9] pinentry.info-[0-9][0-9] pinentry.i[0-9] pinentry.i[0-9][0-9]; do \
    if test -f $f; then mv $f $backupdir; restore=mv; else :; fi; \
  done; \
else :; fi && \
cd "$am__cwd"; \
if /bin/bash /usr/local/src/gpg-build-scripts/build/pinentry/build-aux/missing makeinfo   -I . \
 -o pinentry.info pinentry.texi; \
then \
  rc=0; \
  CDPATH="${ZSH_VERSION+.}:" && cd .; \
else \
  rc=$?; \
  CDPATH="${ZSH_VERSION+.}:" && cd . && \
  $restore $backupdir/* `echo "./pinentry.info" | sed 's|[^/]*$||'`; \
fi; \
rm -rf $backupdir; exit $rc
/usr/local/src/gpg-build-scripts/build/pinentry/build-aux/missing: line 81: makeinfo: command not found
WARNING: 'makeinfo' is missing on your system.
         You should only need it if you modified a '.texi' file, or
         any other file indirectly affecting the aspect of the manual.
         You might want to install the Texinfo package:
         <https://www.gnu.org/software/texinfo/>
         The spurious makeinfo call might also be the consequence of
         using a buggy 'make' (AIX, DU, IRIX), in which case you might
         want to install GNU make:
         <https://www.gnu.org/software/make/>
Makefile:404: recipe for target 'pinentry.info' failed
make[2]: *** [pinentry.info] Error 127
make[2]: Leaving directory '/usr/local/src/gpg-build-scripts/build/pinentry/doc'
Makefile:479: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/usr/local/src/gpg-build-scripts/build/pinentry'
Makefile:420: recipe for target 'all' failed
make: *** [all] Error 2

Details

Version
Pinentry v1.1.1-beta12, revision d0eaec8 (current master)
skalee created this task.Mon, Nov 19, 10:17 PM
skalee updated the task description. (Show Details)
werner triaged this task as Normal priority.Tue, Nov 20, 8:06 AM
werner added a subscriber: werner.

Well, that is a detailed bug report. Thanks.

Did you really only unpack the pinentry tarball or did you accidentally touched on any the files required for building the documentation? Any special mount options or unusual file system used for your working directory?

I wasn't using tarballs. I have fetched code from Git (git clone git://git.gnupg.org/pinentry).

However, the problem is not that I am unable to build pinentry. I can actually do it, I just need to make sure that makeinfo is in $PATH (for instance, by installing texinfo package in Ubuntu Xenial).

The problem is that I have to do it, because pinentry is the only package which does not support --disable-doc option, contrary to gnupg-error, libassuan etc. And I avoid building documentation because it isn't needed in my use case, but adds plenty of dependencies.

BTW I am aware that Git repository does not contain many files which are prebuilt in tarballs. I am okay with that, I know the difference. I am just reporting that pinentry's configure script is missing an option, which is clearly needed and which is present in other components.