Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

torcx store has archives of wrong arch #2366

Closed
glevand opened this issue Feb 21, 2018 · 4 comments
Closed

torcx store has archives of wrong arch #2366

glevand opened this issue Feb 21, 2018 · 4 comments

Comments

@glevand
Copy link

glevand commented Feb 21, 2018

Issue Report

Bug

Container Linux Version

Local build:

NAME="Container Linux by CoreOS"
ID=coreos
VERSION=1688.0.0+2018-02-14-1153
VERSION_ID=1688.0.0
BUILD_ID=2018-02-14-1153
PRETTY_NAME="Container Linux by CoreOS 1688.0.0+2018-02-14-1153 (Rhyolite)"
ANSI_COLOR="38;5;75"
HOME_URL="https://coreos.com/"
BUG_REPORT_URL="https://issues.coreos.com"
COREOS_BOARD="arm64-usr"

Environment

qemu-system-aarch64 on ubuntu host.

Other Information

Docker wasn't working and I saw this in the journal:

developer-1688 env[755]: /run/torcx/bin/containerd: /run/torcx/bin/containerd: cannot execute binary file

From the console I found this:

core@developer-1688 ~ $ uname -m
aarch64
core@developer-1688 ~ $ head /run/torcx/bin/containerd | od -S 4
0001250 /lib64/ld-linux-x86-64.so.2
core@developer-1688 ~ $ rm -rf /tmp/t-test; mkdir -p /tmp/t-test && tar -C /tmp/t-test -xf /usr/share/torcx/store/docker\:18.02.torcx.tgz && head /tmp/t-test/bin/containerd | od -S 4
0001250 /lib64/ld-linux-x86-64.so.2

So it seems amd64 torcx packages are getting used somehow. But it does seem the SDK builds arm64 torcx packages. From the SDK:

$ rm -rf /tmp/t1; mkdir -p /tmp/t1 && tar -C /tmp/t1 -xf ~/trunk/src/build/torcx/pkgs/arm64-usr/docker/554b6946fddbe87f7a1620dbcaf4e5c735db0ba37dfc5e4f62f61d06904c4d56156bdf19ec406a365020858e229e5eef0acdd5aac5ae6c9ebafccfad52343822/docker\:1.12.torcx.tgz && head /tmp/t1/bin/containerd | od -S 4 | egrep 'ld-linux'
0001160 /lib/ld-linux-aarch64.so.1

I'll look into how the torcx packages get into the store and why the wrong arch packages are getting used. Any pointers would be appreciated.

@euank
Copy link
Contributor

euank commented Feb 21, 2018

The files are copied into the image here.

It looks like a few other bits of code near there use FLAGS_board, not BOARD; want to check if that's the issue?

@dm0-
Copy link

dm0- commented Feb 21, 2018

It looks like containerd cross-compilation broke with 1.0.1 (Docker 18.02). I can look into it tomorrow unless you want to handle it.

@glevand
Copy link
Author

glevand commented Feb 21, 2018

@dm0- I want to look into how torcx works, so I'll try to fix it.

@dm0-
Copy link

dm0- commented Feb 21, 2018

Okay, but note that the problem is not related to torcx. It's still broken if you run emerge-arm64-usr containerd.

glevand added a commit to glevand/coreos--coreos-overlay that referenced this issue Feb 21, 2018
A call to coreos-go_src_prepare in src_prepare will get go_export
called, which exports the correct GOARCH value.

Fixes coreos/bugs#2366 (torcx store has
archives of wrong arch).

Signed-off-by: Geoff Levand <geoff@infradead.org>
glevand added a commit to glevand/coreos--coreos-overlay that referenced this issue Feb 21, 2018
A call to coreos-go_src_prepare in src_prepare will get go_export
called, which exports the correct GOARCH value.

Fixes coreos/bugs#2366 (torcx store has
archives of wrong arch).

Signed-off-by: Geoff Levand <geoff@infradead.org>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants