How do I generate asconfig.texi when compiling GNU binutils' gas from git cloned source?

224 Views Asked by At

I have cloned the binutils-gdb repository from git://sourceware.org/git/binutils-gdb.git, checked out the tag binutils-2_40 (commit 32778522c7d8777803c88684b8e428ee729f0b22), in a separate directory run ../../binutils-gdb/configure which generated a large Makefile, then run make all-gas, and I eventually get the error cp: cannot create regular file 'doc/asconfig.texi': No such file or directory.

I have "texi2any (GNU texinfo) 7.0.2" which I (only vaguely) understand is required, but the failing command is cp, so it's as if the makefile isn't building some prerequisite file for the target.

In the tarball of 2.40 from the FTP, gas/doc/asconfig.texi exists, but it doesn't in the repository.

How can I successfully compile the project?

I'm aware there are some workarounds possible, which I'm tempted to follow because I don't even care that much about the documentation in this form anyway, but I dunno - I feel like configure && make && make install should work properly, and therefore that I'm missing something obvious.

The end of the make output is as follows:

Making all in po
make[3]: Entering directory '/home/asday/code/src/github.com/asday/osdev-barebones/build/binutils/gas/po'
file=`echo ../../../../binutils-gdb/gas/po/es | sed 's,.*/,,'`.gmo \
  && rm -f $file && PATH=../src:$PATH /usr/bin/msgfmt -o $file ../../../../binutils-gdb/gas/po/es.po
file=`echo ../../../../binutils-gdb/gas/po/fi | sed 's,.*/,,'`.gmo \
  && rm -f $file && PATH=../src:$PATH /usr/bin/msgfmt -o $file ../../../../binutils-gdb/gas/po/fi.po
file=`echo ../../../../binutils-gdb/gas/po/fr | sed 's,.*/,,'`.gmo \
  && rm -f $file && PATH=../src:$PATH /usr/bin/msgfmt -o $file ../../../../binutils-gdb/gas/po/fr.po
file=`echo ../../../../binutils-gdb/gas/po/id | sed 's,.*/,,'`.gmo \
  && rm -f $file && PATH=../src:$PATH /usr/bin/msgfmt -o $file ../../../../binutils-gdb/gas/po/id.po
file=`echo ../../../../binutils-gdb/gas/po/ja | sed 's,.*/,,'`.gmo \
  && rm -f $file && PATH=../src:$PATH /usr/bin/msgfmt -o $file ../../../../binutils-gdb/gas/po/ja.po
file=`echo ../../../../binutils-gdb/gas/po/ru | sed 's,.*/,,'`.gmo \
  && rm -f $file && PATH=../src:$PATH /usr/bin/msgfmt -o $file ../../../../binutils-gdb/gas/po/ru.po
file=`echo ../../../../binutils-gdb/gas/po/rw | sed 's,.*/,,'`.gmo \
  && rm -f $file && PATH=../src:$PATH /usr/bin/msgfmt -o $file ../..
/../../binutils-gdb/gas/po/rw.po
file=`echo ../../../../binutils-gdb/gas/po/sv | sed 's,.*/,,'`.gmo \
  && rm -f $file && PATH=../src:$PATH /usr/bin/msgfmt -o $file ../../../../binutils-gdb/gas/po/sv.po
file=`echo ../../../../binutils-gdb/gas/po/tr | sed 's,.*/,,'`.gmo \
  && rm -f $file && PATH=../src:$PATH /usr/bin/msgfmt -o $file ../../../../binutils-gdb/gas/po/tr.po
file=`echo ../../../../binutils-gdb/gas/po/uk | sed 's,.*/,,'`.gmo \
  && rm -f $file && PATH=../src:$PATH /usr/bin/msgfmt -o $file ../../../../binutils-gdb/gas/po/uk.po
file=`echo ../../../../binutils-gdb/gas/po/zh_CN | sed 's,.*/,,'`.gmo \
  && rm -f $file && PATH=../src:$PATH /usr/bin/msgfmt -o $file ../../../../binutils-gdb/gas/po/zh_CN.po
make[3]: Leaving directory '/home/asday/code/src/github.com/asday/osdev-barebones/build/binutils/gas/po'
make[3]: Entering directory '/home/asday/code/src/github.com/asday/osdev-barebones/build/binutils/gas'
  GEN      doc/asconfig.texi
cp: cannot create regular file 'doc/asconfig.texi': No such file or directory
make[3]: *** [Makefile:2234: doc/asconfig.texi] Error 1
make[3]: Leaving directory '/home/asday/code/src/github.com/asday/osdev-barebones/build/binutils/gas'
make[2]: *** [Makefile:1664: all-recursive] Error 1
make[2]: Leaving directory '/home/asday/code/src/github.com/asday/osdev-barebones/build/binutils/gas'
make[1]: *** [Makefile:1010: all] Error 2
make[1]: Leaving directory '/home/asday/code/src/github.com/asday/osdev-barebones/build/binutils/gas'
make: *** [Makefile:5475: all-gas] Error 2
binutils $ 

The target at the top of that traceback is as follows:

doc/asconfig.texi: doc/$(CONFIG).texi doc/$(am__dirstamp)
    $(AM_V_at)rm -f doc/asconfig.texi
    $(AM_V_GEN)cp $(srcdir)/doc/$(CONFIG).texi doc/asconfig.texi
    $(AM_V_at)chmod u+w doc/asconfig.texi
2

There are 2 best solutions below

0
On

There seems to be a bug within the repo and that's why your seeing the issue. It was resolved in a recent commit (8034b0baeac1b209b1742b3e8fa25015191b57b8). It was missing the -p argument when copying the file. If you checkout the repo during that commit or any commit afterwards that should work. I just tried it out on my end and I was able to build successfully.

0
On

Adding the -p to the cp did not work for me. I removed the empty file gas/doc/.dirstamp that was not part of previous builds and isn't in the master branch or 2.40_branch and my make now works.