Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make build always finish with error #2262

Closed
likid opened this issue Nov 15, 2022 · 9 comments
Closed

make build always finish with error #2262

likid opened this issue Nov 15, 2022 · 9 comments
Labels
wontfix This will not be worked on

Comments

@likid
Copy link

likid commented Nov 15, 2022

I'm trying to build in an arm64 machine, but I always get the same error:

#0 50.25 go: downloading google.golang.org/protobuf v1.26.0
#0 109.7 # github.com/golangci/golangci-lint/cmd/golangci-lint
#0 109.7 /usr/local/go/pkg/tool/linux_arm64/link: running gcc failed: exit status 1
#0 109.7 collect2: fatal error: cannot find 'ld'
#0 109.7 compilation terminated.
#0 109.7
------
failed to solve: executor failed running [/bin/sh -c go install github.com/markbates/refresh@v1.11.1 &&     go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.42.1]: exit code: 2
make: *** [Makefile:59: build] Error 17
go version
go version go1.16.5 gccgo (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0 linux/arm64
@benasse
Copy link
Contributor

benasse commented Nov 16, 2022

It seems that the minimum go version is 1.18 as described in the agent documentation : https://docs.shellhub.io/developers/agent/installing#installing-from-source-code

@likid
Copy link
Author

likid commented Nov 16, 2022

I've updated go, but I've got the same error.

go version go1.18.1 linux/arm64

#0 20.18 go: downloading github.com/mattn/go-runewidth v0.0.9
#0 20.23 go: downloading google.golang.org/protobuf v1.26.0
#0 95.01 # github.com/golangci/golangci-lint/cmd/golangci-lint
#0 95.01 /usr/local/go/pkg/tool/linux_arm64/link: running gcc failed: exit status 1
#0 95.01 collect2: fatal error: cannot find 'ld'
#0 95.01 compilation terminated.
#0 95.01

Linux andersonvm 5.15.0-1021-oracle #27-Ubuntu SMP Fri Oct 14 20:04:20 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux

Shellhub version 0.10.3 as of https://docs.shellhub.io/self-hosted/deploying

@otavio
Copy link
Member

otavio commented Nov 16, 2022

@likid, I believe you need to install the binutils package. Could you try that?

@likid
Copy link
Author

likid commented Nov 16, 2022

It's already installed

binutils-aarch64-linux-gnu/jammy-updates,jammy-security,now 2.38-4ubuntu2 arm64 [installed,automatic]

@benasse
Copy link
Contributor

benasse commented Nov 16, 2022

Could you try to install a 1.19.x version of go ?
It looks like the following issue : golang/go#52399 ( resolved in golang/go#22040 )

@gustavosbarreto
Copy link
Member

gustavosbarreto commented Nov 17, 2022

I guess you are trying to build the ShellHub server on an unsupported architecture.

The make build command should only be run in development mode. If you want to run the server then you should use the docker images instead

@likid
Copy link
Author

likid commented Nov 17, 2022

same error with go 1.19
go version go1.19.2 linux/arm64

docker images are available only for AMD64 arch, not for ARM64, so I have to build them.

@gustavosbarreto
Copy link
Member

docker images are available only for AMD64 arch, not for ARM64, so I have to build them.

ShellHub Server: does not support architectures other than AMD64 (if you want to implement this go ahead)
ShellHub Agent: amd64, armv6, armv7, arm64

@benasse
Copy link
Contributor

benasse commented Nov 17, 2022

FYI, Although it is not supported, I managed to run shellhub agent binary on old 386 host.

@gustavosbarreto gustavosbarreto added the wontfix This will not be worked on label Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

4 participants