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

sparta binaries fail to execute when not built from primary directory #29

Closed
kynrai opened this Issue Nov 8, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@kynrai

kynrai commented Nov 8, 2016

when calling go run main.go provision with go1.7.3, the lambda functions will not work when invoked, instead the binary itself crashes with exit code 2.

repeating the process with go1.6.2 will work.

@mweagle

This comment has been minimized.

Show comment
Hide comment
@mweagle

mweagle Nov 8, 2016

Owner

Hi @kynrai,
I'm not able to reproduce this locally using https://github.com/mweagle/SpartaHelloWorld and 1.7.3. Can you try deploying with --level debug and if the problem persists, post the logfile as a gist?

Do you see the same problem if you run locally with go run main.go --level info explore? Thanks.

Owner

mweagle commented Nov 8, 2016

Hi @kynrai,
I'm not able to reproduce this locally using https://github.com/mweagle/SpartaHelloWorld and 1.7.3. Can you try deploying with --level debug and if the problem persists, post the logfile as a gist?

Do you see the same problem if you run locally with go run main.go --level info explore? Thanks.

@kynrai

This comment has been minimized.

Show comment
Hide comment
@kynrai

kynrai Nov 8, 2016

Hello, turns out the problem was when go run main.go is run outside of the directory main is in, for example go run some/dir/main.go --provision will succeed but ultimatly the lambda function will not work. feel free to close this issue. however perhaps the directory issue could be looked at as it does deploy fine but fails when invoked.

kynrai commented Nov 8, 2016

Hello, turns out the problem was when go run main.go is run outside of the directory main is in, for example go run some/dir/main.go --provision will succeed but ultimatly the lambda function will not work. feel free to close this issue. however perhaps the directory issue could be looked at as it does deploy fine but fails when invoked.

@mweagle mweagle changed the title from sparta binaries fail to execute when deployed using go1.7.3 to sparta binaries fail to execute when not built from primary directory Nov 8, 2016

@mweagle

This comment has been minimized.

Show comment
Hide comment
@mweagle

mweagle Nov 8, 2016

Owner

Definitely - updated the title and will take a look. Thanks for filing.

Owner

mweagle commented Nov 8, 2016

Definitely - updated the title and will take a look. Thanks for filing.

@mweagle

This comment has been minimized.

Show comment
Hide comment
@mweagle

mweagle Nov 11, 2016

Owner

I think I've been able to reproduce this - if the working directory includes a main, but go run is provided a relative/absolute path to an alternative Sparta source, the resulting binary is malformed. I don't know of a way to get the absolute go run input path to set cwd during a Sparta build.

Added a FAQ entry and closing.

I would like to make this work, so if you know of a way to work around this pease LMK and reopen the issue. Thanks.

Owner

mweagle commented Nov 11, 2016

I think I've been able to reproduce this - if the working directory includes a main, but go run is provided a relative/absolute path to an alternative Sparta source, the resulting binary is malformed. I don't know of a way to get the absolute go run input path to set cwd during a Sparta build.

Added a FAQ entry and closing.

I would like to make this work, so if you know of a way to work around this pease LMK and reopen the issue. Thanks.

@mweagle mweagle closed this Nov 11, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment