2

Preconditions

  • Fabric 1.4
  • I have openSUSE on Raspbery Pi3+

Details of the Error

I ran the following command.

# make docker
  • Failed to create goshim.tar.bz2 error occurred and I can't make commond.

    Removing intermediate container fb7423fe5cf7
     ---> 24c6fdada18f
    Successfully built 24c6fdada18f
    Successfully tagged hyperledger/fabric-orderer:latest
    docker tag hyperledger/fabric-orderer hyperledger/fabric-orderer:arm64-1.4.1-snapshot-e91c57c5f
    docker tag hyperledger/fabric-orderer hyperledger/fabric-orderer:arm64-latest
    Creating .build/goshim.tar.bz2
    make: execvp: /bin/sh: Argument list too long
    make: *** [Makefile:315: .build/goshim.tar.bz2] Error 127
    
  • Makefile

    $(BUILD_DIR)/goshim.tar.bz2: $(GOSHIM_DEPS)
            @echo "Creating $@"
            @tar -jhc -C $(GOPATH)/src $(patsubst $(GOPATH)/src/%,%,$(GOSHIM_DEPS)) > $@
    

Is there a way to avoid this phenomenon?

1 Answers1

1

make: execvp: /bin/sh: Argument list too long

This is probably caused by the source file list produced by GOSHIM_DEPS, that is too long for paremeters to sh, which is implicitly executed.

Try this: replace @tar line with @./scripts/goListFiles.sh $(PKGNAME)/core/chaincode/shim | sed “s!$(GOPATH)/src/!!g” |xargs tar -jhc -C $(GOPATH)/src > $@

I don’t have an environment identical as yours so the above code may have errors, but the basic idea could be applied.

EDIT: That said, there would still be some chances that the error may remain. GOSHIM_DEPS itself is defined using $() syntax and is under the upper limit of length of sh parameter.