Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build instructions #56

Open
metov opened this issue Apr 13, 2021 · 4 comments
Open

Build instructions #56

metov opened this issue Apr 13, 2021 · 4 comments

Comments

@metov
Copy link

metov commented Apr 13, 2021

Can you please add instructions for building from source? (including for people unfamiliar with Go) I want to try the workaround in #54 (comment) but not sure how to build.

@rmjjjt
Copy link

rmjjjt commented Jun 7, 2021

Hopefully this will help - I've had the same problem, not too familiar with Go (yet), but figured out how to get it to work.

  • Clone the pr repo to somewhere on your machine: git clone [email protected]:ibisnetworks/assume-role.git
  • Using this article as a guide:
    • cd to the cloned directory
    • Make sure you have go 1.16+ installed, then run these commands:
    • GOOS=darwin GOARCH=amd64 go build -o assume-role main.go
    • You can now test the binary using ./assume-role (you should see some output instead of the segment fault that appeared before)
    • I then copied this binary to the local bin using sudo cp assume-role /usr/local/bin. You might not want to do it this way - you could add the new location to your path, I guess, but this worked for me.
    • You can now test in your terminal with assume-role. You should see the same output you saw a couple of steps above
  • The assume-role command should now be available to use as it was previously (for some reason, in the GOOS step, you can actually use amd64 OR arm64 - both seem to work. Or you can create a universal package as in the linked article - that works also).

Thanks to madsenibis for the work in the pr.

@brunns
Copy link

brunns commented Dec 1, 2022

I'm getting errors running this:

main.go:16:2: no required module provides package github.com/aws/aws-sdk-go/aws: go.mod file not found in current directory or any parent directory; see 'go help modules'
main.go:17:2: no required module provides package github.com/aws/aws-sdk-go/aws/credentials: go.mod file not found in current directory or any parent directory; see 'go help modules'
main.go:18:2: no required module provides package github.com/aws/aws-sdk-go/aws/credentials/stscreds: go.mod file not found in current directory or any parent directory; see 'go help modules'
main.go:19:2: no required module provides package github.com/aws/aws-sdk-go/aws/session: go.mod file not found in current directory or any parent directory; see 'go help modules'
main.go:20:2: no required module provides package github.com/aws/aws-sdk-go/service/sts: go.mod file not found in current directory or any parent directory; see 'go help modules'
main.go:21:2: no required module provides package gopkg.in/yaml.v2: go.mod file not found in current directory or any parent directory; see 'go help modules'

I'm not a go dev, and I'm not sure how to proceed here.

@rmjjjt
Copy link

rmjjjt commented Dec 1, 2022

I'm getting errors running this:

main.go:16:2: no required module provides package github.com/aws/aws-sdk-go/aws: go.mod file not found in current directory or any parent directory; see 'go help modules'
main.go:17:2: no required module provides package github.com/aws/aws-sdk-go/aws/credentials: go.mod file not found in current directory or any parent directory; see 'go help modules'
main.go:18:2: no required module provides package github.com/aws/aws-sdk-go/aws/credentials/stscreds: go.mod file not found in current directory or any parent directory; see 'go help modules'
main.go:19:2: no required module provides package github.com/aws/aws-sdk-go/aws/session: go.mod file not found in current directory or any parent directory; see 'go help modules'
main.go:20:2: no required module provides package github.com/aws/aws-sdk-go/service/sts: go.mod file not found in current directory or any parent directory; see 'go help modules'
main.go:21:2: no required module provides package gopkg.in/yaml.v2: go.mod file not found in current directory or any parent directory; see 'go help modules'

I'm not a go dev, and I'm not sure how to proceed here.

@brunns which version of go did you install? I think we've seen something similar and was possibly related to v1.19.x of go. If you are on 1.19.x, try using 1.18.8 and see if that helps.

@brunns
Copy link

brunns commented Dec 1, 2022

Ah, yes, I'm on 1.19.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants