Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build dockerfile on M3 mac #80

Closed
cthoyt opened this issue Sep 8, 2024 · 1 comment
Closed

Can't build dockerfile on M3 mac #80

cthoyt opened this issue Sep 8, 2024 · 1 comment

Comments

@cthoyt
Copy link
Contributor

cthoyt commented Sep 8, 2024

I'm on a M3 mac. I'm trying to build my own version of the Inara image using docker build -t inara:edgier . on my M3 mac. I'm getting the following error:

 - InvalidBaseImagePlatform: Base image pandoc/latex:3.2.0-alpine was pulled with platform "linux/amd64", expected "linux/arm64" for current build (line 1)
Dockerfile:6

This might be a fully upstream issue for pandoc/latex:3.2.0-alpine, which doesn't appear to be available for multiple architectures. Either way, this makes it very difficult (if not impossible) to reproduce the testing pipeline, which produces an opaque binary PDF that doesn't have a meaningful diff. #81 could be an alternate solution that doesn't require getting in the guts of pandoc's devops

Full error message
[+] Building 54.1s (8/13)                                                                                                                                           docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                                                                                                0.0s
 => => transferring dockerfile: 1.22kB                                                                                                                                              0.0s
 => [internal] load metadata for docker.io/pandoc/latex:3.2.0-alpine                                                                                                                1.2s
 => [auth] pandoc/latex:pull token for registry-1.docker.io                                                                                                                         0.0s
 => [internal] load .dockerignore                                                                                                                                                   0.0s
 => => transferring context: 87B                                                                                                                                                    0.0s
 => [1/8] FROM docker.io/pandoc/latex:3.2.0-alpine@sha256:5214a77b4297e95cd139e7ff003dad536d5cf8d0f287b519bfc923f9602aa27d                                                          0.0s
 => [internal] load build context                                                                                                                                                   0.0s
 => => transferring context: 60.92kB                                                                                                                                                0.0s
 => CACHED [2/8] RUN apk add --no-cache ttf-hack                                                                                                                                    0.0s
 => ERROR [3/8] RUN tlmgr update --self && tlmgr install   algorithmicx   algorithms   collection-context   draftwatermark   environ   fontsetup   hyperxmp   latexmk   lineno     52.8s
------                                                                                                                                                                                   
 > [3/8] RUN tlmgr update --self && tlmgr install   algorithmicx   algorithms   collection-context   draftwatermark   environ   fontsetup   hyperxmp   latexmk   lineno   marginnote   newcomputermodern   orcidlink   preprint   seqsplit   tcolorbox   titlesec   trimspaces   xkeyval   xstring:                                                                               
4.931 tlmgr: package repository https://ctan.mirrors.hoobly.com/systems/texlive/tlnet (verified)                                                                                         
4.931 tlmgr: saving backups to /opt/texlive/texdir/tlpkg/backups                                                                                                                         
4.931 tlmgr: no self-updates for tlmgr available                                                                                                                                         
6.761 tlmgr: package repository https://ctan.mirrors.hoobly.com/systems/texlive/tlnet (verified)
6.761 tlmgr install: package already present: latexmk
6.761 [1/54, ??:??/??:??] install: algorithmicx [8k]
7.286 [2/54, 00:01/54:41] install: algorithms [4k]
7.807 [3/54, 00:01/37:43] install: context.x86_64-linuxmusl [969k]
9.182 [4/54, 00:03/01:15] install: context [8842k]
12.08 [5/54, 00:06/00:15] install: context-calendar-examples [10k]
12.60 [6/54, 00:06/00:15] install: context-chat [3k]
13.13 [7/54, 00:07/00:17] install: context-collating-marks [3k]
13.66 [8/54, 00:07/00:17] install: context-companion-fonts [112k]
14.58 [9/54, 00:08/00:19] install: context-cyrillicnumbers [8k]
15.10 [10/54, 00:09/00:22] install: context-filter [7k]
15.62 [11/54, 00:09/00:22] install: context-gnuplot [19k]
16.27 [12/54, 00:10/00:24] install: context-handlecsv [16k]
16.92 [13/54, 00:11/00:27] install: context-legacy.x86_64-linuxmusl [1k]
17.44 [14/54, 00:11/00:27] install: context-legacy [2404k]
19.15 [15/54, 00:13/00:25] install: context-letter [21k]
19.79 [16/54, 00:13/00:25] install: context-mathsets [5k]
20.31 [17/54, 00:14/00:27] install: context-notes-zh-cn [1k]
20.83 [18/54, 00:14/00:27] install: context-pocketdiary [25k]
21.49 [19/54, 00:15/00:29] install: context-simpleslides [29k]
22.14 [20/54, 00:16/00:31] install: context-squares [4k]
22.66 [21/54, 00:16/00:31] install: context-sudoku [8k]
23.18 [22/54, 00:17/00:33] install: context-texlive.x86_64-linuxmusl [1k]
23.70 [23/54, 00:17/00:33] install: context-texlive [2k]
24.21 [24/54, 00:18/00:35] install: context-transliterator [19k]
24.87 [25/54, 00:19/00:37] install: context-typescripts [8k]
25.39 [26/54, 00:19/00:37] install: context-vim [10k]
25.91 [27/54, 00:20/00:39] install: context-visualcounter [4k]
26.44 [28/54, 00:20/00:39] install: draftwatermark [3k]
26.96 [29/54, 00:21/00:41] install: environ [2k]
27.47 [30/54, 00:21/00:41] install: fontsetup [8k]
27.99 [31/54, 00:22/00:43] install: hyperxmp.x86_64-linuxmusl [1k]
28.51 [32/54, 00:22/00:43] install: hyperxmp [15k]
29.16 [33/54, 00:23/00:45] install: jmn [40k]
29.94 [34/54, 00:24/00:47] install: lineno [62k]
30.74 [35/54, 00:24/00:46] install: luajittex.x86_64-linuxmusl [3969k]
32.66 [36/54, 00:26/00:38] install: luajittex [1k]
33.18 [37/54, 00:27/00:40] install: manfnt-font [26k]
33.84 [38/54, 00:27/00:40] install: marginnote [4k]
34.36 [39/54, 00:28/00:41] install: metapost.x86_64-linuxmusl [954k]
35.74 [40/54, 00:29/00:40] install: metapost [73k]
36.52 [41/54, 00:30/00:41] install: mflogo-font [18k]
37.17 [42/54, 00:31/00:43] install: newcomputermodern [6566k]
39.55 [43/54, 00:33/00:33] install: orcidlink [2k]
40.07 [44/54, 00:34/00:34] install: preprint [7k]
40.59 [45/54, 00:34/00:34] install: seqsplit [2k]
41.11 [46/54, 00:35/00:35] install: stmaryrd [163k]
42.04 [47/54, 00:36/00:36] install: tcolorbox [229k]
43.09 [48/54, 00:37/00:37] install: texlive-scripts-extra.x86_64-linuxmusl [1k]
43.60 [49/54, 00:37/00:37] install: texlive-scripts-extra [22k]
44.25 [50/54, 00:38/00:38] install: titlesec [20k]
44.90 [51/54, 00:39/00:39] install: trimspaces [1k]
45.43 [52/54, 00:39/00:39] install: xkeyval [9k]
45.94 [53/54, 00:40/00:40] install: xstring [12k]
46.59 [54/54, 00:40/00:40] install: collection-context [1k]
47.10 running mktexlsr ...
47.39 done running mktexlsr.
47.44 running updmap-sys ...
47.92 done running updmap-sys.
47.92 regenerating fmtutil.cnf in /opt/texlive/texdir/texmf-dist
47.92 running fmtutil-sys --byengine luajittex --no-error-if-no-format --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=/tmp/rdpBNsgRnE/sqxfrNlIgK ...
48.17 tlmgr: fmtutil-sys --byengine luajittex --no-error-if-no-format --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=/tmp/rdpBNsgRnE/sqxfrNlIgK failed (status 1), output:
48.17 fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
48.17 fmtutil:   /opt/texlive/texdir/texmf-dist/web2c/fmtutil.cnf
48.17 fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
48.17 fmtutil:   /opt/texlive/texdir/texmf-config/web2c/fmtutil.cnf
48.17 fmtutil [INFO]: writing formats under /opt/texlive/texdir/texmf-var/web2c
48.17 fmtutil [INFO]: --- remaking luajittex with luajittex
48.17 fmtutil: running `luajittex -ini   -jobname=luajittex -progname=luajittex luatex.ini' ...
48.17 Can't create the Lua state.
48.17 fmtutil [ERROR]: running `luajittex -ini   -jobname=luajittex -progname=luajittex luatex.ini </dev/null' return status: 0.04296875
48.17 fmtutil [ERROR]: returning error due to option --strict
48.17 fmtutil [INFO]: log file copied to: /opt/texlive/texdir/texmf-var/web2c/luajittex/luajittex.log
48.17 fmtutil [INFO]: not selected formats: 18
48.17 fmtutil [INFO]: failed to build: 1 (luajittex/luajittex)
48.17 fmtutil [INFO]: total formats: 19
48.17 fmtutil [INFO]: exiting with status 1
48.17 
48.17   ERROR: luajittex.fmt/luajittex
48.17 running fmtutil-sys --byengine luajithbtex --no-error-if-no-format --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=/tmp/rdpBNsgRnE/sqxfrNlIgK ...
48.41 tlmgr: fmtutil-sys --byengine luajithbtex --no-error-if-no-format --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=/tmp/rdpBNsgRnE/sqxfrNlIgK failed (status 1), output:
48.41 fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
48.41 fmtutil:   /opt/texlive/texdir/texmf-dist/web2c/fmtutil.cnf
48.41 fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
48.41 fmtutil:   /opt/texlive/texdir/texmf-config/web2c/fmtutil.cnf
48.41 fmtutil [INFO]: writing formats under /opt/texlive/texdir/texmf-var/web2c
48.41 fmtutil [INFO]: --- remaking luajithbtex with luajithbtex
48.41 fmtutil: running `luajithbtex -ini   -jobname=luajithbtex -progname=luajithbtex luatex.ini' ...
48.41 Can't create the Lua state.
48.41 fmtutil [ERROR]: running `luajithbtex -ini   -jobname=luajithbtex -progname=luajithbtex luatex.ini </dev/null' return status: 0.04296875
48.41 fmtutil [ERROR]: returning error due to option --strict
48.41 fmtutil [INFO]: log file copied to: /opt/texlive/texdir/texmf-var/web2c/luajithbtex/luajithbtex.log
48.41 fmtutil [INFO]: not selected formats: 18
48.41 fmtutil [INFO]: failed to build: 1 (luajithbtex/luajithbtex)
48.41 fmtutil [INFO]: total formats: 19
48.41 fmtutil [INFO]: exiting with status 1
48.41 
48.41   ERROR: luajithbtex.fmt/luajithbtex
48.41 running fmtutil-sys --byfmt cont-en --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=/tmp/rdpBNsgRnE/sqxfrNlIgK ...
51.44   OK: cont-en.fmt/xetex cont-en.fmt/pdftex
51.45 setting up ConTeXt caches: running mtxrun --generate ...done
51.58 done running mtxrun --generate.
51.58 running context --luatex --generate ...done
51.78 done running context --luatex --generate.
51.78 running mtxrun --script fonts --reload ...done
52.64 done running mtxrun --script fonts --reload.
52.65 running context --luajittex --generate .../opt/texlive/texdir/bin/default/tlmgr: context --luajittex --generate failed (status 1): 
52.72 tlmgr: context --luajittex --generate failed (status 1), see /opt/texlive/texdir/texmf-var/web2c/tlmgr-commands.log
52.72 tlmgr: An error has occurred. See above messages. Exiting.
52.72 failed
52.72 
52.72 tlmgr: package log updated: /opt/texlive/texdir/texmf-var/web2c/tlmgr.log
52.72 tlmgr: command log updated: /opt/texlive/texdir/texmf-var/web2c/tlmgr-commands.log
------

 1 warning found (use docker --debug to expand):
 - InvalidBaseImagePlatform: Base image pandoc/latex:3.2.0-alpine was pulled with platform "linux/amd64", expected "linux/arm64" for current build (line 1)
Dockerfile:6
--------------------
   5 |     # Install additional LaTeX packages
   6 | >>> RUN tlmgr update --self && tlmgr install \
   7 | >>>   algorithmicx \
   8 | >>>   algorithms \
   9 | >>>   collection-context \
  10 | >>>   draftwatermark \
  11 | >>>   environ \
  12 | >>>   fontsetup \
  13 | >>>   hyperxmp \
  14 | >>>   latexmk \
  15 | >>>   lineno \
  16 | >>>   marginnote \
  17 | >>>   newcomputermodern \
  18 | >>>   orcidlink \
  19 | >>>   preprint \
  20 | >>>   seqsplit \
  21 | >>>   tcolorbox \
  22 | >>>   titlesec \
  23 | >>>   trimspaces \
  24 | >>>   xkeyval \
  25 | >>>   xstring
  26 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c tlmgr update --self && tlmgr install   algorithmicx   algorithms   collection-context   draftwatermark   environ   fontsetup   hyperxmp   latexmk   lineno   marginnote   newcomputermodern   orcidlink   preprint   seqsplit   tcolorbox   titlesec   trimspaces   xkeyval   xstring" did not complete successfully: exit code: 2

View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/jkaqwsic56iozyxf8822uhg8v
@tarleb
Copy link
Collaborator

tarleb commented Sep 9, 2024

See also #30. Closing in favor of that issue.

@tarleb tarleb closed this as completed Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants