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

when executed go get -x github.com/sciter-sdk/go-sciter has error #310

Open
euii opened this issue Jun 27, 2021 · 8 comments
Open

when executed go get -x github.com/sciter-sdk/go-sciter has error #310

euii opened this issue Jun 27, 2021 · 8 comments

Comments

@euii
Copy link

euii commented Jun 27, 2021

I use macos big sur 11.4 and go version go1.15.13 darwin/amd64

  1. downloaded sdk and unzip to home folder
  2. cd ~/sciter-js-sdk-main/bin/macosx/
  3. export DYLD_LIBRARY_PATH=$PWD
  4. execute go get -x github.com/sciter-sdk/go-sciter

The following error has occurred

../../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:110:145: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterDataReady
../../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:141:85: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterDataReadyAsync
../../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:151:120: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterLoadFile
../../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:174:104: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterLoadHtml
../../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:242:142: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterSetCallback
../../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:296:60: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterSetCSS
../../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:319:110: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterSetMediaType
../../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:330:96: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterGetMinWidth
../../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:339:106: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterGetMinHeight
../../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:359:48: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterCall
../../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:359:48: too many errors

@pravic
Copy link
Member

pravic commented Jun 27, 2021

0.5.0 is way outdated. Use master, the errors were fixed in #257.

I, probably, need to update the tags.

@pkaftj
Copy link

pkaftj commented Jun 28, 2021

Try this one https://github.com/pkaftj/sciter-go

@euii
Copy link
Author

euii commented Jul 1, 2021

0.5.0 is way outdated. Use master, the errors were fixed in #257.

I, probably, need to update the tags.

Thank you so much, I'm stupid )))

@euii euii closed this as completed Jul 1, 2021
@euii euii reopened this Jul 1, 2021
@euii
Copy link
Author

euii commented Jul 1, 2021

I have downloaded the master branch code, then downloaded the latest sdk from the official website, configured the DYLD_LIBRARY_PATH environment variables, and ran the following results.

my test code

package main

import (
	"github.com/sciter-sdk/go-sciter"
	"github.com/sciter-sdk/go-sciter/window"
)

func main()  {
	rect := sciter.NewRect(200,200,300,500)
	win, _ := window.New(sciter.SW_MAIN | sciter.SW_TITLEBAR, rect)
	win.SetTitle("load HTML page")
	win.LoadFile("./index.html")
	win.Show()
	win.Run()
}

my go mod

module SciterTest

go 1.15

require (
	github.com/sciter-sdk/go-sciter v0.5.1-0.20210404081253-a04e052a2813
)

error message

/usr/local/Cellar/[email protected]/1.15.13/libexec/bin/go build -o /private/var/folders/49/1wbzfqtd4_v0_38mdtrc0rh40000gn/T/___2go_build_SciterTest SciterTest #gosetup
# github.com/sciter-sdk/go-sciter
request.c:5:74: warning: non-void function does not return a value [-Wreturn-type]
request.c:6:78: warning: non-void function does not return a value [-Wreturn-type]
request.c:7:128: warning: non-void function does not return a value [-Wreturn-type]
request.c:8:142: warning: non-void function does not return a value [-Wreturn-type]
request.c:9:126: warning: non-void function does not return a value [-Wreturn-type]
request.c:10:141: warning: non-void function does not return a value [-Wreturn-type]
request.c:11:160: warning: non-void function does not return a value [-Wreturn-type]
request.c:12:133: warning: non-void function does not return a value [-Wreturn-type]
request.c:13:172: warning: non-void function does not return a value [-Wreturn-type]
request.c:14:174: warning: non-void function does not return a value [-Wreturn-type]
request.c:15:130: warning: non-void function does not return a value [-Wreturn-type]
request.c:16:131: warning: non-void function does not return a value [-Wreturn-type]
request.c:17:169: warning: non-void function does not return a value [-Wreturn-type]
request.c:18:171: warning: non-void function does not return a value [-Wreturn-type]
request.c:19:133: warning: non-void function does not return a value [-Wreturn-type]
request.c:20:171: warning: non-void function does not return a value [-Wreturn-type]
request.c:21:173: warning: non-void function does not return a value [-Wreturn-type]
request.c:22:179: warning: non-void function does not return a value [-Wreturn-type]
request.c:23:146: warning: non-void function does not return a value [-Wreturn-type]
request.c:24:111: warning: non-void function does not return a value [-Wreturn-type]
request.c:25:170: warning: non-void function does not return a value [-Wreturn-type]
request.c:26:165: warning: non-void function does not return a value [-Wreturn-type]
request.c:27:145: warning: non-void function does not return a value [-Wreturn-type]
request.c:28:130: warning: non-void function does not return a value [-Wreturn-type]
request.c:29:132: warning: non-void function does not return a value [-Wreturn-type]
request.c:30:124: warning: non-void function does not return a value [-Wreturn-type]
request.c:31:140: warning: non-void function does not return a value [-Wreturn-type]
request.c:32:137: warning: non-void function does not return a value [-Wreturn-type]
/private/var/folders/49/1wbzfqtd4_v0_38mdtrc0rh40000gn/T/___2go_build_SciterTest
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x0]

