distr1 / distri

a Linux distribution to research fast package management
https://distr1.org
Other
532 stars 28 forks source link

Issue running Docker image #76

Closed bradfordboyle closed 4 years ago

bradfordboyle commented 4 years ago

Env - Debian Buster

$ uname -a
Linux buster 4.19.0-8-cloud-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux

$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

$ docker version
docker version
Client: Docker Engine - Community
 Version:           19.03.8
 API version:       1.40
 Go version:        go1.12.17
 Git commit:        afacb8b7f0
 Built:             Wed Mar 11 01:25:56 2020
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.8
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.17
  Git commit:       afacb8b7f0
  Built:            Wed Mar 11 01:24:28 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.2.13
  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

Env - Debian Bullseye

$ uname -a
Linux bullseye 5.6.0-1-amd64 #1 SMP Debian 5.6.7-1 (2020-04-29) x86_64 GNU/Linux

$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux bullseye/sid"
NAME="Debian GNU/Linux"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

$ docker version
Client:
 Version:           19.03.7
 API version:       1.40
 Go version:        go1.14.2
 Git commit:        7141c19
 Built:             Tue, 21 Apr 2020 13:32:19 +0700
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          19.03.7
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.14.2
  Git commit:       7141c19
  Built:            Tue Apr 21 06:32:19 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          19.03.7
  GitCommit:        7c1e88399ec0b0b077121d9d5ad97e647b11c870
 runc:
  Version:          1.0.0~rc10+dfsg2
  GitCommit:        1.0.0~rc10+dfsg2-1
 docker-init:
  Version:          0.18.0
  GitCommit:

Launching Docker Container

Taken from Getting Started

# supersilverhaze <=> sha256:62d4f67bdf18632f9bd4038fe0af80f10a898604406ea9c5ba7c3b332f4ac50b
docker pull distr1/distri@sha256:62d4f67bdf18632f9bd4038fe0af80f10a898604406ea9c5ba7c3b332f4ac50b
docker run \
    --privileged \
    --entrypoint /entrypoint \
    -ti \
    -e TERM=$TERM \
    distr1/distri@sha256:62d4f67bdf18632f9bd4038fe0af80f10a898604406ea9c5ba7c3b332f4ac50b

Inside Container

Taken from C build environment

distri install git
distri install autoconf automake make gcc libxcb xorgproto

git clone https://github.com/i3/i3lock
cd i3lock
autoreconf -fi

The above fails with

autoreconf: cannot create /tmp/ar3914.75: No such file or directory at /to/auto omg-amd64-2.69-6/out/bin/autoreconf line 689

This can be fixed with mkdir /tmp and re-running autoreconf -fi

For the buster environment, autoreconf -fi still fails with

aclocal: error: couldn't open directory '/ro/automake-amd64-1.16.2-7/out/share/aclocal-1.16': Function not implemented autoreconf: aclocal failed with exit status: 1

mkdir build && cd build
../configure

However, configure is failing because gcc always returns 1.

stapelberg commented 4 years ago

Thanks for the detailed report. I can reproduce both issues you reported (/tmp being absent and gcc not working).

Interestingly, gcc works when using qemu, so this seems to be specific to docker somehow.

stapelberg commented 4 years ago

Explicitly starting the dynamic linker seems to work:

bash-5.0# /ro/gcc-amd64-9.3.0-4/out/bin/gcc --version
bash: /ro/gcc-amd64-9.3.0-4/out/bin/gcc: No such file or directory

bash-5.0# /ro/glibc-amd64-2.31-4/out/lib/ld-linux-x86-64.so.2 !!
/ro/glibc-amd64-2.31-4/out/lib/ld-linux-x86-64.so.2 /ro/gcc-amd64-9.3.0-4/out/bin/gcc --version
gcc (GCC) 9.3.0
stapelberg commented 4 years ago

Ah, right, now I remember: this is the /lib64 top-level symlink missing, in combination with the gcc package build not respecting our -Wl,--dynamic-linker flag.

I’ll get the /tmp and /lib64 files added.

stapelberg commented 4 years ago

Alright, this is fixed with commit a1157458b8269e590f7ba6bb64c9611f93e43cb2, and an updated docker image has been pushed (DIGEST:sha256:829384939537a74c5c8c62bb76eec14b4cadc25bc205516393fa6fe64dc0bf85)