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

Broken under Go 1.12 (relocation target runtime.acquirem not defined for ABI0 (but is defined for ABIInternal)) #190

Open
neclepsio opened this issue Feb 26, 2019 · 5 comments

Comments

@neclepsio
Copy link

Compiling using Go 1.12 gives the following error:

cdata.Ref: relocation target runtime.acquirem not defined for ABI0 (but is defined for ABIInternal)
cdata.Ref: relocation target runtime.releasem not defined for ABI0 (but is defined for ABIInternal)
@neclepsio
Copy link
Author

@neclepsio
Copy link
Author

neclepsio commented Feb 27, 2019

I was able to make it work removing the Refs function from assembly and adding this definition in a Windows-only file:

package cdata

import (
	"golang.org/x/sys/windows"
)

func Ref() uintptr {
	return uintptr(windows.GetCurrentThreadId())
}

Maybe this leaks a pointer so it shoud be modified to return a uint32, along with guiMainRef and guiPaintRef in bridge.go (and fixing related compilation errors). I suppose Linux and MacOS can use a similar approach using syscall.Gettid.

@nanu-c
Copy link

nanu-c commented May 5, 2019

Your solution is only working in windows?

@neclepsio
Copy link
Author

In neclepsio/qml-go there is a fix tested under Windows and Linux.

@nanu-c
Copy link

nanu-c commented May 7, 2019

Thanks a lot, i merged your changes in my fork and i still had to rename the assembler files to get it working :)

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