Can't build gitea on Windows (undefined: syscall.Kill) #4128

Closed
opened 2025-11-02 05:39:32 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @lukbukkit on GitHub (Oct 16, 2019).

  • Gitea version (or commit ref): 167e8f18da
  • Git version: git version 2.23.0.windows.1
  • Go version: go version go1.13.1 windows/amd64
  • Operating system: Windows 10 1903
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant

Description

When trying to build Gitea under Windows 10 I get this error:

I guess the error is caused by the fact that the methods of the Go package syscall are platform dependent. See syscall_windows.go, there is no Kill method. The code which breaks my build was introduced with #7274.

# code.gitea.io/gitea/modules/graceful
modules\graceful\server.go:112:7: undefined: syscall.Kill
modules\graceful\server.go:158:7: undefined: syscall.Kill
modules\graceful\server_signals.go:22:3: undefined: syscall.SIGUSR1
modules\graceful\server_signals.go:23:3: undefined: syscall.SIGUSR2
modules\graceful\server_signals.go:26:3: undefined: syscall.SIGTSTP
modules\graceful\server_signals.go:57:8: undefined: syscall.SIGUSR1
modules\graceful\server_signals.go:59:8: undefined: syscall.SIGUSR2
modules\graceful\server_signals.go:68:8: undefined: syscall.SIGTSTP

The build works fine with the commit 4a290bd6.

Originally created by @lukbukkit on GitHub (Oct 16, 2019). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 167e8f18da3aadcdcdd7bb8c488c39d73ac65803 - Git version: `git version 2.23.0.windows.1` - Go version: `go version go1.13.1 windows/amd64` - Operating system: Windows 10 1903 - Database (use `[x]`): - [ ] PostgreSQL - [X] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [X] No - [ ] Not relevant ## Description When trying to build Gitea under Windows 10 I get this error: I guess the error is caused by the fact that the methods of the Go package [`syscall`](https://golang.org/pkg/syscall/) are platform dependent. See [syscall_windows.go](https://golang.org/src/syscall/syscall_windows.go), there is no `Kill` method. The code which breaks my build was introduced with #7274. ``` # code.gitea.io/gitea/modules/graceful modules\graceful\server.go:112:7: undefined: syscall.Kill modules\graceful\server.go:158:7: undefined: syscall.Kill modules\graceful\server_signals.go:22:3: undefined: syscall.SIGUSR1 modules\graceful\server_signals.go:23:3: undefined: syscall.SIGUSR2 modules\graceful\server_signals.go:26:3: undefined: syscall.SIGTSTP modules\graceful\server_signals.go:57:8: undefined: syscall.SIGUSR1 modules\graceful\server_signals.go:59:8: undefined: syscall.SIGUSR2 modules\graceful\server_signals.go:68:8: undefined: syscall.SIGTSTP ``` The build works fine with the commit 4a290bd6.
Author
Owner

@zeripath commented on GitHub (Oct 16, 2019):

Fixed by #8537

@zeripath commented on GitHub (Oct 16, 2019): Fixed by #8537
Author
Owner

@lukbukkit commented on GitHub (Oct 16, 2019):

Thanks a lot!

@lukbukkit commented on GitHub (Oct 16, 2019): Thanks a lot!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4128