runtime stack:
runtime.throw(0x40ef2b7, 0x2a)
        /usr/local/Cellar/[email protected]/1.15.13/libexec/src/runtime/panic.go:1116 +0x72
runtime.sigpanic()
        /usr/local/Cellar/[email protected]/1.15.13/libexec/src/runtime/signal_unix.go:726 +0x48c

goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0x40b7630, 0xc00003ee68, 0x9313a88)
        /usr/local/Cellar/[email protected]/1.15.13/libexec/src/runtime/cgocall.go:133 +0x5b fp=0xc00003ee38 sp=0xc00003ee00 pc=0x400517b
github.com/sciter-sdk/go-sciter._Cfunc_SciterCreateWindow(0x82, 0xc00012e010, 0x0, 0x0, 0x0, 0x0)
        _cgo_gotypes.go:984 +0x4e fp=0xc00003ee68 sp=0xc00003ee38 pc=0x40af12e
github.com/sciter-sdk/go-sciter.CreateWindow.func1(0x82, 0xc00012e010, 0x0, 0x0, 0xc0001121e0)
        /Users/wangye/go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter_darwin.go:26 +0x9d fp=0xc00003eeb0 sp=0xc00003ee68 pc=0x40b293d
github.com/sciter-sdk/go-sciter.CreateWindow(0x82, 0xc00012e010, 0x0, 0x0, 0x0, 0x400f4f8)
        /Users/wangye/go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter_darwin.go:26 +0x4c fp=0xc00003eee8 sp=0xc00003eeb0 pc=0x40b1eec
github.com/sciter-sdk/go-sciter/window.New(0x82, 0xc00012e010, 0x0, 0x0, 0xffffffff)
        /Users/wangye/go/pkg/mod/github.com/sciter-sdk/[email protected]/window/window_darwin.go:57 +0x68 fp=0xc00003ef48 sp=0xc00003eee8 pc=0x40b4a28
main.main()
        /Users/wangye/Library/Mobile Documents/com~apple~CloudDocs/sciterTest/main.go:10 +0x65 fp=0xc00003ef88 sp=0xc00003ef48 pc=0x40b4e05
runtime.main()
        /usr/local/Cellar/[email protected]/1.15.13/libexec/src/runtime/proc.go:204 +0x209 fp=0xc00003efe0 sp=0xc00003ef88 pc=0x4036da9
runtime.goexit()
        /usr/local/Cellar/[email protected]/1.15.13/libexec/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc00003efe8 sp=0xc00003efe0 pc=0x4065961

Process finished with the exit code 2

@euii
Copy link
Author

euii commented Jul 2, 2021

Try this one https://github.com/pkaftj/sciter-go

Ok, Thanks. Let me try it

@happyRip
Copy link

I don't see any progress here, but have encountered an issue myself having go 1.16.6.
Couldn't install using sciter-sdk/go-sciter, so went for pkaftj/sciter-go. I've managed to install it, but I can't run any demoes. Here is an error that I get trying to run/build demo1 @pkaftj :

% go run demo1.go                                                                                                                        (main)sciter-go
# command-line-arguments
./demo1.go:23:17: cannot use "github.com/pkaftj/sciter-go".SW_TITLEBAR | "github.com/pkaftj/sciter-go".SW_RESIZEABLE | "github.com/pkaftj/sciter-go".SW_CONTROLS | "github.com/pkaftj/sciter-go".SW_MAIN | "github.com/pkaftj/sciter-go".SW_ENABLE_DEBUG (type "github.com/pkaftj/sciter-go".WindowCreationFlag) as type "github.com/iwctwbai/sciter-go".WindowCreationFlag in argument to window.New

@geocine
Copy link

geocine commented Oct 9, 2021

I solved this @happyRip @euii . Need to do 2 things

  1. Use latest go-sciter SDK
      go get https://github.com/sciter-sdk/go-sciter@master
    
  2. Use sciter binaries from version 4.4.6.8 of sciter-js-sdk by checking out c27c567
      git clone [email protected]:c-smile/sciter-js-sdk.git
      git checkout c27c567
    

Segmentation fault is caused by this #297. This is the last version of 4.4.6.x before the api changed in 4.4.7.0.

@55utah
Copy link

55utah commented Nov 8, 2021

I solved this @happyRip @euii . Need to do 2 things

  1. Use latest go-sciter SDK
      go get https://github.com/sciter-sdk/go-sciter@master
    
  2. Use sciter binaries from version 4.4.6.8 of sciter-js-sdk by checking out c27c567
      git clone [email protected]:c-smile/sciter-js-sdk.git
      git checkout c27c567
    

Segmentation fault is caused by this #297. This is the last version of 4.4.6.x before the api changed in 4.4.7.0.

"git clone [email protected]:c-smile/sciter-js-sdk.git" is too big;
"that sciter-js-sdk by checking out c27c567" can find from here (c-smile/sciter-js-sdk@c27c567) by online, we can download the binaries online.
(But I still can not solved this, I give up.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

6 participants