anatol / pacoloco

Caching proxy server for Arch Linux pacman
MIT License
216 stars 30 forks source link

Fails to build on armv6h #18

Closed solsticedhiver closed 4 years ago

solsticedhiver commented 4 years ago

You should consider reverting the last commit efcf97d624aca1df50469a649ede6813dc1e7623 because it gives this error on armv6h (which is a 32bit architecture if I am not wrong):

go: downloading golang.org/x/sys v0.0.0-20200824131525-c12d262b63d8
go: downloading gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776
# github.com/anatol/pacoloco
./purge.go:43:31: cannot use atimeUnix.Sec (type int32) as type int64 in argument to time.Unix
./purge.go:43:46: cannot use atimeUnix.Nsec (type int32) as type int64 in argument to time.Unix

It compiles fine without that commit

anatol commented 4 years ago

Thank you for the feedback. My bad, the commit got reverted.

solsticedhiver commented 4 years ago

In fact, there were already an issue #9 and commit 6c462e666b83f62c8f3ac426b2a9b92192533d5d was made to fix that....

anatol commented 4 years ago

Yeah, I feel bad about forgetting why this extra type conversion existed. And we do not have any tests that run at a 32bit platform to verify it.

I added a comment next to this place to clarify the type conversion. https://github.com/anatol/pacoloco/commit/6ac0efc0bb590aeb0994fdd440ebda45efbc6551