Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Support darwin build for kata shim #86

Closed
raravena80 opened this issue Jun 10, 2018 · 4 comments
Closed

Support darwin build for kata shim #86

raravena80 opened this issue Jun 10, 2018 · 4 comments

Comments

@raravena80
Copy link
Member

Description of problem

Opening up to track building the Kata Shim on macos. Needed to support Kata Containers over xhyve

Expected result

$ cd $GOPATH/src/github.com/kata-containers/shim && make
go build -o kata-shim -ldflags "-X main.version=1.0.0-a69326b63802952b14203ea9c1533d4edb8c1d64"
# Builds the kata-shim exec on darwin

Actual result

$ cd $GOPATH/src/github.com/kata-containers/shim && make
go build -o kata-proxy -ldflags "-X main.version=1.0.0-a69326b63802952b14203ea9c1533d4edb8c1d64"
# github.com/kata-containers/shim
./signals.go:27:2: undefined: syscall.SIGSTKFLT
make: *** [kata-proxy] Error 2

@raravena80
Copy link
Member Author

Commenting out the following makes the build go through successfully.

// signals.go
+       //syscall.SIGSTKFLT: true,

However, I believe the right way to implement this is to have a common signals.go file and then have a signals_linux.go and a signals_darwin.go files.

@jodh-intel
Copy link
Contributor

Yes, we could create a signals_darwin.go. All it would need to contain is the darwin-specific handledSignalsMap. Or we could make the file even smaller by requiring that each arch-specific signals file define archSignalsMap [map][syscall.Signal]bool which for darwin might be empty.

But looking again at the man pages, it appears the kernel never sends SIGSTKFLT, so the simplest fix might be to just remove SIGSTKFLT entirely. Is that sufficient to allow a darwin build?

@raravena80
Copy link
Member Author

@jodh-intel yep, that's enough

@raravena80
Copy link
Member Author

@jodh-intel actually there's more. The terminal_linux.go is specific to Linux. I'll submit a PR and we can iterate.

raravena80 added a commit to raravena80/shim that referenced this issue Jun 19, 2018
Fixes kata-containers#86

Signed-off-by: Ricardo Aravena <raravena@branch.io>
raravena80 added a commit to raravena80/shim that referenced this issue Jun 19, 2018
Darwin implementations. According to the man 7 page on Linux the signal
is not used

terminal: Changes to support build in Darwin, add terminal_darwin.go and
terminal_darwin_test.go

Fixes kata-containers#86

Signed-off-by: Ricardo Aravena <raravena@branch.io>
raravena80 added a commit to raravena80/shim that referenced this issue Jun 19, 2018
… Darwin implementations. According to the man 7 page on Linux the signal is not used

Fixes kata-containers#86

Signed-off-by: Ricardo Aravena <raravena@branch.io>
raravena80 added a commit to raravena80/shim that referenced this issue Jun 19, 2018
…and terminal_darwin_test.go

Fixes kata-containers#86

Signed-off-by: Ricardo Aravena <raravena@branch.io>
raravena80 added a commit to raravena80/shim that referenced this issue Jun 19, 2018
…and terminal_darwin_test.go

Fixes kata-containers#86

Signed-off-by: Ricardo Aravena <raravena@branch.io>
raravena80 added a commit to raravena80/shim that referenced this issue Jun 20, 2018
…and terminal_darwin_test.go

Fixes kata-containers#86

Signed-off-by: Ricardo Aravena <raravena@branch.io>
raravena80 added a commit to raravena80/shim that referenced this issue Jun 21, 2018
Created a new `terminal_darwin.go` (and associated test).

Made changes to .travis.yml to support travis osx tests

Fixes kata-containers#86

Signed-off-by: Ricardo Aravena <raravena@branch.io>
raravena80 added a commit to raravena80/shim that referenced this issue Jun 21, 2018
Created a new `terminal_darwin.go` (and associated test).

Made changes to .travis.yml to support travis osx tests

Fixes kata-containers#86

Signed-off-by: Ricardo Aravena <raravena@branch.io>
raravena80 added a commit to raravena80/shim that referenced this issue Jun 21, 2018
Created a new `terminal_darwin.go` (and associated test).

Made changes to .travis.yml and .ci/faketty.sh to support travis osx tests

Fixes kata-containers#86

Signed-off-by: Ricardo Aravena <raravena@branch.io>
jshachm pushed a commit to jshachm/shim that referenced this issue Sep 27, 2018
Created a new `terminal_darwin.go` (and associated test).

Made changes to .travis.yml and .ci/faketty.sh to support travis osx tests

Fixes kata-containers#86

Signed-off-by: Ricardo Aravena <raravena@branch.io>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants