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 failure on illumos/solaris: SYS_IOCTL undefined #3

Open
zoomosis opened this issue Feb 26, 2022 · 2 comments
Open

Build failure on illumos/solaris: SYS_IOCTL undefined #3

zoomosis opened this issue Feb 26, 2022 · 2 comments

Comments

@zoomosis
Copy link

Attempting to build Micro on a recent version of OmniOS (illumos/solaris). All goes well until:

GOOS=illumos GOARCH=amd64 go generate ./runtime
go build -trimpath -ldflags "-s -w -X github.com/zyedidia/micro/v2/internal/util.Version=2.0.11-dev.52 -X github.com/zyedidia/micro/v2/internal/util.CommitHash=987e4090 -X 'github.com/zyedidia/micro/v2/internal/util.CompileDate=February 27, 2022' " ./cmd/micro
# github.com/zyedidia/terminal
../../go/pkg/mod/github.com/zyedidia/[email protected]/ioctl_posix.go:13:3: undefined: syscall.SYS_IOCTL
gmake: *** [Makefile:19: build-quick] Error 2

There is a thread (link below) that says, "Basicaly on Solaris you have to use unix.Ioctl{Get,Set}Termios() and unix.IoctlGetWinsize(), not unix.Syscall(). So unix.SYS_IOCTL isn't needed."

golang/go#29581

I'm not familiar enough with Go to submit a fix but this suggests it's fairly simple.

@zoomosis
Copy link
Author

Replacing ioctl_posix.go with dummy code seems good enough to provide a usable build of Micro in Solaris:

package terminal

func (t *VT) ptyResize() error {
        return nil
}

@daonb
Copy link

daonb commented Jan 3, 2023

@zoomosis please close this as it seems you've found a way to make it work.

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

2 participants