Closed danielhongwoo closed 3 years ago
Hi. I guess we don't officially support arm64, but would love to! Start by debugging the vanilla template. If you use vscode, you could debug your app as mentioned here: https://github.com/wailsapp/wails/issues/241
@danielhongwoo - any updates? There's no way for me to test this on an Nvidia board?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@leaanthony Sorry for the late update. I've been a little distracted these days.
I found the blocked line.
/home/nvidia/go/pkg/mod/github.com/wailsapp/wails@v1.8.0/lib/renderer/webview.go
188│ // Runtime assets
189│ wailsRuntime := mewn.String("../../runtime/assets/wails.js")
190│ w.evalJS(wailsRuntime)
It tries to evalJS in 190 for wails.js.
329│ func (w *webview) Eval(js string) error {
330│ p := C.CString(js)
331│ defer C.free(unsafe.Pointer(p))
332├> switch C.CgoWebViewEval(w.w, p) {
333│ case -1:
334│ return errors.New("evaluation failed")
335│ }
336│ return nil
337│ }
C.CgoWebViewEval(w.w, p) is called but never return, which is why nothing is showed up, I guess. Below is the call stack.
(gdb) p p
$11 = (github.com/wailsapp/wails/lib/renderer/webview._Ctype_char *) 0x107b800 "!function(n){var t={};function e(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return n[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}e.m=n,e.c=t,e.d=fun
ction(n,t,r){e.o(n,t)||Ob"...
(gdb) bt
#0 github.com/wailsapp/wails/lib/renderer/webview.(*webview).Eval (w=0x4000136030, js=..., ~r1=...) at /home/nvidia/go/pkg/mod/github.com/wailsapp/wails@v1.8.0/lib/renderer/webview/webview.go:332
#1 0x000000000075b144 in github.com/wailsapp/wails/lib/renderer.(*WebView).evalJS.func1 () at /home/nvidia/go/pkg/mod/github.com/wailsapp/wails@v1.8.0/lib/renderer/webview.go:102
#2 0x00000000007582e4 in github.com/wailsapp/wails/lib/renderer/webview._webviewDispatchGoCallback (index=0x1) at /home/nvidia/go/pkg/mod/github.com/wailsapp/wails@v1.8.0/lib/renderer/webview/webview.go:356
#3 0x00000000007575d8 in github.com/wailsapp/wails/lib/renderer/webview._cgoexpwrap_d1ad623198bc__webviewDispatchGoCallback (p0=0x1) at _cgo_gotypes.go:308
#4 0x00000000004616c4 in runtime.call32 () at /usr/local/go/src/runtime/asm_arm64.s:421
#5 0x0000000000407190 in runtime.cgocallbackg1 (ctxt=0) at /usr/local/go/src/runtime/cgocall.go:332
#6 0x0000000000406fd0 in runtime.cgocallbackg (ctxt=0) at /usr/local/go/src/runtime/cgocall.go:207
#7 0x0000000000463a84 in runtime.cgocallback_gofunc () at /usr/local/go/src/runtime/asm_arm64.s:1072
#8 0x00000000004638e8 in runtime.asmcgocall () at /usr/local/go/src/runtime/asm_arm64.s:913
#9 0x0000000000406ec0 in runtime.cgocall (fn=0x75f528 <_cgo_d1ad623198bc_Cfunc_CgoWebViewLoop>, arg=0x4000181a68, ~r2=<optimized out>) at /usr/local/go/src/runtime/cgocall.go:143
#10 0x00000000007570b4 in github.com/wailsapp/wails/lib/renderer/webview._Cfunc_CgoWebViewLoop (p0=<optimized out>, p1=1, r1=0) at _cgo_gotypes.go:181
#11 0x00000000007585d4 in github.com/wailsapp/wails/lib/renderer/webview.(*webview).Loop.func1 (w=0x4000136030, block=1, ~r0=<optimized out>) at /home/nvidia/go/pkg/mod/github.com/wailsapp/wails@v1.8.0/lib/renderer/webview/webview.go:279
#12 0x0000000000757a40 in github.com/wailsapp/wails/lib/renderer/webview.(*webview).Loop (w=0x4000136030, blocking=true, ~r1=<optimized out>) at /home/nvidia/go/pkg/mod/github.com/wailsapp/wails@v1.8.0/lib/renderer/webview/webview.go:279
#13 0x0000000000757aa0 in github.com/wailsapp/wails/lib/renderer/webview.(*webview).Run (w=0x4000136030) at /home/nvidia/go/pkg/mod/github.com/wailsapp/wails@v1.8.0/lib/renderer/webview/webview.go:283
#14 0x000000000075a154 in github.com/wailsapp/wails/lib/renderer.(*WebView).Run (w=0x4000176000, ~r0=...) at /home/nvidia/go/pkg/mod/github.com/wailsapp/wails@v1.8.0/lib/renderer/webview.go:235
#15 0x000000000075d2c8 in github.com/wailsapp/wails.(*App).start (a=0x4000178080, ~r0=...) at /home/nvidia/go/pkg/mod/github.com/wailsapp/wails@v1.8.0/app.go:151
#16 0x000000000075ddc8 in github.com/wailsapp/wails.(*App).start-fm (~r0=...) at /home/nvidia/go/pkg/mod/github.com/wailsapp/wails@v1.8.0/app.go:101
#17 0x000000000071edd4 in github.com/wailsapp/wails/cmd.(*Command).Run (c=0x400013e2c0, args=..., ~r1=...) at /home/nvidia/go/pkg/mod/github.com/wailsapp/wails@v1.8.0/cmd/cli.go:170
#18 0x000000000071e61c in github.com/wailsapp/wails/cmd.(*Cli).Run (c=0x4000128220, args=..., ~r1=...) at /home/nvidia/go/pkg/mod/github.com/wailsapp/wails@v1.8.0/cmd/cli.go:47
#19 0x000000000075cc64 in github.com/wailsapp/wails.(*App).Run (a=0x4000178080, ~r0=...) at /home/nvidia/go/pkg/mod/github.com/wailsapp/wails@v1.8.0/app.go:90
#20 0x000000000075e6b8 in main.main () at /home/nvidia/second/main.go:31
And I couldn't trace down inside the function C.CgoWebViewEval. I'll try it. It looks like webview library problem.
Any kind of idea or insight about this will be helpful.
All the pre-requisite libraries are installed.
sudo apt install build-essential libgtk-3-dev libwebkit2gtk-4.0-dev
installed webkit2gtk version: 2.20.5-0ubuntu0.16.04.1
nvidia@milab:~/second$ dpkg -l | grep libwebkit2gtk-4.0-dev
ii libwebkit2gtk-4.0-dev:arm64 2.20.5-0ubuntu0.16.04.1 arm64 Web content engine library for GTK+ - development files
nvidia@milab:~/second$ ldd build/second | grep webkit
libwebkit2gtk-4.0.so.37 => /usr/lib/aarch64-linux-gnu/libwebkit2gtk-4.0.so.37 (0x0000007f84e1d000)
nvidia@milab:~/second$ ll /usr/lib/aarch64-linux-gnu/libwebkit2gtk-4.0.so.37
lrwxrwxrwx 1 root root 28 Aug 15 2018 /usr/lib/aarch64-linux-gnu/libwebkit2gtk-4.0.so.37 -> libwebkit2gtk-4.0.so.37.28.5
This is firmly in webview territory. I did a quick check and found this ticket so it looks to be unsupported at this point (I'm assuming it's ARM v6?). The only thing I can say is that I'm working on a replacement for webview for v2 and can look at supporting ARM in that. I'm sure @tmclane has done some ARM stuff. We've also had other people use ARM but I'm assuming v5. There's this page about it. Let me know what else I can do or if you're interested in testing the v2 alternative (I'm hoping Jan).
@leaanthony Thanks for your comment. I'm dealing with ARMv8.
nvidia@milab:~/second$ cat /proc/cpuinfo
processor : 0
model name : ARMv8 Processor rev 3 (v8l)
BogoMIPS : 62.50
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x1
CPU part : 0xd07
CPU revision : 3
And I'm deeply interested in making the wails app working on ARMv8. So if there's anything I can do about it, please let me know. I don't have any experience in webview. But I think I could write some code to test "webview for v2" is working on ARMv8 or not. BTW, I can't find information about "webview for v2". Could you give me a link to the project page?
Hey, it's being worked on in various branches in this repo beginning with v2
. The linux port is absolutely not ready yet and won't even compile. I'll give you a heads up when it at least compiles and we can work through getting it working :+1: If you don't hear from me within a month, please ping me on this ticket!
Oh~ I completely misunderstood yesterday. You have a plan to replace "webview" with another library in the wails v2. If I'm right on the same page, which one do you want to use and why? What are your candidates?
I'm making a dedicated one for Wails. Mac is ~98% and we'll be in a place to test Linux compilation in about a month (It might not be 100% ready but we can at least iron out compilation issues).
Hi~ @leaanthony Is there any news on this?
Hi @danielhongwoo The linux port is on the back burber for now as there is a huge need to get Windows donevso it might be a while until we're there.
Description
To Reproduce Steps to reproduce the behaviour:
Expected behaviour
Screenshots
System Details
Additional context