[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Option autoconf option --debug no longer working
From: |
Thomas Jahns |
Subject: |
Re: Option autoconf option --debug no longer working |
Date: |
Mon, 4 Sep 2023 14:57:21 +0200 |
Following up on this, I think this is because autom4te calls mktmpdir before
parsing command line arguments:
## -------------- ##
## Main program. ##
## -------------- ##
mktmpdir ('am4t');
load_configuration ($ENV{'AUTOM4TE_CFG'} || "$pkgdatadir/autom4te.cfg");
load_configuration ("$ENV{'HOME'}/.autom4te.cfg")
if exists $ENV{'HOME'} && -f "$ENV{'HOME'}/.autom4te.cfg";
load_configuration (".autom4te.cfg")
if -f ".autom4te.cfg";
parse_args;
In this order it creates the am4t... directory with the UNLINK option always
being 1, i.e. !$debug while previously Autom4te::General had a custom END block
that deleted the temporary files conditionally and hence used the value of
$debug set by Autom4te::General::getopt.
I'm not sure if load_configuration somehow needs the temporary directory or if
parse_args could be moved to precede all of the main program. I'll try that
next but wanted to keep you informed of my ongoing investigation.
Kind regards, Thomas
> On Sep 4, 2023, at 13:15 , Thomas Jahns <jahns@dkrz.de> wrote:
>
> Dear autoconf maintainers,
>
> when trying to port another piece of software to use autoconf 2.71 I noticed
> a problem I wanted to debug with the autoreconf --debug option. But it seems
> autoconf now deletes the temporary files in all paths.
>
> While the 2.69 version I'm currently using preserves files in /tmp, when
> swapping the PATH to use autoconf 2.71, autoconf always unlinks the files
> there (and removes the temporary directory) as verified with strace -f -e
> rmdir,unlink on Linux x86_64.
>
> I tried
>
> autoconf --debug --verbose
>
> in a minimal autoconf directory like this:
>
> $ autoconf --debug --verbose 2>&1 | grep /tmp
> autom4te: formatting traces for `/tmp/am4tYtdOcp/dependencies': include,
> m4_include
> autom4te: formatting traces for `/tmp/am4tYtdOcp/warnings': _m4_warn
> autom4te: reading /tmp/am4tYtdOcp/warnings
> $ ls /tmp/am4tYtdOcp
> dependencies traces.m4 warnings
> $ module load autoconf-2.71-gcc-6.3.0-rj5ute2
> $ autoconf --debug --verbose 2>&1 | grep /tmp
> autom4te: formatting traces for '/tmp/am4toeE5oa/warnings': _m4_warn
> autom4te: reading /tmp/am4toeE5oa/warnings
> autom4te: formatting traces for '/tmp/am4toeE5oa/patterns': m4_pattern_allow,
> m4_pattern_forbid
> $ ls /tmp/am4toeE5oa/
> ls: cannot access '/tmp/am4toeE5oa/': No such file or directory
> $ cat configure.ac
> AC_INIT([hello], [1.0])
> AC_CONFIG_AUX_DIR([build-aux])
> AC_OUTPUT
> $ strace -f -e rmdir,unlink autoconf --debug --verbose 2>&1 | grep -E
> 'unlink|rmdir|/tmp'
> autom4te: formatting traces for '/tmp/am4tciBmIE/dependencies': include,
> m4_include
> autom4te: formatting traces for '/tmp/am4tciBmIE/warnings': _m4_warn
> autom4te: reading /tmp/am4tciBmIE/warnings
> unlink("traces.m4") = 0
> unlink("dependencies") = 0
> unlink("warnings") = 0
> rmdir("/tmp/am4tciBmIE") = 0
> $ ls /tmp/am4tciBmIE
> ls: cannot access '/tmp/am4tciBmIE': No such file or directory
>
> Kind regards,
> Thomas
>
>
>
--
Thomas Jahns
HPC-Group
DKRZ GmbH, Department: Application software
Deutsches Klimarechenzentrum
Bundesstraße 45a
D-20146 Hamburg
Phone: +49-40-460094-151
Fax: +49-40-460094-270
Email: Thomas Jahns <jahns@dkrz.de>
smime.p7s
Description: S/MIME cryptographic signature