mockery icon indicating copy to clipboard operation
mockery copied to clipboard

Installing on AIX fails due to older dependency to github.com/spf13/[email protected]

Open saphieron opened this issue 4 years ago • 4 comments

Hello everyone!

I'm currently trying to install mockery as a tool on a IBM AIX 7.2 platform. Current go version is go version go1.13.4 aix/ppc64.

Trying to pull mockery onto that platform with go get github.com/vektra/mockery/v2/.../ pulls all the different dependencies but then fails to compile on

go/pkg/mod/github.com/spf13/[email protected]/const_win_unix.go:25:15: undefined: syscall.EBADFD

Some quick googling suggests that AIX support was added for afero in v1.3.0. Is it possible to update the dependency to that version to allow for AIX builds or would I need to check this with whatever package relies on afero that mockery is using?

EDIT: Given the afaik difficult nature of having access to AIX machines I am more than willing to help in debugging, testing and fixing this issue.

saphieron avatar Nov 04 '21 14:11 saphieron

@Saphieron I know it's been a while since you submitted this ticket but if this is still an issue for you I'd love to chat about it.

The first thing I'd mention is that using go get / go install is not supported anymore. We don't currently build for AIX but I'm sure we can add it to the release builds. Let me know what you think.

LandonTClipp avatar May 05 '22 18:05 LandonTClipp

I would still love to have this tool on AIX. An official release build available for AIX would solve my issue as well. Happy to help with testing on AIX.

saphieron avatar May 06 '22 07:05 saphieron

I'm pretty sure that it should be as easy as adding to the GOOS in the github release work flow. Give that a shot and we can see what happens.

LandonTClipp avatar May 06 '22 14:05 LandonTClipp

FYI: In my local WSL Ubuntu 20.04 running on AMD64, using go 1.16.12 I was unable to have it cross compile using GOOS and GOARCH:

$ GOOS="AIX" GOARCH="ppc64" go build -mod vendor -o app_cross main.go
cmd/go: unsupported GOOS/GOARCH pair AIX/ppc64

Beyond this quick test I did this morning I don't know if I am missing anything to get it to work.

saphieron avatar May 06 '22 14:05 saphieron

I tried installing mockery again with version 2.32.0 which worked without a hitch. It even runs and (at least for now) prints the its version successfully.

~/ $ mockery --version
18 Jul 23 11:02 CEST INF couldn't read any config file version=v2.32.0
18 Jul 23 11:02 CEST INF Starting mockery dry-run=false version=v2.32.0
18 Jul 23 11:02 CEST INF Using config:  dry-run=false version=v2.32.0
v2.32.0

Beyond some brief tests with my current projects I can't confirm if all other functionality works under AIX, but in terms of installing it, I think this issue can be closed as fixed.

saphieron avatar Jul 18 '23 09:07 saphieron