Closed Bug 1731412 Opened 4 years ago Closed 4 years ago

can't build tecken on m1 processor

Categories

(Tecken :: General, defect, P3)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: willkg, Assigned: willkg)

Details

Attachments

(2 files)

If you're using a macbook with an m1 processor, then the Tecken local build environment doesn't build. It fails because it goes to build the symbolic library which requires Rust, but there's no Rust build tools.

Markus: Can you do this and tell me the output?:

docker run -ti python:3.9.7 bash

That runs bash in the image we use for Tecken. Then in the bash prompt, run python and then do:

>>> import platform
>>> platform.architecture()

And then tell me the output of that.

On my old MBP, it prints ('64bit', ''). On my x1 carbon 7th gen, it prints ('64bit', 'ELF').

The theory here is that you get something like 64arm for which there's no wheel and then sad things happen. If that's the case, I'll probably set it up to build symbolic in another container as a build step or something.

Flags: needinfo?(mstange.moz)

It prints ('64bit', 'ELF'). And uname -m prints aarch64.

mstange@Markuss-MacBook-Pro ~ % docker run -ti python:3.9.7 bash
root@62066d056c18:/# python
Python 3.9.7 (default, Sep  3 2021, 05:19:58) 
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> platform.architecture()
('64bit', 'ELF')
>>> 
>>> 
root@62066d056c18:/# uname -m
aarch64
root@62066d056c18:/# 
Flags: needinfo?(mstange.moz)

Mmm... I think I can't fix this without getting a machine with an m1 chip. I put in a request for a used machine. I'll look at this (and Socorro, too) when I get it.

willkg merged PR #2417: "bug 1731412: force linux/amd64 platform for docker images" in 8eb192f.

This may have problems with qemu on macos because tecken uses inotify in a couple of places. It might be fine "for now", though. It's definitely an easier fix than creating a build container to build a symbolic wheel. That's harder to do and has increased maintenance burden going forward.

If this turns out not to work well enough, then we can escalate to building the symbolic wheel ourselves.

Markus: I landed a "fix" that forces Docker to use the linux/amd64 images. Does that fix the issue for you?

Flags: needinfo?(mstange.moz)

It looks like I'm hitting https://github.com/docker/for-mac/issues/5831 now:

 % make build
docker-compose build --build-arg userid=10001 --build-arg groupid=10001 base frontend
[+] Building 0.7s (25/34)                                                       
 => [tecken:build internal] load build definition from Dockerfile          0.0s
 => => transferring dockerfile: 2.05kB                                     0.0s
 => [tecken_frontend internal] load build definition from Dockerfile       0.0s
 => => transferring dockerfile: 1.05kB                                     0.0s
 => [tecken:build internal] load .dockerignore                             0.0s
 => => transferring context: 34B                                           0.0s
 => [tecken_frontend internal] load .dockerignore                          0.0s
 => => transferring context: 34B                                           0.0s
 => [tecken:build internal] load metadata for docker.io/library/python:3.  0.0s
 => [tecken:build internal] load metadata for docker.io/library/node:16.9  0.0s
 => [tecken:build stage-1  1/13] FROM docker.io/library/python:3.9.7-slim  0.0s
 => [tecken:build internal] load build context                             0.0s
 => => transferring context: 15.12kB                                       0.0s
 => [tecken:build frontend 1/4] FROM docker.io/library/node:16.9.0-slim@s  0.0s
 => CACHED [tecken:build stage-1  2/13] WORKDIR /app                       0.0s
 => CACHED [tecken:build stage-1  3/13] RUN groupadd --gid 10001 app &&    0.0s
 => CANCELED [tecken:build stage-1  4/13] RUN apt-get update &&     apt-g  0.5s
 => CACHED [tecken:build frontend 2/4] COPY . /app                         0.0s
 => CACHED [tecken:build frontend 3/4] WORKDIR /app                        0.0s
 => ERROR [tecken:build frontend 4/4] RUN bin/build_frontend.sh            0.5s
 => [tecken_frontend internal] load metadata for docker.io/library/node:1  0.0s
 => [tecken_frontend internal] load build context                          0.0s
 => => transferring context: 1.77kB                                        0.0s
 => [tecken_frontend 1/7] FROM docker.io/library/node:15.7.0-slim@sha256:  0.0s
 => CACHED [tecken_frontend 2/7] WORKDIR /app                              0.0s
 => CACHED [tecken_frontend 3/7] RUN if [ 10001 -ne 1000 ]; then           0.0s
 => CACHED [tecken_frontend 4/7] ADD frontend/yarn.lock /yarn.lock         0.0s
 => CACHED [tecken_frontend 5/7] ADD frontend/package.json /package.json   0.0s
 => CACHED [tecken_frontend 6/7] RUN yarn                                  0.0s
 => CACHED [tecken_frontend 7/7] ADD frontend /app                         0.0s
 => [tecken_frontend] exporting to image                                   0.0s
 => => exporting layers                                                    0.0s
 => => writing image sha256:ed99f213ad5ac1ae8a33260dc096b8b4ea4f594dda7b2  0.0s
 => => naming to docker.io/library/tecken_frontend                         0.0s
------
 > [tecken:build frontend 4/4] RUN bin/build_frontend.sh:
#21 0.267 /app/frontend /app
#21 0.463 
#21 0.463 #
#21 0.463 # Fatal process OOM in Failed to reserve virtual memory for CodeRange
#21 0.463 #
#21 0.463 
#21 0.463 qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
#21 0.467 bin/build_frontend.sh: line 20:    13 Trace/breakpoint trap   yarn --no-progress
------
failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c bin/build_frontend.sh]: exit code: 133
make: *** [build] Error 17
mstange@Markuss-MacBook-Pro tecken % 
Flags: needinfo?(mstange.moz)

I tried to see if I could make it work by installing cargo first, and made some progress. The hardest path was propagating a PATH that includes /.cargo/bin to the pip installation. This seemed to do the trick:

diff --git a/docker/Dockerfile b/docker/Dockerfile
index 6839a8b..394cdbf 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -41,12 +41,18 @@ RUN apt-get autoremove -y && \
     apt-get clean && \
     rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
 
+# Get Rust
+RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
+
+# ENV PATH="${HOME}/.cargo/bin:${PATH}"
+RUN PATH="${HOME}/.cargo/bin:${PATH}" cargo --version
+
 # Install Python dependencies
 COPY requirements.txt /tmp/
 # Switch to /tmp to install dependencies outside home dir
 WORKDIR /tmp
 RUN pip install -U 'pip>=10' && \
-    pip install --no-cache-dir -r requirements.txt && \
+    PATH="${HOME}/.cargo/bin:${PATH}" pip install --no-cache-dir -r requirements.txt && \
     pip check --disable-pip-version-check
 
 COPY . /app

And then the symbolic installation was successfully starting the Rust build. However, that failed too, and I'm not completely sure why.

#15 52.25   Building wheel for symbolic (setup.py): started
#15 112.4   Building wheel for symbolic (setup.py): still running...
#15 214.6   Building wheel for symbolic (setup.py): still running...
#15 215.0   Building wheel for symbolic (setup.py): finished with status 'error'
#15 215.0   ERROR: Command errored out with exit status 101:
#15 215.0    command: /usr/local/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-lov7kvuv/symbolic_c7feed9138ae4121bf0f988e8f44a22c/setup.py'"'"'; __file__='"'"'/tmp/pip-install-lov7kvuv/symbolic_c7feed9138ae4121bf0f988e8f44a22c/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-7t0x30bi
#15 215.0        cwd: /tmp/pip-install-lov7kvuv/symbolic_c7feed9138ae4121bf0f988e8f44a22c/
#15 215.0   Complete output (248 lines):
#15 215.0   running `cargo build -p symbolic-cabi --release` (release target)
#15 215.0   running bdist_wheel
#15 215.0   running build
#15 215.0   running build_py
#15 215.0   creating build/lib
#15 215.0   creating build/lib/symbolic
#15 215.0   copying symbolic/proguard.py -> build/lib/symbolic
#15 215.0   copying symbolic/common.py -> build/lib/symbolic
#15 215.0   copying symbolic/demangle.py -> build/lib/symbolic
#15 215.0   copying symbolic/__init__.py -> build/lib/symbolic
#15 215.0   copying symbolic/_compat.py -> build/lib/symbolic
#15 215.0   copying symbolic/sourcemap.py -> build/lib/symbolic
#15 215.0   copying symbolic/utils.py -> build/lib/symbolic
#15 215.0   copying symbolic/debuginfo.py -> build/lib/symbolic
#15 215.0   copying symbolic/symcache.py -> build/lib/symbolic
#15 215.0   copying symbolic/exceptions.py -> build/lib/symbolic
#15 215.0   copying symbolic/unreal.py -> build/lib/symbolic
#15 215.0   copying symbolic/minidump.py -> build/lib/symbolic
#15 215.0       Updating crates.io index
#15 215.0    Downloading crates ...
#15 215.0     Downloaded adler v1.0.2
#15 215.0     Downloaded bytes v0.5.6
#15 215.0     Downloaded crc32fast v1.2.1
#15 215.0     Downloaded heck v0.3.3
#15 215.0     Downloaded idna v0.2.3
#15 215.0     Downloaded quote v1.0.9
#15 215.0     Downloaded serde v1.0.130
#15 215.0     Downloaded serde_derive v1.0.130
#15 215.0     Downloaded fnv v1.0.7
#15 215.0     Downloaded serde_json v1.0.68
#15 215.0     Downloaded stable_deref_trait v1.2.0
#15 215.0     Downloaded syn v1.0.76
#15 215.0     Downloaded thiserror-impl v1.0.29
#15 215.0     Downloaded unicode-normalization v0.1.19
#15 215.0     Downloaded unicode-segmentation v1.8.0
#15 215.0     Downloaded arrayvec v0.5.2
#15 215.0     Downloaded byteorder v1.4.3
#15 215.0     Downloaded form_urlencoded v1.0.1
#15 215.0     Downloaded uuid v0.8.2
#15 215.0     Downloaded plain v0.2.3
#15 215.0     Downloaded anyhow v1.0.44
#15 215.0     Downloaded cc v1.0.70
#15 215.0     Downloaded instant v0.1.10
#15 215.0     Downloaded brownstone v1.0.1
#15 215.0     Downloaded itoa v0.4.8
#15 215.0     Downloaded dmsort v1.0.1
#15 215.0     Downloaded matches v0.1.9
#15 215.0     Downloaded log v0.4.14
#15 215.0     Downloaded miniz_oxide v0.4.4
#15 215.0     Downloaded num-integer v0.1.44
#15 215.0     Downloaded num-traits v0.2.14
#15 215.0     Downloaded parking_lot v0.11.2
#15 215.0     Downloaded parking_lot_core v0.8.5
#15 215.0     Downloaded percent-encoding v2.1.0
#15 215.0     Downloaded pkg-config v0.3.19
#15 215.0     Downloaded proc-macro2 v1.0.29
#15 215.0     Downloaded regex-syntax v0.6.25
#15 215.0     Downloaded rustc-demangle v0.1.21
#15 215.0     Downloaded ryu v1.0.5
#15 215.0     Downloaded scopeguard v1.1.0
#15 215.0     Downloaded indent_write v2.2.0
#15 215.0     Downloaded semver-parser v0.7.0
#15 215.0     Downloaded radium v0.5.3
#15 215.0     Downloaded string_cache v0.8.1
#15 215.0     Downloaded semver v0.9.0
#15 215.0     Downloaded debugid v0.7.2
#15 215.0     Downloaded if_chain v1.0.2
#15 215.0     Downloaded id-arena v2.2.1
#15 215.0     Downloaded bzip2 v0.4.3
#15 215.0     Downloaded aho-corasick v0.7.15
#15 215.0     Downloaded cpp_demangle v0.3.3
#15 215.0     Downloaded bitvec v0.19.5
#15 215.0     Downloaded jobserver v0.1.24
#15 215.0     Downloaded lazycell v1.3.0
#15 215.0     Downloaded precomputed-hash v0.1.1
#15 215.0     Downloaded new_debug_unreachable v1.0.4
#15 215.0     Downloaded lock_api v0.4.5
#15 215.0     Downloaded joinery v2.1.0
#15 215.0     Downloaded nom-supreme v0.4.6
#15 215.0     Downloaded pdb v0.7.0
#15 215.0     Downloaded smallvec v1.6.1
#15 215.0     Downloaded tap v1.0.1
#15 215.0     Downloaded static_assertions v1.1.0
#15 215.0     Downloaded time v0.1.43
#15 215.0     Downloaded unicode-xid v0.2.2
#15 215.0     Downloaded version_check v0.9.3
#15 215.0     Downloaded arrayvec v0.7.1
#15 215.0     Downloaded autocfg v1.0.1
#15 215.0     Downloaded cfg-if v1.0.0
#15 215.0     Downloaded bitflags v1.3.2
#15 215.0     Downloaded chrono v0.4.19
#15 215.0     Downloaded fallible-iterator v0.2.0
#15 215.0     Downloaded lazy_static v1.4.0
#15 215.0     Downloaded funty v1.1.0
#15 215.0     Downloaded phf_shared v0.8.0
#15 215.0     Downloaded memmap v0.7.0
#15 215.0     Downloaded memchr v2.3.4
#15 215.0     Downloaded siphasher v0.3.7
#15 215.0     Downloaded msvc-demangler v0.9.0
#15 215.0     Downloaded scroll_derive v0.10.5
#15 215.0     Downloaded rustc_version v0.2.3
#15 215.0     Downloaded leb128 v0.2.4
#15 215.0     Downloaded nom v6.2.1
#15 215.0     Downloaded regex v1.4.6
#15 215.0     Downloaded thiserror v1.0.29
#15 215.0     Downloaded tinyvec v1.4.0
#15 215.0     Downloaded unicode-bidi v0.3.6
#15 215.0     Downloaded walrus v0.19.0
#15 215.0     Downloaded walrus-macro v0.19.0
#15 215.0     Downloaded wasmparser v0.77.0
#15 215.0     Downloaded anylog v0.6.1
#15 215.0     Downloaded apple-crash-report-parser v0.4.2
#15 215.0     Downloaded sourcemap v6.0.1
#15 215.0     Downloaded elementtree v0.5.0
#15 215.0     Downloaded sha1 v0.6.0
#15 215.0     Downloaded base64 v0.11.0
#15 215.0     Downloaded zip v0.5.13
#15 215.0     Downloaded xml-rs v0.8.4
#15 215.0     Downloaded flate2 v1.0.22
#15 215.0     Downloaded goblin v0.4.3
#15 215.0     Downloaded wyz v0.2.0
#15 215.0     Downloaded tinyvec_macros v0.1.0
#15 215.0     Downloaded gimli v0.24.0
#15 215.0     Downloaded scroll v0.10.2
#15 215.0     Downloaded libc v0.2.102
#15 215.0     Downloaded url v2.2.2
#15 215.0     Downloaded lexical-core v0.7.6
#15 215.0     Downloaded proguard v4.1.1
#15 215.0     Downloaded bzip2-sys v0.1.11+1.0.8
#15 215.0      Compiling proc-macro2 v1.0.29
#15 215.0      Compiling unicode-xid v0.2.2
#15 215.0      Compiling syn v1.0.76
#15 215.0      Compiling libc v0.2.102
#15 215.0      Compiling serde_derive v1.0.130
#15 215.0      Compiling serde v1.0.130
#15 215.0      Compiling cfg-if v1.0.0
#15 215.0      Compiling autocfg v1.0.1
#15 215.0      Compiling memchr v2.3.4
#15 215.0      Compiling lazy_static v1.4.0
#15 215.0      Compiling ryu v1.0.5
#15 215.0      Compiling sha1 v0.6.0
#15 215.0      Compiling regex-syntax v0.6.25
#15 215.0      Compiling pkg-config v0.3.19
#15 215.0      Compiling radium v0.5.3
#15 215.0      Compiling crc32fast v1.2.1
#15 215.0      Compiling bitflags v1.3.2
#15 215.0      Compiling adler v1.0.2
#15 215.0      Compiling serde_json v1.0.68
#15 215.0      Compiling lexical-core v0.7.6
#15 215.0      Compiling siphasher v0.3.7
#15 215.0      Compiling version_check v0.9.3
#15 215.0      Compiling log v0.4.14
#15 215.0      Compiling wyz v0.2.0
#15 215.0      Compiling tinyvec_macros v0.1.0
#15 215.0      Compiling anyhow v1.0.44
#15 215.0      Compiling precomputed-hash v0.1.1
#15 215.0      Compiling stable_deref_trait v1.2.0
#15 215.0      Compiling tap v1.0.1
#15 215.0      Compiling new_debug_unreachable v1.0.4
#15 215.0      Compiling unicode-segmentation v1.8.0
#15 215.0      Compiling parking_lot_core v0.8.5
#15 215.0      Compiling static_assertions v1.1.0
#15 215.0      Compiling itoa v0.4.8
#15 215.0      Compiling arrayvec v0.5.2
#15 215.0      Compiling funty v1.1.0
#15 215.0      Compiling arrayvec v0.7.1
#15 215.0      Compiling smallvec v1.6.1
#15 215.0      Compiling matches v0.1.9
#15 215.0      Compiling scopeguard v1.1.0
#15 215.0      Compiling xml-rs v0.8.4
#15 215.0      Compiling fallible-iterator v0.2.0
#15 215.0      Compiling leb128 v0.2.4
#15 215.0      Compiling id-arena v2.2.1
#15 215.0      Compiling byteorder v1.4.3
#15 215.0      Compiling unicode-bidi v0.3.6
#15 215.0      Compiling wasmparser v0.77.0
#15 215.0      Compiling joinery v2.1.0
#15 215.0      Compiling indent_write v2.2.0
#15 215.0      Compiling percent-encoding v2.1.0
#15 215.0      Compiling plain v0.2.3
#15 215.0      Compiling cpp_demangle v0.3.3
#15 215.0      Compiling lazycell v1.3.0
#15 215.0      Compiling dmsort v1.0.1
#15 215.0      Compiling base64 v0.11.0
#15 215.0      Compiling if_chain v1.0.2
#15 215.0      Compiling fnv v1.0.7
#15 215.0      Compiling rustc-demangle v0.1.21
#15 215.0      Compiling bytes v0.5.6
#15 215.0      Compiling instant v0.1.10
#15 215.0      Compiling miniz_oxide v0.4.4
#15 215.0      Compiling num-traits v0.2.14
#15 215.0      Compiling num-integer v0.1.44
#15 215.0      Compiling msvc-demangler v0.9.0
#15 215.0      Compiling phf_shared v0.8.0
#15 215.0      Compiling tinyvec v1.4.0
#15 215.0      Compiling nom v6.2.1
#15 215.0      Compiling heck v0.3.3
#15 215.0      Compiling brownstone v1.0.1
#15 215.0      Compiling lock_api v0.4.5
#15 215.0      Compiling gimli v0.24.0
#15 215.0      Compiling form_urlencoded v1.0.1
#15 215.0      Compiling unicode-normalization v0.1.19
#15 215.0      Compiling quote v1.0.9
#15 215.0      Compiling time v0.1.43
#15 215.0      Compiling memmap v0.7.0
#15 215.0      Compiling jobserver v0.1.24
#15 215.0      Compiling aho-corasick v0.7.15
#15 215.0      Compiling bitvec v0.19.5
#15 215.0      Compiling idna v0.2.3
#15 215.0      Compiling parking_lot v0.11.2
#15 215.0      Compiling cc v1.0.70
#15 215.0      Compiling regex v1.4.6
#15 215.0      Compiling flate2 v1.0.22
#15 215.0      Compiling url v2.2.2
#15 215.0      Compiling bzip2-sys v0.1.11+1.0.8
#15 215.0      Compiling symbolic-demangle v8.3.0 (/tmp/tmpinjiwo3l/rustsrc/symbolic-demangle)
#15 215.0      Compiling symbolic-minidump v8.3.0 (/tmp/tmpinjiwo3l/rustsrc/symbolic-minidump)
#15 215.0      Compiling scroll_derive v0.10.5
#15 215.0      Compiling thiserror-impl v1.0.29
#15 215.0      Compiling walrus-macro v0.19.0
#15 215.0      Compiling nom-supreme v0.4.6
#15 215.0      Compiling scroll v0.10.2
#15 215.0      Compiling thiserror v1.0.29
#15 215.0      Compiling walrus v0.19.0
#15 215.0      Compiling goblin v0.4.3
#15 215.0      Compiling uuid v0.8.2
#15 215.0      Compiling string_cache v0.8.1
#15 215.0      Compiling chrono v0.4.19
#15 215.0      Compiling debugid v0.7.2
#15 215.0      Compiling pdb v0.7.0
#15 215.0      Compiling proguard v4.1.1
#15 215.0      Compiling elementtree v0.5.0
#15 215.0      Compiling sourcemap v6.0.1
#15 215.0      Compiling anylog v0.6.1
#15 215.0      Compiling apple-crash-report-parser v0.4.2
#15 215.0      Compiling symbolic-common v8.3.0 (/tmp/tmpinjiwo3l/rustsrc/symbolic-common)
#15 215.0      Compiling symbolic-sourcemap v8.3.0 (/tmp/tmpinjiwo3l/rustsrc/symbolic-sourcemap)
#15 215.0      Compiling symbolic-unreal v8.3.0 (/tmp/tmpinjiwo3l/rustsrc/symbolic-unreal)
#15 215.0      Compiling bzip2 v0.4.3
#15 215.0      Compiling zip v0.5.13
#15 215.0      Compiling symbolic-debuginfo v8.3.0 (/tmp/tmpinjiwo3l/rustsrc/symbolic-debuginfo)
#15 215.0      Compiling symbolic-symcache v8.3.0 (/tmp/tmpinjiwo3l/rustsrc/symbolic-symcache)
#15 215.0      Compiling symbolic v8.3.0 (/tmp/tmpinjiwo3l/rustsrc/symbolic)
#15 215.0      Compiling symbolic-cabi v8.3.0 (/tmp/tmpinjiwo3l/rustsrc/symbolic-cabi)
#15 215.0   error: could not compile `symbolic-cabi`
#15 215.0   
#15 215.0   Caused by:
#15 215.0     process didn't exit successfully: `rustc --crate-name symbolic_cabi --edition=2018 symbolic-cabi/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type cdylib --emit=dep-info,link -C opt-level=3 -C lto -C debuginfo=2 -C metadata=cf090e6a750076c4 --out-dir /tmp/tmpinjiwo3l/rustsrc/target/release/deps -L dependency=/tmp/tmpinjiwo3l/rustsrc/target/release/deps --extern apple_crash_report_parser=/tmp/tmpinjiwo3l/rustsrc/target/release/deps/libapple_crash_report_parser-57aff2f20ed12009.rlib --extern proguard=/tmp/tmpinjiwo3l/rustsrc/target/release/deps/libproguard-4122867751b39496.rlib --extern serde_json=/tmp/tmpinjiwo3l/rustsrc/target/release/deps/libserde_json-b14a0e8e9226213b.rlib --extern symbolic=/tmp/tmpinjiwo3l/rustsrc/target/release/deps/libsymbolic-c2805237c280ac96.rlib -L native=/tmp/tmpinjiwo3l/rustsrc/target/release/build/bzip2-sys-a024d4c73911e7a8/out/lib -L native=/tmp/tmpinjiwo3l/rustsrc/target/release/build/symbolic-demangle-1cffc508f02c41d3/out -L native=/tmp/tmpinjiwo3l/rustsrc/target/release/build/symbolic-minidump-64dc4ac0b7d4ebcc/out -L native=/tmp/tmpinjiwo3l/rustsrc/target/release/build/symbolic-minidump-64dc4ac0b7d4ebcc/out` (signal: 9, SIGKILL: kill)
#15 215.0   ----------------------------------------
#15 215.0   ERROR: Failed building wheel for symbolic
#15 215.0   Running setup.py clean for symbolic
#15 215.5 Successfully built click-didyoumean encore inotify-simple psycopg2 pyrsistent
#15 215.5 Failed to build symbolic
#15 215.9 Installing collected packages: pycparser, six, cffi, wcwidth, vine, urllib3, pytz, python-dateutil, pyparsing, markupsafe, jmespath, idna, cryptography, charset-normalizer, certifi, tomli, toml, sqlparse, sphinxcontrib-serializinghtml, sphinxcontrib-qthelp, sphinxcontrib-jsmath, sphinxcontrib-htmlhelp, sphinxcontrib-devhelp, sphinxcontrib-applehelp, snowballstemmer, requests, pyopenssl, pygments, py, prompt-toolkit, pluggy, packaging, jinja2, iniconfig, imagesize, docutils, decorator, click, botocore, babel, attrs, amqp, alabaster, typing-extensions, sphinx, s3transfer, regex, redis, pytest, pyrsistent, pyflakes, pycodestyle, platformdirs, pep517, pathspec, mypy-extensions, milksnake, mccabe, markus, kombu, josepy, django, datadog, click-repl, click-plugins, click-didyoumean, billiard, whitenoise, urlwait, ujson, symbolic, sphinxcontrib-httpdomain, sphinx-rtd-theme, requests-mock, raven, pytest-mock, pytest-django, psycopg2, pip-tools, msgpack, mozilla-django-oidc, mock, jsonschema, inotify-simple, honcho, gunicorn, flake8, falcon, everett, encore, dockerflow, django-redis, django-configurations, django-cache-memoize, dj-database-url, celery, boto3, boltons, black
#15 219.8     Running setup.py install for symbolic: started

