Skip to content

compile/arm64: - undefined: hooks [windows] #37220

@resssoft

Description

@resssoft

What version of Go are you using (go version)?

go version go1.13.8 windows/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
set GO111MODULE=
set GOARCH=386
set GOBIN=
set GOCACHE=C:\Users\UserName\AppData\Local\go-build
set GOENV=C:\Users\UserName\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\UserName\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set GO386=sse2
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m32 -fmessage-length=0 -fdebug-prefix-map=C:\Users\UserName\AppData\Local\Temp\go-build321695466=/tmp/go-build -gno-record-gcc-switches

What did you do?

install mingw-w64 from sourceforge.net

go get "github.com/go-vgo/robotgo" Output
# github.com/go-vgo/robotgo
C:\Users\UserName\go\src\github.com\go-vgo\robotgo\hook.go:53:10: undefined: hook.AddEvent
C:\Users\UserName\go\src\github.com\go-vgo\robotgo\hook.go:65:2: undefined: hook.StopEvent
C:\Users\UserName\go\src\github.com\go-vgo\robotgo\hook.go:70:19: undefined: hook.Event
C:\Users\UserName\go\src\github.com\go-vgo\robotgo\hook.go:71:9: undefined: hook.Start
C:\Users\UserName\go\src\github.com\go-vgo\robotgo\hook.go:76:2: undefined: hook.End
C:\Users\UserName\go\src\github.com\go-vgo\robotgo\hook.go:85:7: undefined: hook.Start
C:\Users\UserName\go\src\github.com\go-vgo\robotgo\hook.go:98:18: undefined: hook.KeyHold
C:\Users\UserName\go\src\github.com\go-vgo\robotgo\hook.go:106:18: undefined: hook.KeyUp
C:\Users\UserName\go\src\github.com\go-vgo\robotgo\keycode.go:14:16: undefined: Map
C:\Users\UserName\go\src\github.com\go-vgo\robotgo\keycode.go:25:15: undefined: Map
C:\Users\UserName\go\src\github.com\go-vgo\robotgo\hook.go:106:18: too many errors
gcc -v Output
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/8.2.0/lto-wrapper.exe
Target: mingw32
Configured with: ../src/gcc-8.2.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --target=mingw32 --prefix=/mingw --disable-win32-registry --with-arch=i586 --with-tune=generic --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='MinGW.org GCC-8.2.0-5' --with-gmp=/mingw --with-mpfr=/mingw --with-mpc=/mingw --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --with-isl=/mingw --enable-libgomp --disable-libvtv --enable-nls --disable-build-format-warnings
Thread model: win32
gcc version 8.2.0 (MinGW.org GCC-8.2.0-5)

Compile for 386

go1.13.8.windows-386
Install mingw-get-0.6.3-mingw32-pre-20170905-1-bin.tar.xz from http://www.mingw.org/

go get "github.com/go-vgo/robotgo" Output
# github.com/robotn/gohook
C:\Users\UserName\AppData\Local\Temp\go-build569959594\b043\_x003.o: In function `eb_port_create':
C:/Users/UserName/go/src/github.com/robotn/gohook/chan/eb_chan.h:382: undefined reference to `sched_yield'
C:\Users\UserName\AppData\Local\Temp\go-build569959594\b043\_x003.o: In function `eb_port_free':
C:/Users/UserName/go/src/github.com/robotn/gohook/chan/eb_chan.h:350: undefined reference to `sched_yield'
C:/Users/UserName/go/src/github.com/robotn/gohook/chan/eb_chan.h:341: undefined reference to `sched_yield'
C:\Users\UserName\AppData\Local\Temp\go-build569959594\b043\_x003.o: In function `cleanup_ops':
C:/Users/UserName/go/src/github.com/robotn/gohook/chan/eb_chan.h:858: undefined reference to `sched_yield'
C:/Users/UserName/go/src/github.com/robotn/gohook/chan/eb_chan.h:858: undefined reference to `sched_yield'
C:\Users\UserName\AppData\Local\Temp\go-build569959594\b043\_x003.o:C:/Users/UserName/go/src/github.com/robotn/gohook/chan/eb_chan.h:643: more undefined references to `sched_yield' follow
collect2.exe: error: ld returned 1 exit status

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeOS-WindowsWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions