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 failed on windows: cannot use fd (variable of type int) as type syscall.Handle in argument to syscall.CloseOnExec #44

Closed
masx200 opened this issue Jul 8, 2022 · 1 comment

Comments

@masx200
Copy link

masx200 commented Jul 8, 2022

Description

A short description of what's going on

 go build -ldflags "-w -s" -trimpath -o speedtest main.go
go: downloading github.com/breml/rootcerts v0.2.1
go: downloading github.com/spf13/viper v1.10.1
go: downloading github.com/go-chi/chi/v5 v5.0.7
go: downloading github.com/go-chi/cors v1.2.0
go: downloading github.com/go-chi/render v1.0.1
go: downloading github.com/pires/go-proxyproto v0.6.1
go: downloading github.com/umahmood/haversine v0.0.0-20151105152445-808ab04add26
go: downloading github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
go: downloading github.com/gorilla/securecookie v1.1.1
go: downloading github.com/gorilla/sessions v1.2.1
go: downloading github.com/oklog/ulid/v2 v2.0.2
go: downloading golang.org/x/image v0.0.0-20211028202545-6944b10bf410
go: downloading go.etcd.io/bbolt v1.3.6
go: downloading github.com/lib/pq v1.10.4
go: downloading golang.org/x/sys v0.0.0-20220114195835-da31bd327af9
go: downloading github.com/fsnotify/fsnotify v1.5.1
go: downloading github.com/mitchellh/mapstructure v1.4.3
go: downloading github.com/spf13/afero v1.8.0
go: downloading github.com/spf13/cast v1.4.1
go: downloading gopkg.in/ini.v1 v1.66.2
go: downloading github.com/pelletier/go-toml v1.9.4
# github.com/coreos/go-systemd/activation
C:\Users\Administrator\go\pkg\mod\github.com\coreos\go-systemd@v0.0.0-20191104093116-d3cd4ed1dbcf\activation\files.go:57:23: cannot use fd (variable of type int) as type syscall.Handle in argument to syscall.CloseOnExec

Server

Every info you can provide about your server: web server, database, PHP version, ... as well as server-side speedtest settings
If possible, provide an URL to your speedtest so we can check it

Client

Browser, OS, type of connection, unusual software, ...

 go version
go version go1.18.3 windows/amd64
Microsoft Windows [版本 10.0.22621.105]

Steps to reproduce

  • Do this
  • Do that
  • Bad stuff happens

Expected behaviour

What should have happened

Screenshots

If necessary, add screenshots of the test.
F12 > Network screenshots can be particularly useful

@masx200 masx200 changed the title build failed : cannot use fd (variable of type int) as type syscall.Handle in argument to syscall.CloseOnExec build failed on windows: cannot use fd (variable of type int) as type syscall.Handle in argument to syscall.CloseOnExec Jul 8, 2022
@masx200
Copy link
Author

masx200 commented Jul 8, 2022

In order to compile successfully on windows, go-systemd can be removed.

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

1 participant