francoismichel / ssh3

SSH3: faster and rich secure shell using HTTP/3, checkout our article here: https://arxiv.org/abs/2312.08396 and our Internet-Draft: https://datatracker.ietf.org/doc/draft-michel-ssh3/
https://arxiv.org/abs/2312.08396
Apache License 2.0
3.18k stars 81 forks source link

Server compile end up with error on debian #47

Closed CompuRoot closed 6 months ago

CompuRoot commented 6 months ago
$go version
go version go1.21.5 linux/amd64

$ go build -o ssh3-server cli/server/main.go
# ssh3/linux_server
linux_server/authorized_identities.go:39:50: undefined: linux_util.User
linux_server/authorized_identities.go:131:37: undefined: linux_util.User
linux_server/authorized_identities.go:171:53: undefined: linux_util.User
linux_server/auth.go:80:25: undefined: linux_util.UserPasswordAuthentication
linux_server/handlers.go:51:27: undefined: linux_util.GetUser
francoismichel commented 6 months ago

This is because building the server requires CGO_ENABLED=1 when building. If it is not set, it will ignore files with import "C" in it, causing the error above.

If you hae gcc installed, you should be able to install the server doing the following:

CGO_ENABLED=1 go build -o ssh3-server cli/server/main.go

Thanks for filing the issue ! I'll update the README.