diff mbox series

[bug#50081,core-updates-frozen,v2] gnu: texlive-texmf: Disable LuaJIT engines on powerpc64*

Message ID 20210818025528.8621-1-bauermann@kolabnow.com
State Accepted
Headers show
Series [bug#50081,core-updates-frozen,v2] gnu: texlive-texmf: Disable LuaJIT engines on powerpc64* | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Thiago Jung Bauermann Aug. 18, 2021, 2:55 a.m. UTC
LuaJIT isn’t ported to 64-bit PowerPC. ‘texlive-latex-base’ already
disables the engines that rely on it, so just do the same in texlive-texmf.

Fix suggested by Mathieu Othacehe <othacehe@gnu.org>.

* gnu/packages/tex.scm (texlive-texmf)[arguments]<#:phases>{texmf-config}:
Disable LuaJIT engines when building for powerpc64le.
---

Hello,

This fixes the build of ‘texlive-texmf’ on powerpc64le. It was failing
with these errors:

  fmtutil [ERROR]: not building luajittex due to missing engine: luajittex
  fmtutil [ERROR]: not building luajithbtex due to missing engine: luajithbtex

Thank you very much to Mathieu for his help in making  this work.

Changes since v1:
- Match target with “powerpc64” prefix rather than “powerpc64le”.

 gnu/packages/tex.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Efraim Flashner Aug. 18, 2021, 10:39 a.m. UTC | #1
We now have a target-ppc64le? option which should be useful here.
Thiago Jung Bauermann Aug. 19, 2021, 4:51 a.m. UTC | #2
Em quarta-feira, 18 de agosto de 2021, às 07:39:21 -03, Efraim Flashner 
escreveu:
> We now have a target-ppc64le? option which should be useful here.

Yes, that’s a nice code improvement. But unfortunately it’s mutually 
exclusive with Maxime’s request to match against “powerpc64*”.

If people think the ‘target-ppc64le?’ alternative would be better than the 
“powerpc64*” one, I can send a v3.
Efraim Flashner Aug. 19, 2021, 6:52 a.m. UTC | #3
On Thu, Aug 19, 2021 at 01:51:56AM -0300, Thiago Jung Bauermann wrote:
> Em quarta-feira, 18 de agosto de 2021, às 07:39:21 -03, Efraim Flashner 
> escreveu:
> > We now have a target-ppc64le? option which should be useful here.
> 
> Yes, that’s a nice code improvement. But unfortunately it’s mutually 
> exclusive with Maxime’s request to match against “powerpc64*”.
> 
> If people think the ‘target-ppc64le?’ alternative would be better than the 
> “powerpc64*” one, I can send a v3.

IMO since powerpc64-linux isn't an actually supported architecture in
Guix we can ignore it for now and focus on powerpc64le. As far as
powerpc, as I'm the only one using it (I believe) you can pretty much
treat it like mips64el; try not to affect it unnecessarily but no
testing needed.
Thiago Jung Bauermann Aug. 20, 2021, 12:41 a.m. UTC | #4
Hello Efraim,

Em quinta-feira, 19 de agosto de 2021, às 03:52:26 -03, Efraim Flashner 
escreveu:
> On Thu, Aug 19, 2021 at 01:51:56AM -0300, Thiago Jung Bauermann wrote:
> > Em quarta-feira, 18 de agosto de 2021, às 07:39:21 -03, Efraim Flashner
> > escreveu:
> > > We now have a target-ppc64le? option which should be useful here.
> > 
> > Yes, that’s a nice code improvement. But unfortunately it’s mutually
> > exclusive with Maxime’s request to match against “powerpc64*”.
> > 
> > If people think the ‘target-ppc64le?’ alternative would be better than
> > the “powerpc64*” one, I can send a v3.
> 
> IMO since powerpc64-linux isn't an actually supported architecture in
> Guix we can ignore it for now and focus on powerpc64le.

I agree with you. I’ll send a v3 then.

> As far as powerpc, as I'm the only one using it (I believe) you can 
> pretty much treat it like mips64el; try not to affect it unnecessarily 
> but no testing needed.

Ok, thanks.

As an aside, I tried building a powerpc64le kernel with CONFIG_COMPAT set 
to see if it would allow running 32-bit binaries but it fails during 
linking. The 32-bit support feature apparently bit-rotted.
diff mbox series

Patch

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 70166941d554..900438ecacd9 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -6821,9 +6821,17 @@  directly generate PDF documents instead of DVI.")
                      (share (string-append out "/share"))
                      (texmfroot (string-append share "/texmf-dist/web2c"))
                      (texmfcnf (string-append texmfroot "/texmf.cnf"))
+                     (fmtutilcnf (string-append texmfroot "/fmtutil.cnf"))
                      (texlive-bin (assoc-ref inputs "texlive-bin"))
                      (texbin (string-append texlive-bin "/bin"))
                      (tlpkg (string-append texlive-bin "/share/tlpkg")))
+                ;; LuaJIT is not ported to powerpc64* yet.
+                (if (string-prefix? "powerpc64"
+                                    ,(or (%current-target-system)
+                                        (%current-system)))
+                    (substitute* fmtutilcnf
+                      (("^(luajittex|luajithbtex|mfluajit)" m)
+                       (string-append "#! " m))))
                 ;; Register SHARE as TEXMFROOT in texmf.cnf.
                 (substitute* texmfcnf
                   (("TEXMFROOT = \\$SELFAUTOPARENT")