containerd / go-runc

runc bindings for Go
Apache License 2.0
162 stars 73 forks source link

Fix a regression of windows build issue of undefined symbol #66

Closed thehajime closed 4 years ago

thehajime commented 4 years ago

This commit fixes the following build failure.

Fixes #65. Fixes: 421b4ca ("Change the type of PdeathSignal")

Signed-off-by: Hajime Tazaki thehajime@gmail.com

AkihiroSuda commented 4 years ago

I'm not sure go-runc should support Windows builds, unless it is really functional on Windows.

Do you plan to use this for porting runU to Windows?

estesp commented 4 years ago

I don't think the package needs to function on Windows, but it is imported into containerd and the file in question is compiled for all os/arch combinations. That means this package (currently) can't be vendor updated in containerd for valid os/arch (e.g. Linux) because it breaks CI on Windows.

AkihiroSuda commented 4 years ago

Would it be trivial to remove codes that import this package for Windows builds?

thehajime commented 4 years ago

Do you plan to use this for porting runU to Windows?

no, in a short timeframe.

again, as @estesp kindly explained, this is not related to darwin port at all; just trying to fix errors which I came across...

Would it be trivial to remove codes that import this package for Windows builds?

:~/.go/src/github.com/containerd/containerd% grep runc vendor/github.com/Microsoft/hcsshim/pkg/go-runhcs/*               
vendor/github.com/Microsoft/hcsshim/pkg/go-runhcs/NOTICE:go-runhcs is a fork of go-runc
vendor/github.com/Microsoft/hcsshim/pkg/go-runhcs/NOTICE:The following is runc's legal notice.
vendor/github.com/Microsoft/hcsshim/pkg/go-runhcs/NOTICE:runc
vendor/github.com/Microsoft/hcsshim/pkg/go-runhcs/runhcs.go:    "github.com/containerd/go-runc"
vendor/github.com/Microsoft/hcsshim/pkg/go-runhcs/runhcs.go:            ec, err := runc.Monitor.Start(cmd)
vendor/github.com/Microsoft/hcsshim/pkg/go-runhcs/runhcs.go:            status, err := runc.Monitor.Wait(cmd, ec)
vendor/github.com/Microsoft/hcsshim/pkg/go-runhcs/runhcs.go:    ec, err := runc.Monitor.Start(cmd)
vendor/github.com/Microsoft/hcsshim/pkg/go-runhcs/runhcs.go:    status, err := runc.Monitor.Wait(cmd, ec)
vendor/github.com/Microsoft/hcsshim/pkg/go-runhcs/runhcs_create.go:     runc "github.com/containerd/go-runc"
vendor/github.com/Microsoft/hcsshim/pkg/go-runhcs/runhcs_create.go:     runc.IO
vendor/github.com/Microsoft/hcsshim/pkg/go-runhcs/runhcs_create.go:     ec, err := runc.Monitor.Start(cmd)
vendor/github.com/Microsoft/hcsshim/pkg/go-runhcs/runhcs_create.go:             if c, ok := opts.IO.(runc.StartCloser); ok {
vendor/github.com/Microsoft/hcsshim/pkg/go-runhcs/runhcs_create.go:     status, err := runc.Monitor.Wait(cmd, ec)
vendor/github.com/Microsoft/hcsshim/pkg/go-runhcs/runhcs_exec.go:       "github.com/containerd/go-runc"
vendor/github.com/Microsoft/hcsshim/pkg/go-runhcs/runhcs_exec.go:       runc.IO
vendor/github.com/Microsoft/hcsshim/pkg/go-runhcs/runhcs_exec.go:       ec, err := runc.Monitor.Start(cmd)
vendor/github.com/Microsoft/hcsshim/pkg/go-runhcs/runhcs_exec.go:               if c, ok := opts.IO.(runc.StartCloser); ok {
vendor/github.com/Microsoft/hcsshim/pkg/go-runhcs/runhcs_exec.go:       status, err := runc.Monitor.Wait(cmd, ec)

I would say no, though somebody may raise his/her hand to fix. But I think this would be another patchset to refactor the existing code.