You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by Mohammad Akhlaghi <mo...@akhlaghi.org> on 2019/11/03 13:49:34 UTC
dist failure because of long filename
Dear log4cxx developers,
I was packaging the most recent commit of log4xx (014954db) into a
tarball. But to clearly identify the tarball, I modified the `AC_INIT'
setting of `configure.ac' like below:
AC_INIT([apachelog4cxx], [0.10.0-603-014954db])
The resulting tarball after `make dist' was thus
`apachelog4cxx-0.10.0-603-014954db.tar.gz'
However, after trying to build from the tarball, the build crashed
because of a missing `throwableinformationpatternconverter.h'.
After inspecting the outputs of `make dist', I noticed this tar warning:
tar:
apachelog4cxx-0.10.0-603-014954db/src/main/include/log4cxx/pattern/throwableinformationpatternconverter.h:
file name is too long (max 99); not dumped
This happens because the ancient V7 format of Tar is the default used by
Automake only accepts names that are a maximum of 99 characters (as
described in [1]). I thus had to manually add `tar-ustar' to
`AM_INIT_AUTOMAKE' of `configure.ac' (line below), and after I did this
the problem was fixed.
AM_INIT_AUTOMAKE([foreign subdir-objects -Wall tar-ustar])
According to the Automake manual [2], the `tar-ustar' is already
supported by many systems and allows names as long as 255 characters.
Since log4xx has very long file names like
`src/main/include/log4cxx/pattern/throwableinformationpatternconverter.h',
to allow packagers some breathing space to exactly identify the tarball
(with a Git commit short-checksum, like I did), it may be good to adopt
the `tar-ustar' format by default in the main branch, or decrease the
length of long headers like this one.
Cheers,
Mohammad
[1] https://noiselabs.io/tar-file-name-is-too-long-max-99/
[2]
https://www.gnu.org/software/automake/manual/html_node/List-of-Automake-options.html