Closed quentindavid closed 4 years ago
Same thing is happening with another version of Raspbian :
pi@domoticz:/opt/teleport$ uname -a
Linux domoticz 4.14.79+ #1159 Sun Nov 4 17:28:08 GMT 2018 armv6l GNU/Linux
pi@domoticz:/opt/teleport$ cat /etc/debian_version
9.6
the behaviour :
pi@domoticz:/opt/teleport$ ./teleport
Erreur de segmentation
Hi there ! I just tried to compile on the raspberry pi, I have this error :
`root@raspberrypi:/opt/src/github.com/gravitational/teleport# make full
---> Building OSS binaries.
make build/teleport build/tctl build/tsh
make[1]: Entering directory '/opt/src/github.com/gravitational/teleport'
GOOS=`go env GOOS` GOARCH=`go env GOARCH` CGO_ENABLED=1 go build -tags pam -o build/teleport -ldflags '-w -s' ./tool/teleport
lib/services/types.pb.go:14:8: read /opt/src/github.com/gravitational/teleport/vendor/github.com/gogo/protobuf/types/struct.pb.go: unexpected NUL in input
lib/services/identity.go:29:2: read /opt/src/github.com/gravitational/teleport/vendor/github.com/gokyle/hotp/doc.go: unexpected NUL in input
vendor/github.com/golang/protobuf/ptypes/empty/empty.pb.go:6:8: read /opt/src/github.com/gravitational/teleport/vendor/github.com/golang/protobuf/proto/table_marshal.go: unexpected NUL in input
vendor/google.golang.org/grpc/status/status.go:35:2: read /opt/src/github.com/gravitational/teleport/vendor/github.com/golang/protobuf/ptypes/duration.go: unexpected NUL in input
vendor/github.com/peterbourgon/diskv/index.go:6:2: read /opt/src/github.com/gravitational/teleport/vendor/github.com/google/btree/btree.go: unexpected NUL in input
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go:26:2: read /opt/src/github.com/gravitational/teleport/vendor/github.com/google/gofuzz/doc.go: unexpected NUL in input
vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.go:21:2: read /opt/src/github.com/gravitational/teleport/vendor/github.com/googleapis/gnostic/compiler/context.go: unexpected NUL in input
Makefile:75: recipe for target 'build/teleport' failed
make[1]: *** [build/teleport] Error 1
make[1]: Leaving directory '/opt/src/github.com/gravitational/teleport'
Makefile:61: recipe for target 'all' failed
make: *** [all] Error 2
Anybody can help me ?
Thanks a lot !
It seem there is a problem of corrupted files when git pull...very weird ! Once the .tar.gz from the latest release downloaded and extracted, it seem to compile...let's see how far it goes :)
Hi there, do you know if this error means I mean more swap ? I set it to 1G as recommended.
root@raspberrypi:/opt/go/src/github.com/gravitational/teleport# make full ---> Building OSS binaries. make build/teleport build/tctl build/tsh make[1]: Entering directory '/opt/go/src/github.com/gravitational/teleport' GOOS=
go env GOOS
GOARCH=go env GOARCH
CGO_ENABLED=1 go build -tags pam -o build/teleport -ldflags '-w -s' ./tool/teleportgithub.com/gravitational/teleport/tool/teleport
panic: "type.*go/ast.Ident" relocation for "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" does not match method "String"
goroutine 1 [running]: cmd/link/internal/ld.(*deadcodepass).flood(0x2039650) /usr/local/go/src/cmd/link/internal/ld/deadcode.go:341 +0x9f4 cmd/link/internal/ld.deadcode(0x204c090) /usr/local/go/src/cmd/link/internal/ld/deadcode.go:61 +0x68 cmd/link/internal/ld.Main(0x381488, 0x4, 0x8, 0x1, 0xd, 0xe, 0x21ca49, 0x12, 0x21f436, 0x18, ...) /usr/local/go/src/cmd/link/internal/ld/main.go:210 +0x9d4 main.main() /usr/local/go/src/cmd/link/main.go:65 +0x130 Makefile:76: recipe for target 'build/teleport' failed make[1]: [build/teleport] Error 2 make[1]: Leaving directory '/opt/go/src/github.com/gravitational/teleport' Makefile:62: recipe for target 'all' failed make: [all] Error 2
After downloading github content as zip, then extract and compile it with raspberry pi v2 with 2 GB of SWAP, it works ! I was then able to copy the binaries on Raspberry pi V1.
Please correct the binaries you propose to download as they still lead to segmentation fault.
Hi @quentindavid,
Thanks for documenting your adventure with building Teleport for a Raspberry Pi. We've found that you have to build it for different ARM versions. As per this helpful guide. https://github.com/golang/go/wiki/GoArm
It could also be that pi V1 doesn't have enough RAM / CPU to run all off the requirements, that's likely why why copying over the binary works. With the launch of our IoT release https://gravitational.com/blog/iot_security_teleport/ we'll be looking for more feedback from the community as to how we can best support small IoT devices at the edge.
Ben
I installed the binaries for ARM on my Raspberry Pi V2 :
But I can't go any further... I tried to compile the binaries but it fails too, maybe a Raspberry is too short in terms of memory for compiling ^^
Here is my uname -a :
and Debian version (jessie) :
I am available to give you more details if needed.
Thanks a lot for your help, Quentin DAVID