Closed xuchenhao001 closed 6 years ago
Ok, I found a way to build glibc, inspired by linux-on-ibm-z/docs. Hope this is helpful for others:
$ cd $GOPATH/src/github.com/projectcalico/
$ git clone https://github.com/sgerrand/docker-glibc-builder.git
$ cd docker-glibc-builder
$ git checkout 2.26-0
$ sed -i 's/ubuntu:16.04/s390x\/ubuntu:16.04/' Dockerfile
$ docker build -t glibc-builder .
$ docker run --rm -e STDOUT=1 glibc-builder 2.26 /usr/glibc-compat > glibc-bin-2.26.tar.gz
$ cat << EOF > ld.so.conf
# libc default configuration
/usr/local/lib
/usr/glibc-compat/lib
/usr/lib
/lib
EOF
Now I'm working on IBM Z (not x86, but s390x architecture). For some reasons I need a glibc in my s390x/alpine:latest container.
But there is no apk support for s390x, and I don't know how to build
glibc-2.26-r0.apk
andglibc-bin-2.26-r0.apk
in a s390x/alpine:latest container. How can I build it from source? Thanks!