bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Directory names hard-coded in Texinfo Perl scripts


From: Eli Zaretskii
Subject: Re: Directory names hard-coded in Texinfo Perl scripts
Date: Sat, 18 Dec 2021 16:52:21 +0200

> From: Gavin Smith <gavinsmith0123@gmail.com>
> Date: Sat, 18 Dec 2021 14:43:18 +0000
> Cc: bug-texinfo@gnu.org
> 
> On Fri, Dec 17, 2021 at 08:58:04AM +0200, Eli Zaretskii wrote:
> > No, I think this was before 6.7.  If I compare makeinfo between 6.6
> > and 6.7, I see that these parts were modified:
> > 
> >     # To find Texinfo::ModulePath
> >     if (!defined($ENV{'top_builddir'})) {
> >       $ENV{'top_builddir'} = File::Spec->catdir($command_directory, $updir);
> >       $ENV{'top_srcdir'} = File::Spec->catdir($command_directory, $updir);
> >     }
> > [...]
> >   my $srcdir;
> >   if (defined($ENV{'top_srcdir'})) {
> >     $srcdir = File::Spec->catdir($ENV{'top_srcdir'}, 'tp');
> >   } else {
> >     $srcdir = $command_directory;
> >   }
> > 
> > I'm not sure my understanding is correct, but it looks like makeinfo
> > 6.6 was using the directory where makeinfo resides to find the other
> > files and directories, and that enabled relocation of the installed
> > tree to be rooted at a directory different from what was specified as
> > the value of --prefix at configure time.
> > 
> > I hope I explained the situation; if not, please ask more questions.
> 
> This was a confusing part of the program and it's likely the changes
> were to make it easier to understand.  Some of the code here was to support
> running the uninstalled program.  The code there setting environment
> variables based on the command directory was for the uninstalled case.
> The installed case still refers to the configure-time values.
> 
> I've tried testing it with a custom installation directory, like
> 
> $ mkdir PREFIX
> $ ./configure --prefix=/home/g/src/texinfo/GIT/PREFIX
> 
> After make install, with "cd PREFIX" and "find ." lists quite a lot of
> installed files, the most important being the Perl modules themselves
> as well as texi2any.  There are also loadable modules as well
> as the locale translation files.
> 
> Then testing moving the installed files...
> 
> $ mkdir foo
> $ mv PREFIX/ foo
> $ cd foo/PREFIX
> $ bin/texi2any --help
> Can't locate Texinfo/ModulePath.pm in @INC (you may need to install the 
> Texinfo::ModulePath module) (@INC contains: 
> /home/g/src/texinfo/GIT/PREFIX/share/texinfo 
> /home/g/local/lib/perl5/site_perl/5.28.0 /etc/perl 
> /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 
> /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 
> /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 
> /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at bin/texi2any 
> line 84.
> BEGIN failed--compilation aborted at bin/texi2any line 87.
> 
> 
> I couldn't see from Texinfo 6.6 how texi2any managed to find its modules in
> this situation.  I tried building and installing it the same way:
> 
> $ cd foo/PREFIX/
> $ bin/texi2any --help
> Can't locate Texinfo/ModulePath.pm in @INC (you may need to install the 
> Texinfo::ModulePath module) (@INC contains: 
> /home/g/src/texinfo/oldreleases/texinfo-6.6/PREFIX/share/texinfo 
> /home/g/local/lib/perl5/site_perl/5.28.0 /etc/perl 
> /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 
> /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 
> /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 
> /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at bin/texi2any 
> line 83.
> BEGIN failed--compilation aborted at bin/texi2any line 86.
> $ pwd
> /home/g/src/texinfo/oldreleases/texinfo-6.6/foo/PREFIX
> 
> 
> You see that the same error message is output.
> 
> Two questions:
> 
> * Is this what you need to work and is the error that you get that
> Texinfo/ModulePath.pm couldn't be found?
> * If so, when did this work. as you can see it doesn't appear to work
> with Texinfo 6.6?

I think this is what I'd like to work, yes.

As for the other questions, since I never tried to install Texinfo in
a directory different from what I configured it, I don't really know.
So I'm asking Nikolay, who reported this problem to me, to please
answer these questions based on his experience.

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]