hyperledger / fabric

Hyperledger Fabric is an enterprise-grade permissioned distributed ledger framework for developing solutions and applications. Its modular and versatile design satisfies a broad range of industry use cases. It offers a unique approach to consensus that enables performance at scale while preserving privacy.
https://wiki.hyperledger.org/display/fabric
Apache License 2.0
15.76k stars 8.86k forks source link

Architecture difference between Step 13 "RUN make ccaasbuilder" and Step 21 #3337

Open Aniket21mathur opened 2 years ago

Aniket21mathur commented 2 years ago

Step 13('RUN make ccaasbuilder') of the installation process (make dist-clean all) is producing binaries with path having a linux-arm64 architecture.

Step 13/23 : RUN make ccaasbuilder
 ---> Running in 12bebcc48412
rm -rf release/linux-arm64/bin/ccaas_builder
cd ccaas_builder && go test -v ./cmd/detect && go build -o ../release/linux-arm64/bin/ccaas_builder/bin/ ./cmd/detect/
go: downloading github.com/pkg/errors v0.9.1
?       github.com/hyperledger/fabric/ccaas_builder/cmd/detect    [no test files]
cd ccaas_builder && go test -v ./cmd/build && go build -o ../release/linux-arm64/bin/ccaas_builder/bin/ ./cmd/build/
go: downloading github.com/otiai10/copy v1.6.0
?       github.com/hyperledger/fabric/ccaas_builder/cmd/build    [no test files]
cd ccaas_builder && go test -v ./cmd/release && go build -o ../release/linux-arm64/bin/ccaas_builder/bin/ ./cmd/release/
?       github.com/hyperledger/fabric/ccaas_builder/cmd/release    [no test files]
Removing intermediate container 12bebcc48412
 ---> b86df7e4d9a9

While the Dockerfile involved in Step21 is reading from a hardcoded linux-amd64 architecture path and hence running into an error->

Step 21/23 : COPY --from=peer /go/src/github.com/hyperledger/fabric/release/linux-amd64/bin/ccaas_builder/bin/ /opt/hyperledger/ccaas_builder/bin/
COPY failed: stat go/src/github.com/hyperledger/fabric/release/linux-amd64/bin/ccaas_builder/bin/: file does not exist
make: *** [build/images/peer/.dummy-arm64-2.5.0-snapshot-5df3d8568] Error 1

The architecture here(https://github.com/hyperledger/fabric/blob/main/images/peer/Dockerfile#L38) should change depending on the building platform.

Param-S commented 2 years ago

Issue discussed in discord : https://discord.com/channels/905194001349627914/905205541326975046/965569733955035136

denyeart commented 1 year ago

@jkneubuh Is this resolved with the new image and binary build approach?