Browse Source

add packages gcompat & libgcc to fix execution of `toitc` executable

Fabian Peter Hammerle 2 years ago
parent
commit
c92a60a148
2 changed files with 26 additions and 1 deletions
  1. 2 0
      CHANGELOG.md
  2. 24 1
      Dockerfile

+ 2 - 0
CHANGELOG.md

@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
 ## [Unreleased]
+### Added
+- packages gcompat & libgcc to fix execution of `toitc` executable
 
 ## [0.1.0] - 2022-02-20
 ### Added

+ 24 - 1
Dockerfile

@@ -1,5 +1,24 @@
 FROM docker.io/alpine:3.15.0
 
+# > $ ldd /home/toit/.cache/toit/sdk/v1.6.6/toitc
+# > 	/lib64/ld-linux-x86-64.so.2 (0x7fb9e844b000)
+# > 	libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7fb9e844b000)
+# > 	libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x7fb9e844b000)
+# > 	libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7fb9e844b000)
+# > Error loading shared library libgcc_s.so.1: No such file or directory (needed by /home/toit/.cache/toit/sdk/v1.6.6/toitc)
+# > 	libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7fb9e844b000)
+# > Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /home/toit/.cache/toit/sdk/v1.6.6/toitc)
+# > Error relocating /home/toit/.cache/toit/sdk/v1.6.6/toitc: _Unwind_GetRegionStart: symbol not found
+# > Error relocating /home/toit/.cache/toit/sdk/v1.6.6/toitc: _Unwind_SetGR: symbol not found
+# > Error relocating /home/toit/.cache/toit/sdk/v1.6.6/toitc: backtrace: symbol not found
+# > Error relocating /home/toit/.cache/toit/sdk/v1.6.6/toitc: _Unwind_GetDataRelBase: symbol not found
+# > Error relocating /home/toit/.cache/toit/sdk/v1.6.6/toitc: __vprintf_chk: symbol not found
+# > Error relocating /home/toit/.cache/toit/sdk/v1.6.6/toitc: __fprintf_chk: symbol not found
+# > Error relocating /home/toit/.cache/toit/sdk/v1.6.6/toitc: __printf_chk: symbol not found
+# > [...]
+# > $ file /home/toit/.cache/toit/sdk/v1.6.6/toitc
+# > [...] interpreter /lib64/ld-linux-x86-64.so.2, [...]
+
 # > $ grep -azoP -- '\-+BEGIN CERTIFICATE\-+[\sa-zA-Z0-9\+/]+\=*\s\-+END CERTIFICATE\-+\s' \
 # >   /usr/local/bin/toit | openssl x509 -noout -serial -subject -issuer -dates -fingerprint
 # > serial=02008EB2023336658B64CDDB9B
@@ -13,7 +32,11 @@ FROM docker.io/alpine:3.15.0
 SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
 ARG TOIT_VERSION=1.18.2
 # hadolint ignore=DL3018
-RUN apk add --no-cache ca-certificates curl \
+RUN apk add --no-cache \
+        ca-certificates \
+        curl \
+        gcompat `# toitc` \
+        libgcc `# toitc` \
     && curl https://archive.toit.io/cli/v${TOIT_VERSION}/linux \
         | tar -xvzf - -C /usr/local/bin \
     && apk del ca-certificates curl \