#just noticed

1 messages · Page 1 of 1 (latest)

barren quail
#

From ChatGPT analysis of strace on WSL:

This log line from your previous strace run is definitive:

epoll_ctl(4, EPOLL_CTL_ADD, 3, ...) = -1 EPERM (Operation not permitted)

This call attempts to use epoll_ctl on file descriptor 3, which in WSL is likely pointing to:

readlinkat(AT_FDCWD, "/proc/self/exe", "/home/jeremy/.local/bin/cu", 128) = 26
openat(AT_FDCWD, "/home/jeremy/.local/bin/cu", O_RDONLY|O_CLOEXEC) = 3

So it's epoll'ing its own binary as if it's a socket or pipe. This succeeds or is ignored/tolerated on Linux/macOS but hard-fails with EPERM on WSL 2.

#

So it suggests that indeed a proper *nix kernel might be needed?

...
epoll_create1(EPOLL_CLOEXEC)            = 4
eventfd2(0, EFD_CLOEXEC|EFD_NONBLOCK)   = 5
epoll_ctl(4, EPOLL_CTL_ADD, 5, {events=EPOLLIN, data={u32=19162688, u64=19162688}}) = 0
epoll_ctl(4, EPOLL_CTL_ADD, 3, {events=EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, data={u32=2523922433, u64=9157581592899616769}}) = -1 EPERM (Operation not permitted)
...
errant vortex
#

Yeah I just went with “not supported” given we’re using quite a bit of unixy bits and the last thing we need before having tests or CI is another build target that nobody on the dev team actively uses

#

Iirc I had a windows build failure while initially cross compiling but didn’t consider WSL

barren quail
#

Lots of folks using windows dev machines with VS Code and MCP, including via WSL, from what I gather online. So would be ideal if they could use CU.

errant vortex
#

i'm not anti-windows, just a question of priorities when i was putting up a release system

#

lemme see if i can repro the build error real quick to leave it here for posterity (and hopefully someone who wants to come by and make it work)

#
# github.com/tiborvass/go-watch
../../go/pkg/mod/github.com/tiborvass/go-watch@v0.0.0-20250607214558-08999a83bf8b/watch.go:71:20: undefined: unix.Termios
../../go/pkg/mod/github.com/tiborvass/go-watch@v0.0.0-20250607214558-08999a83bf8b/watch.go:72:20: undefined: termios.Tcgetattr
../../go/pkg/mod/github.com/tiborvass/go-watch@v0.0.0-20250607214558-08999a83bf8b/watch.go:77:26: undefined: unix.ICANON
../../go/pkg/mod/github.com/tiborvass/go-watch@v0.0.0-20250607214558-08999a83bf8b/watch.go:77:40: undefined: unix.ECHO
../../go/pkg/mod/github.com/tiborvass/go-watch@v0.0.0-20250607214558-08999a83bf8b/watch.go:78:25: undefined: unix.ISIG
../../go/pkg/mod/github.com/tiborvass/go-watch@v0.0.0-20250607214558-08999a83bf8b/watch.go:79:20: undefined: termios.Tcsetattr
../../go/pkg/mod/github.com/tiborvass/go-watch@v0.0.0-20250607214558-08999a83bf8b/watch.go:79:42: undefined: termios.TCSANOW
../../go/pkg/mod/github.com/tiborvass/go-watch@v0.0.0-20250607214558-08999a83bf8b/watch.go:83:16: undefined: termios.Tcsetattr
../../go/pkg/mod/github.com/tiborvass/go-watch@v0.0.0-20250607214558-08999a83bf8b/watch.go:83:38: undefined: termios.TCSANOW
../../go/pkg/mod/github.com/tiborvass/go-watch@v0.0.0-20250607214558-08999a83bf8b/watch.go:91:34: undefined: syscall.SIGWINCH
../../go/pkg/mod/github.com/tiborvass/go-watch@v0.0.0-20250607214558-08999a83bf8b/watch.go:91:34: too many errors