[tlbuild] running into problems with "prefix", for starters.
Ken Moffat
zarniwhoop at ntlworld.com
Mon Feb 4 04:11:11 CET 2019
On Sun, Feb 03, 2019 at 07:45:28PM -0600, Amos wrote:
>
> I tend to install these internally-built RPMs under /usr/local, out of
> historical precedence, but also it's handy to clearly show what in fact has
> been distributed locally.
>
> I realize a lot has changed with TeXLive, so please excuse my ignorance.
> I'm only now resorting to posting because even after many hours working on
> this and reading the docs, it's still not clear to me what I may be doing
> wrong.
>
>
> Questions/Observations:
>
>
> 1) "prefix" not always honored? When I try building like so:
>
> ----vvvv---- excerpt ----vvvv----
>
[...]
> %__make install DESTDIR=%{buildroot}
>
> ----^^^^---- excerpt ----^^^^----
>
> Then I install this rpm, and try things:
>
> $ kpsewhich --all texmf.cnf
> /usr/local/share/texmf-dist/web2c/texmf.cnf
>
> However, when I try to actually process any files, I'm greeted with:
>
> Can't locate mktexlsr.pl in @INC (@INC contains: /usr/tlpkg
> /usr/texmf-dist/scripts/texlive
> /usr/local/lib/perl5/site_perl/5.26.2/x86_64-linux
> /usr/local/lib/perl5/site_perl/5.26.2
> /usr/local/lib/perl5/5.26.2/x86_64-linux /usr/local/lib/perl5/5.26.2) at
> /usr/local/bin/mktexfmt line 23.
> BEGIN failed--compilation aborted at /usr/local/bin/mktexfmt line 25.
> I can't find the format file `latex.fmt'!
>
For this point, please look at what we are doing in Beyond
LinuxFromScratch. Here's a link to the stable sysv book (go to the
'view online' links at the main linuxfromscratch.org/blfs page to
look at the systemd version [ should be identical for this ] or to
look at the development [svn] versions re recent versions of poppler
(I gave up and fell back to the shipped version, by the time I've
found fixes for the current poppler there will be a newer version
and one of my colleagues will have dropped it in).
Specifically, the install of texk/tests/TeXLive/* and the
explanation in Command Explanations.
We've always preferred /opt for external things, and we used to use
the binaries to bootstrap the source build (someone apparently
thought that was necessary when TeXLive first went into our book),
which is why we have such a strange bindir.
> This tells me that the default prefix isn't being correctly defined in all
> the binaries/scripts.
>
>
> 2) OK, so I change things up to use internally defined configure RPM
> macros. This has the side effect of setting "prefix" to "/usr".
>
> ----vvvv---- excerpt ----vvvv----
>
> %define prefix /usr
> %define texmf_dist_root %{prefix}/share
>
> %build
> mkdir -p work
> cd work
>
> %global _configure ../configure
>
> %configure --disable-xindy --disable-dvisvgm --disable-native-texlive-build
>
> %install
> ## unpack the texmf stuff
> mkdir -p %{buildroot}%{texmf_dist_root}
> pushd %{buildroot}%{texmf_dist_root}
> xzcat %{SOURCE1} | tar xf -
> pushd texlive-*-texmf
> find texmf-dist/* | cpio -pdm %{buildroot}%{texmf_dist_root}
> popd
> rm -rf texlive-*-texmf
> popd
>
> cd work
> %__make install DESTDIR=%{buildroot}
>
> ----^^^^---- excerpt ----^^^^----
>
> This did result in a collision with /usr/bin/man, which seems pretty odd.
> Turns out it was a sym link to "../share/texmf-dist/doc/man". Anyway,
> getting past that, I still have problems with "prefix" getting messed up.
>
> $ kpsewhich --all texmf.cnf
> /usr/share/texmf-dist/web2c/texmf.cnf
>
> $ latex small2e.tex
> This is TeXk, Version 3.14159265 (TeX Live 2018) (preloaded format=latex)
> restricted \write18 enabled.
>
> kpathsea: Running mktexfmt latex.fmt
> Can't locate mktexlsr.pl in @INC (@INC contains: //tlpkg
> //texmf-dist/scripts/texlive
> /usr/local/lib/perl5/site_perl/5.26.2/x86_64-linux
> /usr/local/lib/perl5/site_perl/5.26.2
> /usr/local/lib/perl5/5.26.2/x86_64-linux /usr/local/lib/perl5/5.26.2) at
> /usr/bin/mktexfmt line 23.
> BEGIN failed--compilation aborted at /usr/bin/mktexfmt line 25.
> I can't find the format file `latex.fmt'!
>
I think that is the same problem as above. And using /usr is
probably not what you want to do long-term.
>
>
> 3) Installing TeXLive in this manner, there's no "latex" nor "pdflatex"
> commands. Why? I can sym link them to tex and pdftex, respectively. (I
> believe that's the correct thing to do.) However, I'm wondering why this
> isn't done as part of the "make install".
>
>
> Thanks in advance to any pointers.
>
> Amos
On the same page in BLFS, 'make texlinks' - but note the Note that
texlinks should only be run once, also the comment in Command
Explanations that some programs such as xetex are now separate
binaries.
Learning to deal with this stuff is sometimes painful, but usually
worthwhile.
The real fun, of course, is in asymptote, biber, xindy. If you want
to build biber using system versions of perl modules compiled using
own instructions and versions from source (compared to using CPAN
with whatever it decides is needed, or the 'bundled' versions
provided by upstream), at the risk of blowing my own trumpet I think
we've got that sorted in the BLFS development books (e.g. not using
Mozilla::CA for certificates in LWP::Protocol::https - we now use
fedora-style locations for certificates).
ĸen
--
thread 'main' panicked at 'giraffe',
/tmp/rustc-1.32.0-src/src/test/run-fail/while-panic.rs:17:13
More information about the tlbuild
mailing list