docker-alpine-glibc icon indicating copy to clipboard operation
docker-alpine-glibc copied to clipboard

Does it work on aarch64 (arm)?

Open sekarpdkt opened this issue 5 years ago • 3 comments

I am getting following error.


$docker-compose build
Building alpineglibc
Step 1/4 : FROM alpine:3.9
3.9: Pulling from library/alpine
Digest: sha256:28ef97b8686a0b5399129e9b763d5b7e5ff03576aa5580d6f4182a49c5fe1913
Status: Downloaded newer image for alpine:3.9
 ---> 660030ffd296
Step 2/4 : MAINTAINER Jean Blanchard <[email protected]>
 ---> Running in 068ba3d2f007
Removing intermediate container 068ba3d2f007
 ---> 5b3cc75f70dc
Step 3/4 : ENV GLIBC_VERSION 2.29-r0
 ---> Running in 02d6e4bdd031
Removing intermediate container 02d6e4bdd031
 ---> 08fa8c53276b
Step 4/4 : RUN apk add --update curl &&   curl -Lo /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub &&   curl -Lo glibc.apk "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk" &&   curl -Lo glibc-bin.apk "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-bin-${GLIBC_VERSION}.apk" &&   apk add glibc-bin.apk glibc.apk &&   /usr/glibc-compat/sbin/ldconfig /lib /usr/glibc-compat/lib &&   echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf &&   apk del curl && rm -rf glibc.apk glibc-bin.apk /var/cache/apk/*
 ---> Running in a8cb34dedd98
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/aarch64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/aarch64/APKINDEX.tar.gz
(1/5) Installing ca-certificates (20190108-r0)
(2/5) Installing nghttp2-libs (1.35.1-r0)
(3/5) Installing libssh2 (1.8.2-r0)
(4/5) Installing libcurl (7.64.0-r1)
(5/5) Installing curl (7.64.0-r1)
Executing busybox-1.29.3-r10.trigger
Executing ca-certificates-20190108-r0.trigger
OK: 7 MiB in 19 packages
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   451  100   451    0     0    268      0  0:00:01  0:00:01 --:--:--   268
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   622    0   622    0     0    540      0 --:--:--  0:00:01 --:--:--   541
100 2006k  100 2006k    0     0   462k      0  0:00:04  0:00:04 --:--:--  661k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   626    0   626    0     0    601      0 --:--:--  0:00:01 --:--:--   601
100  963k  100  963k    0     0   9355      0  0:01:45  0:01:45 --:--:-- 10881
(1/3) Installing glibc (2.29-r0)
(2/3) Installing libgcc (8.3.0-r0)
(3/3) Installing glibc-bin (2.29-r0)
Executing glibc-bin-2.29-r0.trigger
/usr/glibc-compat/sbin/ldconfig: line 1: syntax error: unexpected "("
ERROR: glibc-bin-2.29-r0.trigger: script exited with error 2
OK: 13 MiB in 22 packages
/usr/glibc-compat/sbin/ldconfig: line 1: syntax error: unexpected "("
ERROR: Service 'alpineglibc' failed to build: The command '/bin/sh -c apk add --update curl &&   curl -Lo /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub &&   curl -Lo glibc.apk "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk" &&   curl -Lo glibc-bin.apk "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-bin-${GLIBC_VERSION}.apk" &&   apk add glibc-bin.apk glibc.apk &&   /usr/glibc-compat/sbin/ldconfig /lib /usr/glibc-compat/lib &&   echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf &&   apk del curl && rm -rf glibc.apk glibc-bin.apk /var/cache/apk/*' returned a non-zero code: 2

sekarpdkt avatar May 08 '19 06:05 sekarpdkt

The alpine base image has an arm64 version, but the glibc package I use has not. There seems to be ongoing work to make it multiarch, or possibly if I read the issues there correctly, compiling the glibc package on a arm64 machine should just work.

Please do report back if you manage to find a solution...

jeanblanchard avatar May 11 '19 09:05 jeanblanchard

@jeanblanchard there's glibc for arm in this repo: https://github.com/ljfranklin/alpine-pkg-glibc. Would that one works?

Regards,

Martinus

martinussuherman avatar Mar 04 '21 16:03 martinussuherman

Here's another log when I tried building the image on my Arch Linux ARM's aarch64 installation for your reference.

[alarm@alarm comp]$ docker build . -f docker-alpine-glibc.Dockerfile -t docker-alpine-glibc:latest
Sending build context to Docker daemon  3.584kB
Step 1/4 : FROM alpine:3.13.2
 ---> 02480aeb44d7
Step 2/4 : MAINTAINER Jean Blanchard <[email protected]>
 ---> Running in 831eabfff2dd
Removing intermediate container 831eabfff2dd
 ---> 00a7d06eeb9c
Step 3/4 : ENV GLIBC_VERSION 2.33-r0
 ---> Running in e36bd2177012
Removing intermediate container e36bd2177012
 ---> cf5e3e8b8abc
Step 4/4 : RUN apk add --update curl &&   curl -Lo /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub &&   curl -Lo glibc.apk "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk" &&   curl -Lo glibc-bin.apk "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-bin-${GLIBC_VERSION}.apk" &&   apk add glibc-bin.apk glibc.apk &&   /usr/glibc-compat/sbin/ldconfig /lib /usr/glibc-compat/lib &&   echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf &&   apk del curl &&   rm -rf glibc.apk glibc-bin.apk /var/cache/apk/*
 ---> Running in a24be2c2b14b
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/aarch64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/aarch64/APKINDEX.tar.gz
(1/5) Installing ca-certificates (20191127-r5)
(2/5) Installing brotli-libs (1.0.9-r3)
(3/5) Installing nghttp2-libs (1.42.0-r1)
(4/5) Installing libcurl (7.74.0-r1)
(5/5) Installing curl (7.74.0-r1)
Executing busybox-1.32.1-r3.trigger
Executing ca-certificates-20191127-r5.trigger
OK: 8 MiB in 19 packages
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   451  100   451    0     0    410      0  0:00:01  0:00:01 --:--:--   410
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   638    0   638    0     0   1657      0 --:--:-- --:--:-- --:--:--  1657
100 4346k  100 4346k    0     0  1793k      0  0:00:02  0:00:02 --:--:-- 3146k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   642  100   642    0     0   1778      0 --:--:-- --:--:-- --:--:--  1778
100 1011k  100 1011k    0     0   720k      0  0:00:01  0:00:01 --:--:-- 1075k
(1/3) Installing glibc (2.33-r0)
(2/3) Installing libgcc (10.2.1_pre1-r3)
(3/3) Installing glibc-bin (2.33-r0)
Executing glibc-bin-2.33-r0.trigger
/usr/glibc-compat/sbin/ldconfig: /usr/glibc-compat/sbin/ldconfig: line 1: line 1: @8: not foundELF: not found

/usr/glibc-compat/sbin/ldconfig: line 2: @@00@@%�: not found
/usr/glibc-compat/sbin/ldconfig: line 3: %�: not found
/usr/glibc-compat/sbin/ldconfig: line 4: syntax error: unexpected word (expecting ")")
ERROR: glibc-bin-2.33-r0.trigger: script exited with error 2
OK: 19 MiB in 22 packages
/usr/glibc-compat/sbin/ldconfig: line 1: @8: not found
/usr/glibc-compat/sbin/ldconfig: line 1: ELF: not found
/usr/glibc-compat/sbin/ldconfig: line 2: @@00@@%�: not found
/usr/glibc-compat/sbin/ldconfig: line 3: %�: not found
/usr/glibc-compat/sbin/ldconfig: line 4: syntax error: unexpected word (expecting ")")
The command '/bin/sh -c apk add --update curl &&   curl -Lo /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub &&   curl -Lo glibc.apk "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk" &&   curl -Lo glibc-bin.apk "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-bin-${GLIBC_VERSION}.apk" &&   apk add glibc-bin.apk glibc.apk &&   /usr/glibc-compat/sbin/ldconfig /lib /usr/glibc-compat/lib &&   echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf &&   apk del curl &&   rm -rf glibc.apk glibc-bin.apk /var/cache/apk/*' returned a non-zero code: 2

gridhead avatar Mar 08 '21 04:03 gridhead