Interestingly, it proceeds to "setup.py install for symbolic" anyway, and then just hangs.

I'd like to avoid installing rustc and friends into the app container because that increases the surface for security issues. If we go the "we're building symbolic from source" route, we'd do it in a separate build container. However, that adds a bunch of complexity, so I was looking for things we could do to avoid that.

The issue you linked to suggests downgrading to node 14. Does this patch work?

diff --git a/docker/Dockerfile b/docker/Dockerfile
index 6839a8bf..9bc77182 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -1,5 +1,5 @@
 # NOTE(willkg): Make sure to update frontend/Dockerfile when you update this
-FROM node:16.9.0-slim@sha256:fca208cb6a90179412cc78ac590a81c3b802b2d3a66b202e31586a9b702e101c as frontend
+FROM node:14.17.6-slim@sha256:56e3ae9f6981acb5525427c37eacc73c8ad400f0fef155c4064447f220816cbc as frontend
 
 # these build args are turned into env vars
 # and used in bin/build_frontend.sh

That worked!

willkg merged PR #2421: "bug 1731412: downgrade to node 14" in e2d280f.

Thank you, Markus! I really appreciate the help!

Thank you for fixing this!

This went to production in bug #1733473. Marking as FIXED.

Note that this is just a stopgap fix. We should do a better fix, but I probably need access to an m1 to do that.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: