goharbor / harbor-arm

Build Harbor for arm architecture.
Apache License 2.0
73 stars 45 forks source link

redis-debuginfo-6.0.15-1.ph4.aarch64.rpm': No such file or directory #28

Open nekia opened 2 years ago

nekia commented 2 years ago

When walking through the steps mentioned Get Started (https://github.com/goharbor/harbor-arm#get-started) , I got the following error on my amd64 Ubuntu environment after running make compile_redis command:

$ make compile_redis
(snip)

1. Create sandbox
        Use local build template image OK
2. Prepare build environment
        Create source folder OK
        Copy sources from /tmp/redis.tlgUcm OK
        Install build requirements OK
3. Build
        Run rpmbuild OK
4. Get binaries
        Copy RPMS OK
        Copy SRPMS OK
5. Destroy sandbox
        Stop container OK
        Remove container OK
Build completed. RPMS are in '/tmp/redis.tlgUcm/stage' folder
cp: cannot stat './stage/RPMS/aarch64/redis-debuginfo-6.0.15-1.ph4.aarch64.rpm': No such file or directory
make: *** [Makefile:171: compile_redis] Error 1

When checking under the staging directory, I found a rpm file for x86_64 instead, not for aarch64 (arm64):

$ ls /tmp/redis.tlgUcm/stage/RPMS/x86_64/
redis-6.0.15-1.ph4.x86_64.rpm  redis-debuginfo-6.0.15-1.ph4.x86_64.rpm

Is there any misconfigurations on my environment or advices for this issue? The detail of my environment is as below:

Environment

$ git log -1
commit 4f49eedde868c8ab24c20aee92eef19780b62f77 (HEAD -> main, origin/main, origin/HEAD)
Merge: 33b8a34 542cbcf
Author: ZhuBo <41532403+Jeremy-boo@users.noreply.github.com>
Date:   Fri Mar 4 09:24:29 2022 +0800

    Merge pull request #11 from goharbor/feat/e2e-support-arm

    feat: harbor-e2e-engine: 3.0.0-api adds support for arm architecture

$ arch
x86_64

$ docker buildx ls
NAME/NODE         DRIVER/ENDPOINT             STATUS  PLATFORMS
harbor-instance * docker-container
  harbor-node     unix:///var/run/docker.sock running linux/arm64*, linux/amd64, linux/amd64/v2, linux/amd64/v3, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/mips64le, linux/mips64, linux/arm/v7, linux/arm/v6
default           docker
  default         default                     running linux/amd64, linux/386, linux/arm64, linux/riscv64, linux/ppc64le, linux/s390x, linux/arm/v7, linux/arm/v6

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:        20.04
Codename:       focal

Thanks

Jeremy-boo commented 2 years ago

I will find an identical machine to determine the problem,thank you for your information

631068264 commented 2 years ago

meet same problem

I found redis-debuginfo-6.0.15-1.ph4.aarch64.rpm
in https://packages.vmware.com/photon/4.0/photon_debuginfo_4.0_aarch64/aarch64/

but can't find other rpm

@Jeremy-boo

And I find that in build_spec.sh

function get_rpms() {
  run "Copy RPMS" docker cp $CONTAINER:/usr/src/photon/RPMS "$SPECDIR/stage"
  run "Copy SRPMS" docker cp $CONTAINER:/usr/src/photon/SRPMS "$SPECDIR/stage"
}

make compile_redis can not run in x86. Because it will get x86 image and it also had docker run in the build_spec.sh !!! It get error when you use arm image.

image
glongzh commented 10 months ago

same problem. any updates?