Missing xchain and xchain-cli files in ARMv8-A architecture
Mth112129656 opened this issue · comments
Brief of the issue
Missing xchain and xchain-cli files in ARMv8-A architecture
Your environment
XuperChain and OS/Go/gcc version etc.
XuperChain5.3
ARMv8-A
CentOS Linux release 8.5.2111
go1.16.12 linux/arm64
Reproduce steps
I found that XuperChain is compiled on Linux under the ARMv8-A architecture for make, but the output file may be missing xchain and xchain-cli files. Is there any solution?
Did any error information occur during the make
process? Could you provide a list of files located in the output/bin
directory?
Did any error information occur during the
make
process? Could you provide a list of files located in theoutput/bin
directory?
This is the process that occurred during my second make
rm -rf /root/xuperchain/output bash /root/xuperchain/auto/build_xvm.sh compile done! VERSION=master COMMIT_ID=c6f8ca1 bash /root/xuperchain/auto/build.sh go build -o /root/xuperchain/output/bin/xchain -ldflags "-X main.Version=master -X main.BuildTime=2023-05-24-14:25:44 -X main.CommitID=c6f8ca1" /root/xuperchain/cmd/xchain/main.go ../go/lib/pkg/mod/github.com/docker/docker@v1.4.2-0.20191101170500-ac7306503d23/pkg/archive/archive.go:4:2: //go:build comment without // +build comment ../go/lib/pkg/mod/github.com/spf13/cobra@v1.0.0/bash_completions.go:4:2: //go:build comment without // +build comment ../go/src/crypto/ecdsa/ecdsa.go:25:2: //go:build comment without // +build comment ../go/src/crypto/aes/cipher.go:8:2: //go:build comment without // +build comment cmd/client/cmd/multisig_gen.go:10:2: //go:build comment without // +build comment ../go/src/crypto/ecdsa/ecdsa.go:28:2: //go:build comment without // +build comment ../go/src/crypto/ecdsa/ecdsa.go:29:2: //go:build comment without // +build comment ../go/src/crypto/aes/cipher.go:10:2: //go:build comment without // +build comment ../go/src/crypto/ecdh/x25519.go:8:2: //go:build comment without // +build comment ../go/src/crypto/ecdh/nist.go:9:2: //go:build comment without // +build comment ../go/src/crypto/internal/nistec/p224.go:10:2: //go:build comment without // +build comment ../go/src/crypto/tls/key_agreement.go:10:2: //go:build comment without // +build comment ../go/src/crypto/ed25519/ed25519.go:19:2: //go:build comment without // +build comment ../go/src/crypto/tls/auth.go:13:2: //go:build comment without // +build comment ../go/src/crypto/tls/cipher_suites.go:15:2: //go:build comment without // +build comment ../go/src/crypto/tls/cipher_suites.go:16:2: //go:build comment without // +build comment ../go/src/crypto/ecdsa/ecdsa.go:34:2: //go:build comment without // +build comment ../go/src/crypto/cipher/cbc.go:17:2: //go:build comment without // +build comment cmd/client/cmd/cli.go:9:2: //go:build comment without // +build comment ../go/src/crypto/tls/cache.go:8:2: //go:build comment without // +build comment ../go/lib/pkg/mod/github.com/spf13/pflag@v1.0.3/string_slice.go:5:2: //go:build comment without // +build comment ../go/lib/pkg/mod/github.com/patrickmn/go-cache@v2.1.0+incompatible/cache.go:4:2: //go:build comment without // +build comment ../go/lib/pkg/mod/github.com/spf13/cobra@v1.0.0/zsh_completions.go:4:2: //go:build comment without // +build comment ../go/src/compress/gzip/gunzip.go:14:2: //go:build comment without // +build comment ../go/src/html/template/escape.go:10:2: //go:build comment without // +build comment ../go/src/runtime/chan.go:21:2: //go:build comment without // +build comment ../go/src/runtime/error.go:7:8: //go:build comment without // +build comment ../go/src/internal/bytealg/bytealg.go:8:2: //go:build comment without // +build comment ../go/src/internal/reflectlite/swapper.go:8:2: //go:build comment without // +build comment ../go/src/runtime/extern.go:224:2: //go:build comment without // +build comment ../go/src/os/error.go:8:2: //go:build comment without // +build comment ../go/src/os/file.go:45:2: //go:build comment without // +build comment ../go/src/os/exec/exec.go:98:2: //go:build comment without // +build comment ../go/src/internal/poll/copy_file_range_linux.go:8:2: //go:build comment without // +build comment ../go/lib/pkg/mod/github.com/xuperchain/log15@v0.0.0-20190620081506-bc88a9198230/syslog.go:6:2: //go:build comment without // +build comment ../go/src/reflect/value.go:13:2: //go:build comment without // +build comment ../go/src/math/big/int.go:12:2: //go:build comment without // +build comment ../go/src/net/http/fs.go:15:2: //go:build comment without // +build comment ../go/lib/pkg/mod/github.com/spf13/pflag@v1.0.3/ip.go:5:2: //go:build comment without // +build comment ../go/lib/pkg/mod/golang.org/x/net@v0.0.0-20210226172049-e18ecbb05110/trace/events.go:13:2: //go:build comment without // +build comment ../go/src/fmt/print.go:10:2: //go:build comment without // +build comment ../go/lib/pkg/mod/github.com/xuperchain/burrow@v0.30.6-0.20211229032028-fbee6a05ab0f/deploy/compile/compilers.go:9:2: //go:build comment without // +build comment ../go/lib/pkg/mod/github.com/tendermint/tendermint@v0.33.1/libs/os/os.go:7:2: //go:build comment without // +build comment ../go/lib/pkg/mod/github.com/docker/docker@v1.4.2-0.20191101170500-ac7306503d23/pkg/homedir/homedir_unix.go:7:2: //go:build comment without // +build comment ../go/lib/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:24:2: //go:build comment without // +build comment ../go/src/internal/fmtsort/sort.go:12:2: //go:build comment without // +build comment ../go/lib/pkg/mod/google.golang.org/protobuf@v1.26.0-rc.1/internal/encoding/text/decode.go:11:2: //go:build comment without // +build comment ../go/src/internal/reflectlite/value.go:10:2: //go:build comment without // +build comment package command-line-arguments imports github.com/xuperchain/xuperchain/cmd/xchain/cmd imports github.com/xuperchain/xupercore/bcs/contract/native imports github.com/fsouza/go-dockerclient imports github.com/docker/docker/pkg/archive imports github.com/opencontainers/runc/libcontainer/system: //go:build comment without // +build comment ../go/lib/pkg/mod/github.com/prometheus/client_golang@v1.11.0/prometheus/go_collector.go:18:2: //go:build comment without // +build comment ../go/src/runtime/arena.go:87:2: //go:build comment without // +build comment ../go/src/runtime/cgocall.go:89:2: //go:build comment without // +build comment ../go/src/runtime/os_linux.go:11:2: //go:build comment without // +build comment ../go/src/net/http/pprof/pprof.go:77:2: //go:build comment without // +build comment ../go/src/reflect/type.go:21:2: //go:build comment without // +build comment ../go/src/sync/cond.go:8:2: //go:build comment without // +build comment ../go/src/internal/syscall/unix/at_sysnum_linux.go:7:8: //go:build comment without // +build comment ../go/lib/pkg/mod/github.com/tendermint/tendermint@v0.33.1/libs/log/testing_logger.go:6:2: //go:build comment without // +build comment ../go/src/io/fs/fs.go:12:2: //go:build comment without // +build comment go build -o /root/xuperchain/output/bin/xchain-cli -ldflags "-X main.Version=master -X main.BuildTime=2023-05-24-14:25:45 -X main.CommitID=c6f8ca1" /root/xuperchain/cmd/client/main.go ../go/src/bufio/bufio.go:11:2: //go:build comment without // +build comment ../go/src/crypto/ecdsa/ecdsa.go:25:2: //go:build comment without // +build comment ../go/src/crypto/aes/cipher.go:8:2: //go:build comment without // +build comment cmd/client/cmd/multisig_gen.go:10:2: //go:build comment without // +build comment ../go/src/crypto/ecdsa/ecdsa.go:28:2: //go:build comment without // +build comment ../go/src/crypto/ecdsa/ecdsa.go:29:2: //go:build comment without // +build comment ../go/src/crypto/aes/cipher.go:10:2: //go:build comment without // +build comment ../go/src/crypto/ecdh/x25519.go:8:2: //go:build comment without // +build comment ../go/src/crypto/ecdh/nist.go:9:2: //go:build comment without // +build comment ../go/src/crypto/internal/nistec/p224.go:10:2: //go:build comment without // +build comment ../go/src/crypto/tls/key_agreement.go:10:2: //go:build comment without // +build comment ../go/src/crypto/ed25519/ed25519.go:19:2: //go:build comment without // +build comment ../go/src/crypto/tls/auth.go:13:2: //go:build comment without // +build comment ../go/src/crypto/tls/cipher_suites.go:15:2: //go:build comment without // +build comment ../go/src/crypto/tls/cipher_suites.go:16:2: //go:build comment without // +build comment ../go/src/crypto/ecdsa/ecdsa.go:34:2: //go:build comment without // +build comment ../go/src/crypto/cipher/cbc.go:17:2: //go:build comment without // +build comment cmd/client/cmd/cli.go:9:2: //go:build comment without // +build comment ../go/src/crypto/tls/cache.go:8:2: //go:build comment without // +build comment ../go/lib/pkg/mod/github.com/spf13/pflag@v1.0.3/string_slice.go:5:2: //go:build comment without // +build comment ../go/lib/pkg/mod/github.com/patrickmn/go-cache@v2.1.0+incompatible/cache.go:4:2: //go:build comment without // +build comment cmd/client/cmd/account_contracts.go:8:2: //go:build comment without // +build comment ../go/src/compress/gzip/gunzip.go:14:2: //go:build comment without // +build comment ../go/src/html/template/escape.go:10:2: //go:build comment without // +build comment ../go/src/runtime/chan.go:21:2: //go:build comment without // +build comment ../go/src/runtime/error.go:7:8: //go:build comment without // +build comment ../go/src/internal/bytealg/bytealg.go:8:2: //go:build comment without // +build comment ../go/src/internal/reflectlite/swapper.go:8:2: //go:build comment without // +build comment ../go/src/runtime/extern.go:224:2: //go:build comment without // +build comment ../go/src/os/error.go:8:2: //go:build comment without // +build comment ../go/src/os/file.go:45:2: //go:build comment without // +build comment ../go/src/os/exec/exec.go:98:2: //go:build comment without // +build comment ../go/src/internal/poll/copy_file_range_linux.go:8:2: //go:build comment without // +build comment ../go/lib/pkg/mod/github.com/xuperchain/log15@v0.0.0-20190620081506-bc88a9198230/syslog.go:6:2: //go:build comment without // +build comment ../go/src/reflect/value.go:13:2: //go:build comment without // +build comment ../go/src/math/big/int.go:12:2: //go:build comment without // +build comment ../go/src/net/http/fs.go:15:2: //go:build comment without // +build comment ../go/src/crypto/x509/parser.go:20:2: //go:build comment without // +build comment ../go/lib/pkg/mod/golang.org/x/net@v0.0.0-20210226172049-e18ecbb05110/trace/events.go:13:2: //go:build comment without // +build comment ../go/src/fmt/print.go:10:2: //go:build comment without // +build comment ../go/lib/pkg/mod/github.com/xuperchain/burrow@v0.30.6-0.20211229032028-fbee6a05ab0f/deploy/compile/compilers.go:9:2: //go:build comment without // +build comment ../go/lib/pkg/mod/github.com/tendermint/tendermint@v0.33.1/libs/os/os.go:7:2: //go:build comment without // +build comment ../go/src/html/template/template.go:13:2: //go:build comment without // +build comment ../go/src/internal/fmtsort/sort.go:12:2: //go:build comment without // +build comment ../go/lib/pkg/mod/google.golang.org/protobuf@v1.26.0-rc.1/internal/encoding/text/decode.go:11:2: //go:build comment without // +build comment ../go/src/internal/reflectlite/value.go:10:2: //go:build comment without // +build comment ../go/lib/pkg/mod/github.com/prometheus/client_golang@v1.11.0/prometheus/go_collector.go:18:2: //go:build comment without // +build comment ../go/src/runtime/arena.go:87:2: //go:build comment without // +build comment ../go/src/runtime/cgocall.go:89:2: //go:build comment without // +build comment ../go/src/runtime/os_linux.go:11:2: //go:build comment without // +build comment ../go/src/reflect/type.go:21:2: //go:build comment without // +build comment ../go/src/sync/cond.go:8:2: //go:build comment without // +build comment ../go/src/internal/syscall/unix/at_sysnum_linux.go:7:8: //go:build comment without // +build comment ../go/lib/pkg/mod/github.com/tendermint/tendermint@v0.33.1/libs/log/testing_logger.go:6:2: //go:build comment without // +build comment ../go/src/io/fs/fs.go:12:2: //go:build comment without // +build comment compile done!
After compiling, I only saw wasm2c in the output/bin directory
When compiling Go code on an ARMv8 architecture Linux system, the compiler prompts for missing "+build" comments, you may try focus on platform-specific code: when the code includes platform-specific implementations or dependencies, the compiler expects to see appropriate build constraints using "+build" comments. These comments specify the platforms for which the code should be included or excluded during the build process. Without these comments, the compiler cannot determine whether the code is compatible with the ARMv8 architecture.
I don't have the corresponding environment to test it currently, following step may help you:
- Review the error message: When the compiler reports missing "+build" comments, review the error message to understand which files or packages are affected.
- Examine the code files: Open the identified code files and look for any platform-specific code or conditional compilation statements that require build constraints. Pay attention to sections of code that may have different implementations or dependencies based on the target architecture.
- Add "+build" comments: Once you have identified the sections of code that require build constraints, add the necessary "+build" comments. These comments should specify the desired platforms or build tags for the code to be included during compilation. Ensure that the comments are correctly placed and follow the appropriate syntax for build constraints.
- Verify build configuration: Check your build configuration to ensure that the appropriate target architecture (ARMv8) is specified. Verify that the necessary Go environment variables, such as GOOS (operating system) and GOARCH (target architecture), are correctly set.
Has the issue been resolved? @Mth112129656