Re: Texinfo 7.2.90 build with mingw.org's MinGW: testing

[email protected]
Newsgroups gmane.comp.tex.texinfo.bugs
Message-ID <[email protected]>
On Sun, Jan 18, 2026 at 06:31:07PM +0200, Eli Zaretskii wrote:
> > Date: Sun, 18 Jan 2026 16:49:38 +0100
> > From: [email protected]
> > Cc: [email protected], [email protected]
> > 
> > On Sat, Jan 17, 2026 at 12:40:07PM +0200, Eli Zaretskii wrote:
> > > AFAICT, the only differences are:
> > > 
> > >   . I get diffs, whereas you don't
> > >   . in my case the command says TEST=1, not TEST=2
> > >   . the exit status is 1 and not 0
> > > 
> > > Does this give any clues as to what is going on?
> > 
> > Not really.  If TEST=2, there are additional checks of reference count
> > of Perl objects, you probably do not have the modules needed by that.
> > It is not important, the bugs that can be found like that are not
> > important bugs and probably not platform dependent.  So TEST=1 is ok,
> > and should not interfere with this test.
> > 
> > Maybe something that could be done easily to check the file name used
> > for the Info file would be to call texi2any.pl with --verbose, so like:
> > 
> > /d/usr/Perl/bin/perl -w ./..//perl/texi2any.pl  --force --conf-dir ./../perl/t/init/ --conf-dir ./../perl/init --conf-dir ./../perl/ext -I ./formatting -I formatting/ -I ./ -I . -I built_input -I built_input/non_ascii --error-limit=1000 -c TEST=1 --verbose --output formatting/out_parser/reuse_macro_expand_file/ --macro-expand=formatting/out_parser/reuse_macro_expand_file/simplest.info ./formatting/simplest.texi
> > 
> > In my case, I get this information:
> >   Output file formatting/out_parser/reuse_macro_expand_file/simplest.info
> > 
> > If it is not the same, it could explain why there is no 'overwriting
> > file' warning.
> 
> I see this:
> 
>   Output file formatting\out_parser\reuse_macro_expand_file/simplest.info
> 
> So something, probably Perl I'm using (being a Windows port of Perl),
> outputs file names with backslashes, and then some other code probably
> compares file names as simple strings.  Could that be the reason?

Yes, it is the reason.  What is unclear to me is where the backslashes
come from.  I do not imagine Perl changing the line command arguments,
but I may be wrong.

We tried to at least avoid adding backslashes all over texi2any code, so
hopefully it is not added by us.  In addition the C parser is used and
I can't imagine that we add backslash.

Could you please apply the attached patch, and rerun the same command as
above, and report the output, please?  I added some printout of the
directories name to try to narrow down where the backslash appear.

-- 
Pat
output_dir_paths.diff (text/x-diff, 1.5 KB)
diff --git a/tta/perl/Texinfo/Convert/Converter.pm b/tta/perl/Texinfo/Convert/Converter.pm
index 3a7e5e3868..73d33d8ed2 100644
--- a/tta/perl/Texinfo/Convert/Converter.pm
+++ b/tta/perl/Texinfo/Convert/Converter.pm
@@ -1286,6 +1286,7 @@ sub determine_files_and_directory($$) {
     }
     if (defined($self->get_conf('SUBDIR')) and $output_file ne '') {
       my $dir = File::Spec->canonpath($self->get_conf('SUBDIR'));
+      print STDERR "DFD SUBDIR: '$dir'\n";
       $output_file = join('/', ($dir, $output_file));
     }
   } else {
@@ -1339,7 +1340,10 @@ sub determine_files_and_directory($$) {
     $destination_directory = $output_dir;
   }
   if ($destination_directory ne '') {
-    $destination_directory = File::Spec->canonpath($destination_directory);
+    my $canon_destination_directory
+      = File::Spec->canonpath($destination_directory);
+    print STDERR "DFD dir '$destination_directory' '$canon_destination_directory'\n";
+    $destination_directory = $canon_destination_directory;
   }
   return ($output_file, $destination_directory, $output_filename,
           $document_name, $input_basefile);
diff --git a/tta/perl/texi2any.pl b/tta/perl/texi2any.pl
index 90331ff8c0..f68ae21295 100755
--- a/tta/perl/texi2any.pl
+++ b/tta/perl/texi2any.pl
@@ -1789,6 +1789,7 @@ while (@input_files) {
   } else {
     $canon_input_dir = File::Spec->canonpath($input_directory);
   }
+  print STDERR "III '$input_file_name' '$input_directory' '$canon_input_dir'\n";
 
   #my $input_file_base = $input_file_name;
   #$input_file_base =~ s/\.te?x(i|info)?$//;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.