magistrala icon indicating copy to clipboard operation
magistrala copied to clipboard

Minimum Go version for building Mainfux

Open chombium opened this issue 2 years ago • 4 comments

I was reading the dev guide on read the docs to update my development environment and I saw that the minimum Go version specified in the docs is Go v1.13.3.

Just out of curiosity, I've downloaded that version and tried to build Mainflux.

I got the following error:

 make
CGO_ENABLED=0 GOOS= GOARCH=amd64 GOARM= go build -mod=vendor -ldflags "-s -w -X 'github.com/mainflux/mainflux.BuildTime=2022-03-15_00:14:46' -X 'github.com/mainflux/mainflux.Version=0.12.1' -X 'github.com/mainflux/mainflux.Commit=f3ed852b36219278ab873cf7af4f1aaadca628b4'" -o build/mainflux-users cmd/users/main.go
# golang.org/x/net/http2
vendor/golang.org/x/net/http2/transport.go:417:45: undefined: os.ErrDeadlineExceeded
make: *** [Makefile:78: users] Error 2

Than I've tried Go v.14.15 and I got the same error.

Digging through the code of go I found the that os, net: define and use os.ErrDeadlineExceeded was commited on 25th of April 2020 and inlcuded in go1.15beta1 (released in go1.15 stable).

Than I tried building Mainflux with go1.15 and the build finished successfully. Hence the minimum go version should be go v1.15 and not as stated in the dev guide in read the docs go v1.13.3 nor the latest version in the master of the docs repo go v1.17.5. Of course the #1577 issue would have to be fixed as well to cover the go v16.x versions.

@mainflux/contributors wdyt?

chombium avatar Mar 15 '22 00:03 chombium

btw. It seems to me that the latest version of the docs repo is not published on read the docs.

chombium avatar Mar 15 '22 00:03 chombium

Yes, we moved to mainflux.io

drasko avatar Mar 15 '22 00:03 drasko

@drasko thanks for the info

chombium avatar Mar 15 '22 07:03 chombium

@chombium I'd update the version in all docs since we are frequently aligning with latest Go versions.

manuio avatar Mar 15 '22 08:03 manuio

Since we're not using readthedocs anymore, but mainflux.io, and I think those are up to date. @chombium Can we close this one?

dborovcanin avatar Mar 01 '23 10:03 dborovcanin