I am trying to compile my go program on Win10 and get the following errors:
PS grpc-echo>go build -v
..\..\go\pkg\mod\github.com\openziti\email@example.com\identity.go:68:21: undefined: atomic.Bool
..\..\go\pkg\mod\github.com\openziti\firstname.lastname@example.org\identity.go:71:21: undefined: atomic.Int32
“your” go progam? What version of go are you using? where is your source code?
there’s not enough information here to go on yet, I don’t think.
PS grpc-echo>go version
go version go1.18.6 windows/amd64
i mean - what git repo. you called it ‘your’ code, is it in a repo I can look at?
do you have go.mod/go.sum files that are not pushed?
Yes, the one in the repo was compiled on the linux ubuntu. I created a new one on windows to see if makes any difference locally.
Can you provide the full set of steps to reproduce? I can’t determine what you have done.
“the repo” - i assume is “git clone GitHub - dariuszSki/grpc-echo”. THEN i need to cd to grpc-echo.
there are no go.mod nor go.sum files to delete
grpc-echo$ ls go*
ls: cannot access 'go*': No such file or directory
go build doesn’t succeed becuase there’s no go mod files and dependencies are not pulled etc.
I don’t know how to help you.
Thanks. I expected this was a golang 18 v 19 issue. I ran using 18 at first and got the same error. I upgraded to 1.19 and it builds…
You just need to get the latest 1.19+ of go.
As simple as that . Thanks!
FYI, not sure if this is expected or not. When I use ziti-edge-tunnel for windows to enroll my identity, I get the following error when I run my app with this identity.
2022/09/19 07:27:30 failed to authenticate: failed to initialize context: (open -----BEGIN EC PRIVATE KEY-----
-----END EC PRIVATE KEY-----
: The filename, directory name, or volume label syntax is incorrect.)
I don’t get this error if I run my app with this identity in wsl. If I use identity enrolled by ziti-tunnel (go). Then it works in windows and in wsl without any issues. It is interesting that the go code compiled in Linux is able to interpret ec private key but in windows it throws an error. The RSA key generated by the ziti-tunnel works. Is that expected, or I am doing something wrong?
Did you use ziti-edge-tunnel to enroll the identity or did you use
ziti CLI? I have absolutely had this exact issue before, but I thought I used
ziti edge enroll to enroll the identity, not
Regardless, it’s something I would not expect either and it’s a bug. Would you file an issue for this in Issues · openziti/ziti-tunnel-sdk-c · GitHub with exact steps to reproduce?
ok will do, I used ziti-edge-tunnel enroll vs ziti-tunnel enroll
is this ziti-tunnel-sdk-c issue? or golang-sdk issue?
File the issue on ziti-tunnel-sdk-c, please add exact steps to reproduce. we’ll move it if needed.