I am trying to compile my go program on Win10 and get the following errors:
PS grpc-echo>go build -v
github.com/openziti/identity
# github.com/openziti/identity
..\..\go\pkg\mod\github.com\openziti\identity@v1.0.12\identity.go:68:21: undefined: atomic.Bool
..\..\go\pkg\mod\github.com\openziti\identity@v1.0.12\identity.go:71:21: undefined: atomic.Int32
PS grpc-echo>
ā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
PS grpc-echo>
i mean - what git repo. you called it āyourā code, is it in a repo I can look at?
github.com/openziti/sdk-golang v0.16.121
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.
1 Like
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-----
MHcCAQEEIM78CWnTAnZULFgo5S2ykT7byqDTIN7WIvSlbWKkPM1QoAoGCCqGSM49
AwEHoUQDQgAEzA/yguGeUgUKasLtqmK/LN53EOYfq2oA+gNRnpFaUCTqSHS/wMB+
53HEWKnYJS5qgpzLs2M1iJ4IQsulTvyO4g==
-----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 ziti-edge-tunnel
.
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.