qt.go
qt.go copied to clipboard
Problem with C.RTLD_NODELETE and C.RTLD_NOLOAD
When trying run in VSC button.go
then
..\..\..\..\..\bin\pkg\mod\github.com\kitech\[email protected]\dl.go:21:19: could not determine kind of name for C.RTLD_NODELETE
..\..\..\..\..\bin\pkg\mod\github.com\kitech\[email protected]\dl.go:20:19: could not determine kind of name for C.RTLD_NOLOAD
exit status 2
Process exiting with code: 1
Is this can be related with https://github.com/kitech/qt.go/issues/43 ?
In short, No.
The latest code already comment this two symbols: https://github.com/kitech/dl/blob/fa7e1b9bab3dc216669acf2215c8a88cb3675ddc/dl.go#L21
So just update kitech/dl is fine, go get -u github.com/kitech/dl
So how you get a old version package? seems go module
do that?
The VSC automaticly downloaded all when "Lanch GO". In fact it is commented as in link in Go\src\github.com\kitech\dl
.
But not commented on Go\bin\pkg\mod\github.com\kitech\[email protected]
Not sure why old version was downloaded.
I made experiment by replace new source code to this old version, but is no sense probably as bellow;
# github.com/kitech/qt.go/qtrt
..\qtrt\ffi_invoke.go:10:17: fatal error: ffi.h: No such file or directory
compilation terminated.
exit status 2
Process exiting with code: 1
Now the log from VSC is similar like https://github.com/kitech/qt.go/issues/43#issuecomment-522253177
time="2019-08-17T18:53:08+02:00" level=warning msg="CGO_CFLAGS already set, Cgo code could be optimized." layer=dlv
go: extracting github.com/kitech/dl v0.0.0-20160302100715-9a2e942d3477
# runtime/cgo
gcc: warning: D:\qtenv\lib\libffi-3.2.1\include: linker input file unused because linking not done
# runtime/cgo
gcc: warning: D:\qtenv\lib\libffi-3.2.1\include: linker input file unused because linking not done
# runtime/cgo
gcc: warning: D:\qtenv\lib\libffi-3.2.1\include: linker input file unused because linking not done
# runtime/cgo
gcc: warning: D:\qtenv\lib\libffi-3.2.1\include: linker input file unused because linking not done
# runtime/cgo
gcc: warning: D:\qtenv\lib\libffi-3.2.1\include: linker input file unused because linking not done
# runtime/cgo
gcc: warning: D:\qtenv\lib\libffi-3.2.1\include: linker input file unused because linking not done
# runtime/cgo
gcc: warning: D:\qtenv\lib\libffi-3.2.1\include: linker input file unused because linking not done
# runtime/cgo
gcc: warning: D:\qtenv\lib\libffi-3.2.1\include: linker input file unused because linking not done
# github.com/kitech/dl
..\..\..\..\..\bin\pkg\mod\github.com\kitech\[email protected]\dl.go:4:20: fatal error: dlfcn.h: No such file or directory
// #include <dlfcn.h>
^
compilation terminated.
exit status 2
Process exiting with code: 1
Try disable go module support. Not test too much.
I create a PR updating the dl pinning in the go.mod (#52). I belive this solves the problem, as the current pinning points to an old version that requires this symbols from dlfcn.h.