From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31791 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Claudio Di Vita Newsgroups: gmane.text.pandoc Subject: Re: M1 support for Docker image Date: Thu, 24 Nov 2022 04:12:42 -0800 (PST) Message-ID: <39b0a0ad-5bc0-488c-ba00-5f75fe25c949n@googlegroups.com> References: <87y1tcj0g2.fsf@zeitkraut.de> <4aa8604b-23c8-4960-ba58-d168bee56bfdn@googlegroups.com> <87fse9pub8.fsf@zeitkraut.de> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_5253_286224748.1669291962438" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7795"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDOYFIOXRYHRBO577WNQMGQEB53ZYPA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Nov 24 13:12:48 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oa1-f62.google.com ([209.85.160.62]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oyB5z-0001t6-Hv for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 24 Nov 2022 13:12:47 +0100 Original-Received: by mail-oa1-f62.google.com with SMTP id 586e51a60fabf-1427cec35e0sf754445fac.2 for ; Thu, 24 Nov 2022 04:12:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=cKaGfJM3s3Vjw5thDGRal+YWyoWwB/64wo5WvISilf4=; b=g2/+5l214XrX5VURse9reEM7cmkWQ6FnS9tYmuEKJNwYt/6QRFOK0OEBv4JdYLBe0m JE55ffMB1r8ITDW1VKa04K3w/pwA8xR/5glbnk6qVW5EokWOjoSAcBh14jDId2jzvB8q VCWxt0jk7tt0Jtp9NkY6bKXh2J4HIKSxdw8i/sD6DRzpiEdrWHh4CZtGSyw6lHrbjnnN 7S9YHMW7sq+70Jzjy2h8AzkzqynfXangKHhtZKWqjodtdnzjb0sXMSRhM+Ti/JXpa+3y Xdain3+zaC6tq1ezKN4CQmqmZ7JymD+Dm0MIKMOrUZBPFgs2Lf9LyzCqUYvCil4fPbpJ TvJQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=cKaGfJM3s3Vjw5thDGRal+YWyoWwB/64wo5WvISilf4=; b=RYHdX3ixZsz4bE+JaiXSs/LuNjEgpWyH9nHYCVdwecHNhfZB1K2emz5PU84Ukxebz3 4vKO3vqj2pxc7H2JrT6GnnKmCZCffVzIW62xj+r5EdeXPNpkM6b0Clo+BYp3EHutGDFh Eqax2VVSxYNnq1A4KIM5L22HqMzIV45GQxT1y/D++G+A1XLITPhZmW9sN9NwOvdAcJEn 47CEM8Mdy85IpNkRVcyhjRvTNxwnFcoE3HrDVn7ws4jVRS4w1J5Ij2ohZA0JfQL0XYaX ZQ/6Hloqa3Z+a9s/+pDKM8CIoNQQ8miAvyMDGqljHc0wBe6NHfvTQCTpkVDHMGtNOC4v Q3uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=cKaGfJM3s3Vjw5thDGRal+YWyoWwB/64wo5WvISilf4=; b=sBQ3exqwWveC3fI/SNT08V5+0Rc4KJr+izJ44/w4HTlnLc7TxaCYrYLxxqDO0B/MDq DTEelsmz1liePOMMxVmM2kkyViTSQD39l0Xl6mbhfk+oYuy5JHZmthV4Qtp6/QbD2Tzo 00H2pnahU6DISNvThuCfKhiTuZAa45DbrU9rgu7tDfqt8C2bxJuZOBsh2BsoKSTamE/T fm9mrPtC+LecT3LvXrIAuu2kftpW9a8Jyek6eLQRrLLs9+vGt+IiWXgsfRRU6tkDmsA8 pDcbAETPDjXuzb/vPrOHXQB+QM/0QW+VtjtZYYSlXfkq218/PunVmgJDhkZ40LIDVmR6 I6hg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ANoB5pmvw0etrzWJARFWxYZB5qNJXXiLxGfK9cwNoBiiAv5kiRDPNWiN Drbcu8ix4z/GsxeQcgPQLXc= X-Google-Smtp-Source: AA0mqf5X6sTrZQOLYr4ao6Jlhea8uJUYgjpCmScN3WVIOzo9O8zBDqxaPUNeibsmZhHC4hSWSAB1QQ== X-Received: by 2002:a05:6808:9bb:b0:350:de2:f18e with SMTP id e27-20020a05680809bb00b003500de2f18emr5972714oig.75.1669291966325; Thu, 24 Nov 2022 04:12:46 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:51c4:b0:143:408e:349 with SMTP id b4-20020a05687051c400b00143408e0349ls477641oaj.6.-pod-prod-gmail; Thu, 24 Nov 2022 04:12:43 -0800 (PST) X-Received: by 2002:a05:6870:f60a:b0:143:3028:e3b4 with SMTP id ek10-20020a056870f60a00b001433028e3b4mr3958318oab.244.1669291963211; Thu, 24 Nov 2022 04:12:43 -0800 (PST) In-Reply-To: <87fse9pub8.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> X-Original-Sender: claudio.divita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:31791 Archived-At: ------=_Part_5253_286224748.1669291962438 Content-Type: multipart/alternative; boundary="----=_Part_5254_1480311341.1669291962438" ------=_Part_5254_1480311341.1669291962438 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I updated the Dockerfile for ubuntu replacing the PATH assignment in the=20 following way: # TeXLive binaries location ARG texlive_bin=3D"/opt/texlive/texdir/bin" RUN TEXLIVE_ARCH=3D"$(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=3D"${texlive_bin}/default:${PATH}" Build args are not useful, because they cannot be changed based on the=20 architecture, therefore I used a symbolic link to place the right directory= =20 within PATH. However, I noticed that the directory /usr/share/lua/5.4 is not created=20 when building the pandoc/core:edge images (that use Lua 5.4), so the module= =20 re.lua is not copied to the host. Is something related to changes=20 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= =20 the TeXLive path change ? Cheers, Claudio Il giorno mercoled=C3=AC 23 novembre 2022 alle 16:25:08 UTC+1 Albert Krewin= kel=20 ha scritto: > > Claudio Di Vita 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=3D"/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=3D"/opt/texlive/texdir/bin/aarch64-linux:${PATH}" > > --=20 > Albert Krewinkel > GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124 > --=20 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 e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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. ------=_Part_5254_1480311341.1669291962438 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I updated the Dockerfile for ubuntu replacing the PATH assignment in the fo= llowing way:

# TeXLive binaries location
ARG texlive_= bin=3D"/opt/texlive/texdir/bin"
RUN TEXLIVE_ARCH=3D"$(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=3D"${texlive_bin}/default:${P= ATH}"

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

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

Moreover, while edge images build works, building fro= m 2.19.2 fails.

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

Cheers,

Claudio

Il gi= orno mercoled=C3=AC 23 novembre 2022 alle 16:25:08 UTC+1 Albert Krewinkel h= a 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=3D"/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=3D"/opt/texlive/texdir/bin/aarch64-linux:${PATH}"= ;

--=20
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 &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-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.
------=_Part_5254_1480311341.1669291962438-- ------=_Part_5253_286224748.1669291962438--