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

apple silicon support? #64

Closed
Paosder opened this issue Dec 21, 2020 · 13 comments · Fixed by #123
Closed

apple silicon support? #64

Paosder opened this issue Dec 21, 2020 · 13 comments · Fixed by #123
Labels
bug Something isn't working macos Related to macOS

Comments

@Paosder
Copy link

Paosder commented Dec 21, 2020

Hi, I want to test this library with Mac Mini(m1), but it doesn't work.

deno run -Ar --unstable https://deno.land/x/webview/examples/local.ts
...
...
Download https://deno.land/[email protected]/hash/_wasm/wasm.js
Download https://deno.land/[email protected]/encoding/base64.ts
Download https://deno.land/[email protected]/path/_util.ts
Download https://deno.land/[email protected]/path/_constants.ts
Download https://deno.land/x/[email protected]/file_fetcher.ts
Check https://deno.land/x/webview/examples/local.ts
error: Uncaught (in promise) Error: Could not open library: dlopen(/Users/paosder-mini/Library/Caches/deno/plug/https/github.com/4b121ee5a08490d714e3f7d99bf1bcce7bafae851df6e895a068bf3e7d1866ae.dylib, 5): no suitable image found.  Did find:
	/Users/paosder-mini/Library/Caches/deno/plug/https/github.com/4b121ee5a08490d714e3f7d99bf1bcce7bafae851df6e895a068bf3e7d1866ae.dylib: mach-o, but wrong architecture
	/Users/paosder-mini/Library/Caches/deno/plug/https/github.com/4b121ee5a08490d714e3f7d99bf1bcce7bafae851df6e895a068bf3e7d1866ae.dylib: stat() failed with errno=35
    at processResponse (deno:core/core.js:223:11)
    at Object.jsonOpSync (deno:core/core.js:246:12)
    at Object.openPlugin (deno:cli/rt/40_plugins.js:7:17)
    at Module.prepare (https://deno.land/x/[email protected]/plug.ts:82:15)
    at async load (https://deno.land/x/[email protected]/plugin.ts:75:9)
    at async https://deno.land/x/[email protected]/mod.ts:5:1

It seems doesn't support ARM(m1) yet, however Deno support m1 latest release v1.6 using latest rust to build with.
How do I solve this problem or is there any plan of supporting arm architecture?

Thank you :)

@eliassjogreen eliassjogreen added enhancement New feature or request macos Related to macOS labels Dec 24, 2020
@misare
Copy link

misare commented Jan 28, 2021

我遇到了同样的问题 。

@matt1
Copy link

matt1 commented Feb 23, 2021

I get a similar error (but not identical) on a Raspberry Pi (also aarch64)

rror: Uncaught (in promise) Error: Could not open library: /home/pi/.cache/deno/plug/https/github.com/b1d03bdcfe69960f0dfe0c71a4efcec9d3c3a807748d69b610802e27ddda8bd4.so: cannot open shared object file: No such file or directory
    throw new ErrorClass(res.err.message);
          ^
    at processResponse (deno:core/core.js:213:11)
    at Object.jsonOpSync (deno:core/core.js:237:12)
    at Object.openPlugin (deno:runtime/js/40_plugins.js:8:17)
    at Module.prepare (https://deno.land/x/[email protected]/plug.ts:87:15)
    at async load (https://deno.land/x/[email protected]/plugin.ts:75:9)
    at async https://deno.land/x/[email protected]/mod.ts:5:1
$ deno --version
deno 1.7.5 (release, aarch64-unknown-linux-gnu)
v8 9.0.123
typescript 4.1.4
Linux raspberrypi 5.10.4-v8+ #1389 SMP PREEMPT Wed Jan 6 13:52:18 GMT 2021 aarch64 GNU/Linux

@arthropodSeven
Copy link

arthropodSeven commented Apr 30, 2021

I attempted to build webview_deno at version 0.5.6 on my M1 Mac Mini. Build failure report is attached, it's a weird one.

$ deno run --unstable -A scripts/build.ts
building rust
   Compiling webview-sys v0.6.1 (https://github.com/Boscop/web-view?rev=1c20b92#1c20b925)
   Compiling thiserror-impl v1.0.20
   Compiling futures-macro v0.3.12
   Compiling serde_derive v1.0.123
   Compiling pin-project-internal v1.0.5
   Compiling deno_json_op v0.1.1
The following warnings were emitted during compilation:

warning: webview_cocoa.c:89:23: error: too many arguments to function call, expected 0, have 3
warning:   return objc_msgSend((id)objc_getClass("NSString"),
warning:          ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
warning: objc_msgSend(void /* id self, SEL op, ... */ )
warning: ^
warning: webview_cocoa.c:95:20: error: too many arguments to function call, expected 0, have 2
warning:       objc_msgSend((id)objc_getClass("NSMenuItem"), sel_registerName("alloc"));
warning:       ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
warning: objc_msgSend(void /* id self, SEL op, ... */ )
warning: ^
warning: webview_cocoa.c:96:16: error: too many arguments to function call, expected 0, have 5
warning:   objc_msgSend(item, sel_registerName("initWithTitle:action:keyEquivalent:"),
warning:   ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
warning: objc_msgSend(void /* id self, SEL op, ... */ )
warning: ^
warning: webview_cocoa.c:98:16: error: too many arguments to function call, expected 0, have 2
warning:   objc_msgSend(item, sel_registerName("autorelease"));
warning:   ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
warning: objc_msgSend(void /* id self, SEL op, ... */ )
warning: ^
warning: webview_cocoa.c:119:27: error: too many arguments to function call, expected 0, have 11
warning:   id event = objc_msgSend((id)objc_getClass("NSEvent"),
warning:              ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
warning: objc_msgSend(void /* id self, SEL op, ... */ )
warning: ^
warning: webview_cocoa.c:124:25: error: too many arguments to function call, expected 0, have 2
warning:   id app = objc_msgSend((id)objc_getClass("NSApplication"),
warning:            ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
warning: objc_msgSend(void /* id self, SEL op, ... */ )
warning: ^
warning: webview_cocoa.c:135:34: error: too many arguments to function call, expected 0, have 2
warning:                     objc_msgSend((id)objc_getClass("NSDate"),
warning:                     ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
warning: objc_msgSend(void /* id self, SEL op, ... */ )
warning: ^
warning: webview_cocoa.c:148:45: error: too many arguments to function call, expected 0, have 2
warning:                                objc_msgSend(message, sel_registerName("body")),
warning:                                ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
warning: objc_msgSend(void /* id self, SEL op, ... */ )
warning: ^
warning: webview_cocoa.c:155:31: error: too many arguments to function call, expected 0, have 2
warning:   id openPanel = objc_msgSend((id)objc_getClass("NSOpenPanel"),
warning:                  ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
warning: objc_msgSend(void /* id self, SEL op, ... */ )
warning: ^
warning: webview_cocoa.c:160:20: error: too many arguments to function call, expected 0, have 2
warning:       objc_msgSend(parameters, sel_registerName("allowsMultipleSelection")));
warning:       ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
warning: objc_msgSend(void /* id self, SEL op, ... */ )
warning: ^
warning: webview_cocoa.c:162:16: error: too many arguments to function call, expected 0, have 3
warning:   objc_msgSend(openPanel, sel_registerName("setCanChooseFiles:"), 1);
warning:   ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
warning: objc_msgSend(void /* id self, SEL op, ... */ )
warning: ^
warning: webview_cocoa.c:166:42: error: too many arguments to function call, expected 0, have 2
warning:           completionHandler(objc_msgSend(openPanel, sel_registerName("URLs")));
warning:                             ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
warning: objc_msgSend(void /* id self, SEL op, ... */ )
warning: ^
warning: webview_cocoa.c:164:7: error: too many arguments to function call, expected 0, have 3
warning:       openPanel, sel_registerName("beginWithCompletionHandler:"), ^(id result) {
warning:       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
warning: objc_msgSend(void /* id self, SEL op, ... */ )
warning: ^
warning: webview_cocoa.c:176:31: error: too many arguments to function call, expected 0, have 2
warning:   id savePanel = objc_msgSend((id)objc_getClass("NSSavePanel"),
warning:                  ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
warning: objc_msgSend(void /* id self, SEL op, ... */ )
warning: ^
warning: webview_cocoa.c:178:16: error: too many arguments to function call, expected 0, have 3
warning:   objc_msgSend(savePanel, sel_registerName("setCanCreateDirectories:"), 1);
warning:   ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
warning: objc_msgSend(void /* id self, SEL op, ... */ )
warning: ^
warning: webview_cocoa.c:179:16: error: too many arguments to function call, expected 0, have 3
warning:   objc_msgSend(savePanel, sel_registerName("setNameFieldStringValue:"),
warning:   ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
warning: objc_msgSend(void /* id self, SEL op, ... */ )
warning: ^
warning: webview_cocoa.c:184:42: error: too many arguments to function call, expected 0, have 2
warning:                    id url = objc_msgSend(savePanel, sel_registerName("URL"));
warning:                             ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
warning: objc_msgSend(void /* id self, SEL op, ... */ )
warning: ^
warning: webview_cocoa.c:185:43: error: too many arguments to function call, expected 0, have 2
warning:                    id path = objc_msgSend(url, sel_registerName("path"));
warning:                              ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
warning: objc_msgSend(void /* id self, SEL op, ... */ )
warning: ^
warning: webview_cocoa.c:181:16: error: too many arguments to function call, expected 0, have 3
warning:   objc_msgSend(savePanel, sel_registerName("beginWithCompletionHandler:"),
warning:   ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
warning: objc_msgSend(void /* id self, SEL op, ... */ )
warning: ^
warning: fatal error: too many errors emitted, stopping now [-ferror-limit=]
warning: 20 errors generated.

error: failed to run custom build command for `webview-sys v0.6.1 (https://github.com/Boscop/web-view?rev=1c20b92#1c20b925)`

Caused by:
  process didn't exit successfully: `/Users/acs/foss/webview_deno/target/release/build/webview-sys-1807b0e9190e333e/build-script-build` (exit code: 1)
  --- stdout
  cargo:rustc-link-lib=framework=Cocoa
  cargo:rustc-link-lib=framework=WebKit
  TARGET = Some("aarch64-apple-darwin")
  OPT_LEVEL = Some("3")
  HOST = Some("aarch64-apple-darwin")
  CC_aarch64-apple-darwin = None
  CC_aarch64_apple_darwin = None
  HOST_CC = None
  CC = None
  CFLAGS_aarch64-apple-darwin = None
  CFLAGS_aarch64_apple_darwin = None
  HOST_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  CARGO_CFG_TARGET_FEATURE = None
  CC_aarch64-apple-darwin = None
  CC_aarch64_apple_darwin = None
  HOST_CC = None
  CC = None
  CFLAGS_aarch64-apple-darwin = None
  CFLAGS_aarch64_apple_darwin = None
  HOST_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = None
  CC_aarch64-apple-darwin = None
  CC_aarch64_apple_darwin = None
  HOST_CC = None
  CC = None
  CFLAGS_aarch64-apple-darwin = None
  CFLAGS_aarch64_apple_darwin = None
  HOST_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = None
  running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-arch" "arm64" "-I" "webview.h" "-Wall" "-Wextra" "-x" "objective-c" "-std=c11" "-w" "-DDEBUG" "-DOBJC_OLD_DISPATCH_PROTOTYPES=1" "-o" "/Users/acs/foss/webview_deno/target/release/build/webview-sys-6dd0612f15102572/out/webview_cocoa.o" "-c" "webview_cocoa.c"
  cargo:warning=webview_cocoa.c:89:23: error: too many arguments to function call, expected 0, have 3
  cargo:warning=  return objc_msgSend((id)objc_getClass("NSString"),
  cargo:warning=         ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
  cargo:warning=objc_msgSend(void /* id self, SEL op, ... */ )
  cargo:warning=^
  cargo:warning=webview_cocoa.c:95:20: error: too many arguments to function call, expected 0, have 2
  cargo:warning=      objc_msgSend((id)objc_getClass("NSMenuItem"), sel_registerName("alloc"));
  cargo:warning=      ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
  cargo:warning=objc_msgSend(void /* id self, SEL op, ... */ )
  cargo:warning=^
  cargo:warning=webview_cocoa.c:96:16: error: too many arguments to function call, expected 0, have 5
  cargo:warning=  objc_msgSend(item, sel_registerName("initWithTitle:action:keyEquivalent:"),
  cargo:warning=  ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
  cargo:warning=objc_msgSend(void /* id self, SEL op, ... */ )
  cargo:warning=^
  cargo:warning=webview_cocoa.c:98:16: error: too many arguments to function call, expected 0, have 2
  cargo:warning=  objc_msgSend(item, sel_registerName("autorelease"));
  cargo:warning=  ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
  cargo:warning=objc_msgSend(void /* id self, SEL op, ... */ )
  cargo:warning=^
  cargo:warning=webview_cocoa.c:119:27: error: too many arguments to function call, expected 0, have 11
  cargo:warning=  id event = objc_msgSend((id)objc_getClass("NSEvent"),
  cargo:warning=             ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
  cargo:warning=objc_msgSend(void /* id self, SEL op, ... */ )
  cargo:warning=^
  cargo:warning=webview_cocoa.c:124:25: error: too many arguments to function call, expected 0, have 2
  cargo:warning=  id app = objc_msgSend((id)objc_getClass("NSApplication"),
  cargo:warning=           ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
  cargo:warning=objc_msgSend(void /* id self, SEL op, ... */ )
  cargo:warning=^
  cargo:warning=webview_cocoa.c:135:34: error: too many arguments to function call, expected 0, have 2
  cargo:warning=                    objc_msgSend((id)objc_getClass("NSDate"),
  cargo:warning=                    ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
  cargo:warning=objc_msgSend(void /* id self, SEL op, ... */ )
  cargo:warning=^
  cargo:warning=webview_cocoa.c:148:45: error: too many arguments to function call, expected 0, have 2
  cargo:warning=                               objc_msgSend(message, sel_registerName("body")),
  cargo:warning=                               ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
  cargo:warning=objc_msgSend(void /* id self, SEL op, ... */ )
  cargo:warning=^
  cargo:warning=webview_cocoa.c:155:31: error: too many arguments to function call, expected 0, have 2
  cargo:warning=  id openPanel = objc_msgSend((id)objc_getClass("NSOpenPanel"),
  cargo:warning=                 ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
  cargo:warning=objc_msgSend(void /* id self, SEL op, ... */ )
  cargo:warning=^
  cargo:warning=webview_cocoa.c:160:20: error: too many arguments to function call, expected 0, have 2
  cargo:warning=      objc_msgSend(parameters, sel_registerName("allowsMultipleSelection")));
  cargo:warning=      ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
  cargo:warning=objc_msgSend(void /* id self, SEL op, ... */ )
  cargo:warning=^
  cargo:warning=webview_cocoa.c:162:16: error: too many arguments to function call, expected 0, have 3
  cargo:warning=  objc_msgSend(openPanel, sel_registerName("setCanChooseFiles:"), 1);
  cargo:warning=  ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
  cargo:warning=objc_msgSend(void /* id self, SEL op, ... */ )
  cargo:warning=^
  cargo:warning=webview_cocoa.c:166:42: error: too many arguments to function call, expected 0, have 2
  cargo:warning=          completionHandler(objc_msgSend(openPanel, sel_registerName("URLs")));
  cargo:warning=                            ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
  cargo:warning=objc_msgSend(void /* id self, SEL op, ... */ )
  cargo:warning=^
  cargo:warning=webview_cocoa.c:164:7: error: too many arguments to function call, expected 0, have 3
  cargo:warning=      openPanel, sel_registerName("beginWithCompletionHandler:"), ^(id result) {
  cargo:warning=      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
  cargo:warning=objc_msgSend(void /* id self, SEL op, ... */ )
  cargo:warning=^
  cargo:warning=webview_cocoa.c:176:31: error: too many arguments to function call, expected 0, have 2
  cargo:warning=  id savePanel = objc_msgSend((id)objc_getClass("NSSavePanel"),
  cargo:warning=                 ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
  cargo:warning=objc_msgSend(void /* id self, SEL op, ... */ )
  cargo:warning=^
  cargo:warning=webview_cocoa.c:178:16: error: too many arguments to function call, expected 0, have 3
  cargo:warning=  objc_msgSend(savePanel, sel_registerName("setCanCreateDirectories:"), 1);
  cargo:warning=  ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
  cargo:warning=objc_msgSend(void /* id self, SEL op, ... */ )
  cargo:warning=^
  cargo:warning=webview_cocoa.c:179:16: error: too many arguments to function call, expected 0, have 3
  cargo:warning=  objc_msgSend(savePanel, sel_registerName("setNameFieldStringValue:"),
  cargo:warning=  ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
  cargo:warning=objc_msgSend(void /* id self, SEL op, ... */ )
  cargo:warning=^
  cargo:warning=webview_cocoa.c:184:42: error: too many arguments to function call, expected 0, have 2
  cargo:warning=                   id url = objc_msgSend(savePanel, sel_registerName("URL"));
  cargo:warning=                            ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
  cargo:warning=objc_msgSend(void /* id self, SEL op, ... */ )
  cargo:warning=^
  cargo:warning=webview_cocoa.c:185:43: error: too many arguments to function call, expected 0, have 2
  cargo:warning=                   id path = objc_msgSend(url, sel_registerName("path"));
  cargo:warning=                             ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
  cargo:warning=objc_msgSend(void /* id self, SEL op, ... */ )
  cargo:warning=^
  cargo:warning=webview_cocoa.c:181:16: error: too many arguments to function call, expected 0, have 3
  cargo:warning=  objc_msgSend(savePanel, sel_registerName("beginWithCompletionHandler:"),
  cargo:warning=  ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:63:1: note: 'objc_msgSend' declared here
  cargo:warning=objc_msgSend(void /* id self, SEL op, ... */ )
  cargo:warning=^
  cargo:warning=fatal error: too many errors emitted, stopping now [-ferror-limit=]
  cargo:warning=20 errors generated.
  exit code: 1

  --- stderr


  error occurred: Command "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-arch" "arm64" "-I" "webview.h" "-Wall" "-Wextra" "-x" "objective-c" "-std=c11" "-w" "-DDEBUG" "-DOBJC_OLD_DISPATCH_PROTOTYPES=1" "-o" "/Users/acs/foss/webview_deno/target/release/build/webview-sys-6dd0612f15102572/out/webview_cocoa.o" "-c" "webview_cocoa.c" with args "cc" did not execute successfully (status code exit code: 1).


warning: build failed, waiting for other jobs to finish...
error: build failed
building rust failed

@eliassjogreen
Copy link
Member

This is because we currently only build x86_64 binaries for osx, linux and windows due to deno only building them. It doesn't seem like our webview library supports arm either so that is a blocker. If we ever switch to webview_rust this might get solved but currently due to windows we cannot switch as that would require us to download even more dependecies for it to work...

@ematta
Copy link

ematta commented Jul 27, 2021

I'm using0.6.0-pre.0 and I am getting a new and weird error.

Deno Version:

⚡  deno --version
deno 1.12.1 (release, aarch64-apple-darwin)
v8 9.2.230.14
typescript 4.3.5

Test code

import { Webview } from "https://deno.land/x/[email protected]/mod.ts";

const webview = new Webview();
webview.navigate(`https://google.com`);
await webview.run();
Download https://github.com/webview/webview_deno/releases/download/0.6.0-pre.0/libwebview_deno.dylib
error: Uncaught (in promise) CacheError: Not Found
    throw new CacheError(download.statusText);
          ^
    at protocolHttp (https://deno.land/x/[email protected]/file_fetcher.ts:23:11)
    at async fetchFile (https://deno.land/x/[email protected]/file_fetcher.ts:45:14)
    at async FileWrapper.fetch (https://deno.land/x/[email protected]/file.ts:95:18)
    at async FileWrapper.get (https://deno.land/x/[email protected]/file.ts:113:12)
    at async cache (https://deno.land/x/[email protected]/cache.ts:67:10)
    at async Wrapper.cache (https://deno.land/x/[email protected]/cache.ts:21:12)
    at async Module.prepare (https://deno.land/x/[email protected]/plug.ts:81:16)
    at async https://deno.land/x/[email protected]/plugin.ts:10:1

Also, all the examples seem to be broken.

@eliassjogreen
Copy link
Member

@ematta 0.6.0-pre.0 only works on deno 1.10 on windows x86_64 and not very good. It is adviced to use deno 1.8 and webview_deno 0.5.6 as it is the latest supported release due to the deno plugin rework.

@brandonros
Copy link

brandonros commented Jan 27, 2022

@eliassjogreen we might need to revisit this.

error: Uncaught (in promise) Error: Could not open library: Could not open library: dlopen(/Users/brandonros/Library/Caches/deno/plug/https/github.com/e727a75591482a674a4e1cecc043466d52bcf633b5f09747ff7ad3394ffc4f0f.dylib, 0x0005): tried: '/Users/brandonros/Library/Caches/deno/plug/https/github.com/e727a75591482a674a4e1cecc043466d52bcf633b5f09747ff7ad3394ffc4f0f.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/local/lib/e727a75591482a674a4e1cecc043466d52bcf633b5f09747ff7ad3394ffc4f0f.dylib' (no such file), '/usr/lib/e727a75591482a674a4e1cecc043466d52bcf633b5f09747ff7ad3394ffc4f0f.dylib' (no such file)
  return Deno.dlopen(file, symbols);
              ^
    at Object.opSync (deno:core/01_core.js:149:12)
    at new DynamicLibrary (deno:ext/ffi/00_ffi.js:228:24)
    at Object.dlopen (deno:ext/ffi/00_ffi.js:278:12)
    at prepare (https://deno.land/x/[email protected]/plug.ts:106:15)
    at async https://raw.githubusercontent.com/webview/webview_deno/main/src/ffi.ts:25:13

@eliassjogreen
Copy link
Member

This is because the dylib which is built for mac is only built for (and on) x86_64 hardware, there will need to be some small changes to plug to support aarch64 and then the CI will need to be updated for this repo

@eliassjogreen eliassjogreen added bug Something isn't working and removed enhancement New feature or request labels Jan 27, 2022
@Snider
Copy link

Snider commented Mar 22, 2022

I got this working locally, fairly easy.

  1. fork project
  2. adjust src/ffi.ts https://github.com/Snider/webview_deno/commit/39fe42966560940e44edffc797b42264eaf9220e *
  3. build on your fork
  4. build locally cargo build --release
  5. edit the file name to libwebview_deno.aarch64.dylib
  6. upload to a release on your fork, edit the other assets built by GH Actions with .x86_64 e.g: libwebview_deno.x86_64.dylib

If the GH action starts adding the arch to the filename and the above commit is added you have x86_64 & aarch64 sorted.

@rotu
Copy link

rotu commented Jun 24, 2022

@Snider Could you please submit this as a PR?

@Snider
Copy link

Snider commented Jun 24, 2022

@Snider Could you please submit this as a PR?

Sure.

@eliassjogreen
Copy link
Member

There now is code support for aarch64 on mac but problem is the lack of support when it comes to github runners meaning we can't build a binary... I don't have an m1 mac either so me manually building is not an option sadly

@Snider
Copy link

Snider commented Jun 25, 2022

There now is code support for aarch64 on mac but problem is the lack of support when it comes to github runners meaning we can't build a binary... I don't have an m1 mac either so me manually building is not an option sadly

I only have an m1 atm, but GitHub runners can do it, PR works for me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working macos Related to macOS
Development

Successfully merging a pull request may close this issue.

9 participants