devtoolset-container icon indicating copy to clipboard operation
devtoolset-container copied to clipboard

arm64 architecture

Open pbukva opened this issue 6 years ago • 10 comments

It would be really useful to support other architectures, especially the arm64. I tried a quick hack - in Dockerfile (for 7-toolchain & centos7) change standard x86_64 arch base image from centos:centos7 to arm64v8/centos:centos7, and then run make build TARGET=centos7 VERSION=7-toolchain, build have been going for short time and then failed trying to fetch repodata from wrong url (http://mirror.centos.org/centos/7/sclo/aarch64/rh/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found) - please see bellow the full log output. Have been looking around, and found that this http://mirror.centos.org/altarch/7/os/aarch64/repodata/repomd.xml url might be the right one, but this would need to confirmed.

make[1]: Entering directory '/home/rock64/src/devtoolset-container'
VERSION="6-toolchain" SKIP_SQUASH=1 UPDATE_BASE= OS=centos7 CLEAN_AFTER= OPENSHIFT_NAMESPACES="" common/build.sh
-> Version 6-toolchain: building image from 'Dockerfile' ...
Sending build context to Docker daemon  32.77kB

Step 1/14 : FROM centos:centos7
 ---> 5f65840122d0
Step 2/14 : LABEL MAINTAINER Marek Polacek <[email protected]>
 ---> Using cache
 ---> 82165c306bda
Step 3/14 : ENV SUMMARY="Red Hat Developer Toolset 6 Toolchain container image"     DESCRIPTION="Platform for building C/C++ applications using Red Hat Developer Toolset 6. Red Hat Developer Toolset is a Red Hat offering for developers on the Red Hat Enterprise Linux platform. It provides a complete set of development and performance analysis tools that can be installed and used on multiple versions of Red Hat Enterprise Linux. Executables built with the Red Hat Developer Toolset toolchain can then also be deployed and run on multiple versions of Red Hat Enterprise Linux."
 ---> Using cache
 ---> b1aa40e41b23
Step 4/14 : LABEL com.redhat.component="devtoolset-6-toolchain-docker"       name="centos/devtoolset-6-toolchain-centos7"       version="6"       summary="$SUMMARY"       description="$DESCRIPTION"       io.k8s.description="$DESCRIPTION"       io.k8s.display-name="Developer Toolset 6 Toolchain"       usage="docker run -ti -v /src/app:/opt/app-root/src:z centos/devtoolset-6-toolchain-centos7 bash"
 ---> Using cache
 ---> b5ef1044b1b8
Step 5/14 : RUN yum install -y centos-release-scl-rh &&     INSTALL_PKGS="devtoolset-6-gcc devtoolset-6-gcc-c++ devtoolset-6-gcc-gfortran devtoolset-6-gdb" &&     yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS &&     rpm -V $INSTALL_PKGS &&     yum clean all -y
 ---> Running in 2bfcf966a1d6
Loaded plugins: fastestmirror, ovl
[91mhttp://mirror.centos.org/altarch/7/os/aarch64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2a00:1650:1000:0:225:90ff:fe47:267a: Cannot assign requested address"
[0m[91mTrying other mirror.
[0mDetermining fastest mirrors
Resolving Dependencies
--> Running transaction check
---> Package centos-release-scl-rh.noarch 0:2-2.el7.centos will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                    Arch        Version               Repository   Size
================================================================================
Installing:
 centos-release-scl-rh      noarch      2-2.el7.centos        extras       12 k

Transaction Summary
================================================================================
Install  1 Package

Total download size: 12 k
Installed size: 19 k
Downloading packages:
[91mwarning: /var/cache/yum/aarch64/7/extras/packages/centos-release-scl-rh-2-2.el7.centos.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
[0mPublic key for centos-release-scl-rh-2-2.el7.centos.noarch.rpm is not installed
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[91mImporting GPG key 0xF4A80EB5:
 Userid     : "CentOS-7 Key (CentOS 7 Official Signing Key) <[email protected]>"
 Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
 Package    : centos-release-7-4.1708.el7.centos.altarch.1.aarch64 (@instUpdates)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[0mRetrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64
[91mImporting GPG key 0x305D49D6:
 Userid     : "CentOS AltArch SIG - AArch64 (http://wiki.centos.org/SpecialInterestGroup/AltArch/AArch64) <[email protected]>"
 Fingerprint: ef8f 3ca6 6efd f32b 36cd adf7 6c7c b6ef 305d 49d6
 Package    : centos-release-7-4.1708.el7.centos.altarch.1.aarch64 (@instUpdates)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64
[0mRunning transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : centos-release-scl-rh-2-2.el7.centos.noarch                  1/1 
  Verifying  : centos-release-scl-rh-2-2.el7.centos.noarch                  1/1 

Installed:
  centos-release-scl-rh.noarch 0:2-2.el7.centos                                 

Complete!
Loaded plugins: fastestmirror, ovl
[91mhttp://mirror.centos.org/centos/7/sclo/aarch64/rh/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
[0m[91mTrying other mirror.
[0m[91mTo address this issue please refer to the below wiki article 

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.

[0m[91m

 One of the configured repositories failed (CentOS-7 - SCLo rh),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo=centos-sclo-rh ...

     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:

            yum-config-manager --disable centos-sclo-rh
        or
            subscription-manager repos --disable=centos-sclo-rh

     5. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager --save --setopt=centos-sclo-rh.skip_if_unavailable=true

failure: repodata/repomd.xml from centos-sclo-rh: [Errno 256] No more mirrors to try.
http://mirror.centos.org/centos/7/sclo/aarch64/rh/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
[0mThe command '/bin/sh -c yum install -y centos-release-scl-rh &&     INSTALL_PKGS="devtoolset-6-gcc devtoolset-6-gcc-c++ devtoolset-6-gcc-gfortran devtoolset-6-gdb" &&     yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS &&     rpm -V $INSTALL_PKGS &&     yum clean all -y' returned a non-zero code: 1
common/common.mk:51: recipe for target '6-toolchain' failed
make[1]: *** [6-toolchain] Error 1
make[1]: Leaving directory '/home/rock64/src/devtoolset-container'
common/common.mk:40: recipe for target 'build-serial' failed
make: *** [build-serial] Error 2

pbukva avatar May 28 '18 04:05 pbukva

@khardix What is a status of CentOS infrastructure for alternative architectures? Is it even possible to rebuild SCL for arm64?

omron93 avatar May 28 '18 08:05 omron93

@omron93 Yes, it should be possible to rebuild a SCL for aarch64/ppce64le. It is not enabled by default, however, and it must be requested via ticket in https://bugs.centos.org.

Currently the only collections built in this way are devtoolset-6 and -7. The link found by @pbukva should indeed be the correct one.

khardix avatar May 29 '18 08:05 khardix

Currently the only collections built in this way are devtoolset-6 and -7.

And how it can be accessible? See log in https://github.com/sclorg/devtoolset-container/issues/31#issue-326890381

omron93 avatar May 29 '18 11:05 omron93

Ah, sorry, I failed to spot that the path in OP is different than the one I looked into :blush:. The correct baseurl is http://mirror.centos.org/altarch/7/sclo/aarch64/rh/.

I'm not aware of any prepared repo configuration in lieu of centos-release-scl* package for alternative architectures, so the repository must probably be added manually.

khardix avatar May 29 '18 12:05 khardix

@pbukva So possible changes to be able to build this image for aarch64 are:

  • change base image
  • instead of https://github.com/sclorg/devtoolset-container/blob/master/7-toolchain/Dockerfile#L23-L24 have RUN yum-config-manager --add-repo=http://mirror.centos.org/altarch/7/sclo/aarch64/rh/ && \

Please comment if it works. Thanks.

omron93 avatar May 29 '18 16:05 omron93

I had to move fast in order to test stuff on arm64 arch, so I switched to ubuntu:18:04 image & installed dev toolchain there quickly. But I will return to this later, probably this by end of this week, and test the suggested solution.

pbukva avatar May 29 '18 18:05 pbukva

Disable centos-sclo-rh && Enable centos-sclo-rh-testing? URL in centos-sclo-rh is incorrect even if in the host machine of aarch64.

zorrohahaha avatar Dec 05 '18 09:12 zorrohahaha

Yup, it does not work.

Tried with what @omron93 suggested and it still fails.

Host is aarch64.

Sending build context to Docker daemon  2.048kB
Step 1/6 : FROM centos:7
 ---> 4dfd99be812b
Step 2/6 : RUN yum -y update; yum -y install meta; yum -y install centos-release-scl;
 ---> Using cache
 ---> 9a4185968b2e
Step 3/6 : RUN yum-config-manager --add-repo=http://mirror.centos.org/altarch/7/sclo/aarch64/rh/
 ---> Using cache
 ---> 3212930d1a25
Step 4/6 : RUN yum -y install devtoolset-7
 ---> Running in bce9e6b0c8dd
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile


 One of the configured repositories failed (Unknown),                                                          
 and yum doesn't have enough cached data to continue. At this point the only                                   
 safe thing yum can do is fail. There are a few ways to work "fix" this:                                       

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo=<repoid> ...

     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:

            yum-config-manager --disable <repoid>
        or
            subscription-manager repos --disable=<repoid>

     5. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

Cannot find a valid baseurl for repo: centos-sclo-sclo/aarch64
The command '/bin/sh -c yum -y install devtoolset-7' returned a non-zero code: 1

samip5 avatar Dec 10 '19 08:12 samip5

@samip5 Just an idea looking at the logs (did not try it out myself) - removing the yum -y install centos-release-scl part might help.

pkubatrh avatar Dec 10 '19 09:12 pkubatrh

I'm just giving up on CentOS, and tryign to be able to use it on aarch64.

samip5 avatar Dec 10 '19 10:12 samip5