Yet another Autotools problem... I'm working on Fedora 27 and I am trying to build libidn and libidn2. I need configure; make; make install
to actually work. The machines I need it to work on only have Autoconf, Automake, Autopoint, Libtool and compiler tools. They don't have anything else, like <something>2html
or <something>2pdf
so I cannot build documentation. I also cannot run autoreconf
per the manual because that is broken too.
I don't know why the tools try to build the docs because I disable them with --disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf
. I've tried to work around it with HELP2MAN=true
and MAKEINFO=true
, but Autotools finds another way to break:
gmake[2]: Entering directory '/home/Build-Scripts/libidn-1.33/doc'
echo '# This file is automatically generated. DO NOT EDIT! -*- makefile -*-' > Makefile.gdoc
echo >> Makefile.gdoc
echo 'gdoc_TEXINFOS =' >> Makefile.gdoc
echo 'gdoc_MANS =' >> Makefile.gdoc
echo >> Makefile.gdoc
for file in ../lib/idna.c ../lib/nfkc.c ../lib/pr29.c ../lib/punycode.c ../lib/stringprep.c ../lib/tld.c ../lib/toutf8.c ../lib/version.c ../lib/idn-free.c ../lib/strerror-idna.c ../lib/strerror-pr29.c ../lib/strerror-punycode.c ../lib/strerror-stringprep.c ../lib/strerror-tld.c; do \
shortfile=`basename $file`; \
echo "#" >> Makefile.gdoc; \
echo "### $shortfile" >> Makefile.gdoc; \
echo "#" >> Makefile.gdoc; \
echo "gdoc_TEXINFOS += texi/$shortfile.texi" >> Makefile.gdoc; \
echo "texi/$shortfile.texi: $file" >> Makefile.gdoc; \
echo 'TABmkdir -p `dirname $@`' | sed "s/TAB/ /" >> Makefile.gdoc; \
echo 'TAB$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) $< > $@' | sed "s/TAB/ /" >> Makefile.gdoc; \
echo >> Makefile.gdoc; \
functions=`perl ./gdoc -listfunc $file`; \
for function in $functions; do \
echo "# $shortfile: $function" >> Makefile.gdoc; \
echo "gdoc_TEXINFOS += texi/$function.texi" >> Makefile.gdoc; \
echo "texi/$function.texi: $file" >> Makefile.gdoc; \
echo 'TABmkdir -p `dirname $@`' | sed "s/TAB/ /" >> Makefile.gdoc; \
echo 'TAB$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function'" $function"' $< > $@' | sed "s/TAB/ /" >> Makefile.gdoc; \
echo >> Makefile.gdoc; \
echo "gdoc_MANS += man/$function.3" >> Makefile.gdoc; \
echo "man/$function.3: $file" >> Makefile.gdoc; \
echo 'TABmkdir -p `dirname $@`' | sed "s/TAB/ /" >> Makefile.gdoc; \
echo 'TAB$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function'" $function"' $< > $@' | sed "s/TAB/ /" >> Makefile.gdoc; \
echo >> Makefile.gdoc; \
done; \
echo >> Makefile.gdoc; \
done
gmake Makefile
gmake[3]: Entering directory '/home/Build-Scripts/libidn-1.33/doc'
cd .. && automake --gnu doc/Makefile
configure.ac:25: error: version mismatch. This is Automake 1.15.1,
configure.ac:25: but the definition used by this AM_INIT_AUTOMAKE
configure.ac:25: comes from Automake 1.14.1. You should recreate
configure.ac:25: aclocal.m4 with aclocal and run automake again.
gmake[3]: *** [Makefile:1494: Makefile.in] Error 63
gmake[3]: Leaving directory '/home/Build-Scripts/libidn-1.33/doc'
gmake[2]: *** [Makefile:2205: Makefile.gdoc] Error 2
gmake[2]: Leaving directory '/home/Build-Scripts/libidn-1.33/doc'
gmake[1]: *** [Makefile:1333: all-recursive] Error 1
gmake[1]: Leaving directory '/home/Build-Scripts/libidn-1.33'
gmake: *** [Makefile:1235: all] Error 2
I find it incredibly hard to believe Automake-1.14 is required; and Automake-1.15 cannot be used. I don't care about the package version checks so I want to try to skip them next.
How do I fix this problem?
Stepping back to 10,000 feet, does Autotools have anyone with user interface experience to provide input for some of their decisions? Or, what is so broken with Autotools that they feel the need to break my build because my version of Automake is newer than the package was configured with? Who is the idiot who made that brilliant decision?
Here is how it is configured:
PKG_CONFIG_PATH="/usr/local/lib64/pkgconfig" \
CPPFLAGS="-I/usr/local/include -DNDEBUG" \
CFLAGS= -m64 -march=native -fPIC" \
CXXFLAGS= -m64 -march=native -fPIC" \
LDFLAGS="-L/usr/local/lib64 -m64 -Wl,-R,/usr/local/lib64 -Wl,--enable-new-dtags" \
LIBS="-ldl -lpthread" \
./configure --prefix="/usr/local" --libdir="/usr/local/lib64" \
--enable-shared
# --disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf
Here is how make
is called:
MAKE_FLAGS=("-j" "$MAKE_JOBS")
MAKE_FLAGS+=("ACLOCAL=aclocal")
MAKE_FLAGS+=("AUTOCONF=autoconf")
MAKE_FLAGS+=("AUTOHEADER=autoheader")
MAKE_FLAGS+=("AUTOMAKE=automake")
MAKE_FLAGS+=("PERL=perl")
MAKE_FLAGS+=("HELP2MAN=true")
MAKE_FLAGS+=("MAKEINFO=true")
if ! "$MAKE" "${MAKE_FLAGS[@]}"
then
echo "Failed to build IDN"
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi