diff mbox series

[bug#50081] gnu: texlive-texmf: Disable LuaJIT engines on powerpc64le

Message ID 20210816194633.7984-1-bauermann@kolabnow.com
State Accepted
Headers show
Series [bug#50081] gnu: texlive-texmf: Disable LuaJIT engines on powerpc64le | 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. 16, 2021, 7:46 p.m. UTC
LuaJIT isn’t ported to powerpc64le. ‘texlive-latex-base’ already disables
them, 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.

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

Comments

Mathieu Othacehe Aug. 17, 2021, 12:42 p.m. UTC | #1
Hello,

> +                ;; LuaJIT is not ported to powerpc64le* yet.
> +                (if (string-prefix? "powerpc64le"
> +                                    ,(or (%current-target-system)
> +                                        (%current-system)))

Do you think we could use the "target-powerpc?" procedure from (guix
utils) here?

Mathieu
Thiago Jung Bauermann Aug. 17, 2021, 2:22 p.m. UTC | #2
Hi Mathieu,

Thank you for the quick review.

Em terça-feira, 17 de agosto de 2021, às 09:42:53 -03, Mathieu Othacehe 
escreveu:
> Hello,
> 
> > +                ;; LuaJIT is not ported to powerpc64le* yet.
> > +                (if (string-prefix? "powerpc64le"
> > +                                    ,(or (%current-target-system)
> > +                                        (%current-system)))
> 
> Do you think we could use the "target-powerpc?" procedure from (guix
> utils) here?

‘target-powerpc?’ would also match 32-bit PowerPC. LuaJIT does support that 
platform, but I couldn’t find out – and can’t test – whether the LuaJIT TeX 
engines do as well.

Since ‘texlive-latex-base’ doesn’t exclude 32-bit PowerPC, I’d suggest 
doing the same for ‘texlive-texmf’ as well. But I don’t have a strong 
opinion about it.

If you think it improves the code, I can use
“,(and (target-powerpc?) (target-64bit?))"


NB: I forgot to mention that this patch is for core-updates-frozen.
M Aug. 17, 2021, 10:51 p.m. UTC | #3
Thiago Jung Bauermann via Guix-patches via schreef op ma 16-08-2021 om 16:46 [-0300]:
> LuaJIT isn’t ported to powerpc64le. ‘texlive-latex-base’ already disables
> them, 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.
> 
>  gnu/packages/tex.scm | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
> index 70166941d554..3c0b87352a10 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 powerpc64le* yet.

Does that mean LuaJIT _is_ ported to powerpc64be (big endian)?

> +                (if (string-prefix? "powerpc64le"
> +                                    ,(or (%current-target-system)
> +                                        (%current-system)))

If not, then this should be (string-prefix? "powerpc64" ...).
Admittedly, Guix doesn't support powerpc64be ...

Greetings,
Maxime.
Thiago Jung Bauermann Aug. 18, 2021, 2:53 a.m. UTC | #4
Hello Maxime,

Thanks for your review!

Em terça-feira, 17 de agosto de 2021, às 19:51:15 -03, Maxime Devos 
escreveu:
> Thiago Jung Bauermann via Guix-patches via schreef op ma 16-08-2021 om 
16:46 [-0300]:
> > diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
> > index 70166941d554..3c0b87352a10 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 powerpc64le* yet.
> 
> Does that mean LuaJIT _is_ ported to powerpc64be (big endian)?

No, LuaJIT is ported only to 32-bit PowerPC.

> > +                (if (string-prefix? "powerpc64le"
> > +                                    ,(or (%current-target-system)
> > +                                        (%current-system)))
> 
> If not, then this should be (string-prefix? "powerpc64" ...).

Ok, I will send a v2 with this change.

> Admittedly, Guix doesn't support powerpc64be ...

AFAIK powerpc64be is considered legacy nowadays.
diff mbox series

Patch

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 70166941d554..3c0b87352a10 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 powerpc64le* yet.
+                (if (string-prefix? "powerpc64le"
+                                    ,(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")