I updated the Dockerfile for ubuntu replacing the PATH assignment in the following way:

# TeXLive binaries location
ARG texlive_bin="/opt/texlive/texdir/bin"
RUN TEXLIVE_ARCH="$(uname -p)-$(uname -s | tr '[:upper:]' '[:lower:]')" && \
    mkdir -p ${texlive_bin} && \
    ln -sf "${texlive_bin}/${TEXLIVE_ARCH}" "${texlive_bin}/default"

# Modify PATH environment variable, prepending TexLive bin directory
ENV PATH="${texlive_bin}/default:${PATH}"

Build args are not useful, because they cannot be changed based on the architecture, therefore I used a symbolic link to place the right directory within PATH.

However, I noticed that the directory /usr/share/lua/5.4 is not created when building the pandoc/core:edge images (that use Lua 5.4), so the module re.lua is not copied to the host. Is something related to changes introduced by Lua 5.4 ?

Moreover, while edge images build works, building from 2.19.2 fails.

Can issue a PR for updating the Dockerfile (at least for Ubuntu) to include the TeXLive path change ?

Cheers,

Claudio

Il giorno mercoledì 23 novembre 2022 alle 16:25:08 UTC+1 Albert Krewinkel ha scritto:

Claudio Di Vita <claudio...@gmail.com> writes:

> With a support of a colleague that has an Apple M1, I'm trying to
> build the pandoc/latex:edge-ubuntu image.

That's great news!

> The build fails due to some installation issue with TexLive:
>
> Time used for installing the packages: 00:38
> running mktexlsr /opt/texlive/texdir/texmf-dist ...
> [...]
> Add /opt/texlive/texdir/texmf-dist/doc/info to INFOPATH.
> Most importantly, add /opt/texlive/texdir/bin/aarch64-linux
> to your PATH for current and future sessions.
> [...]
>
> Any clue on the possible cause ?

The problem is that the Dockerfile hard-codes the path for x86-64:

ENV PATH="/opt/texlive/texdir/bin/x86_64-linux:${PATH}"

We could probably add `arch` as another Docker build parameter, or
otherwise should find a different way to set the path to its correct
value.

Can you try to modify the line manually to see if the build succeeds
with

ENV PATH="/opt/texlive/texdir/bin/aarch64-linux:${PATH}"

--
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/39b0a0ad-5bc0-488c-ba00-5f75fe25c949n%40googlegroups.com.