Comments (13)
Good catch!
@ananthdurai - you may also be able to install via brew and get the native arm64 build of Go using:
arch -arm64 brew install go
from extism.
@nilslice yes, that is the issue. I installed the ARM64 version of Go, and everything is working fine now. Thank you.
from extism.
Could you check the type of the dylib file? it should be arm64. Run this command:
> file /usr/local/lib/libextism.dylib
/usr/local/lib/libextism.dylib: Mach-O 64-bit dynamically linked shared library arm64
It looks to me like your go program is for some reason trying to compile to x86, but let's make sure the dylib is right.
building for macOS-x86_64
Is the suspicious part to me
from extism.
Also please make sure your go is an arm64 version:
> go version
go version go1.19.2 darwin/arm64
from extism.
Ya I think you may be running a Go toolchain that was built for x86, but extism installed the native arm64 release since you're on a M1.
This line in your error caught my eye:
ld: symbol(s) not found for architecture x86_64
Did you install Go via brew?
from extism.
That's my suspicion too. If that's the case you will want to uninstall go (instructions depend on how you installed it) then install it again but explicitly use the arm version. I think the easiest way to do that is to get the pkg from: https://go.dev/dl/
The one labeled Apple macOS (ARM64)
from extism.
I tried to uninstall Go and install it back,
>go version ✘ 2 go version go1.19.3 darwin/amd64
>file /usr/local/lib/libextism.dylib
/usr/local/lib/libextism.dylib: Mach-O 64-bit dynamically linked shared library arm64
Both seem arm64, trying to debug further to see if I can find any insights.
from extism.
From the error,
ignoring file /usr/local/lib/libextism.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
GoLang Extism C lib compiled for macOS-x86_64
, but the machine has the macOS-arm64
. I suppose some issue with Extism Go dependency. Perhaps it requires compilation for M1 as a target?
I'm on 13.0.1 (22A400)
MacOs version.
from extism.
extism install latest
should have downloaded an arm64 build based on detecting your system. But, you could download a release directly for your architecture and replace these files:
/usr/local/lib/libextism.dylib
/usr/local/include/extism.h
Release url: https://github.com/extism/extism/releases/download/v0.1.0/libextism-aarch64-apple-darwin-v0.1.0.tar.gz
from extism.
@nilslice i don't think that's it. His dylib file is correct. He's on an M1 and it's an arm binary. His Go install is still x86
go version ✘ 2 go version go1.19.3 darwin/amd64
Both seem arm64, trying to debug further to see if I can find any insights.
@ananthdurai darwin/amd64
is x86 not arm
How are you installing Go? if you are using homebrew it might be installing the x86 version. I suggest uninstalling Go and installing via the instructions I listed above. Directly from the pkg from go.
from extism.
GoLang Extism C lib compiled for macOS-x86_64, but the machine has the macOS-arm64. I suppose some issue with Extism Go dependency. Perhaps it requires compilation for M1 as a target?
@ananthdurai I believe the reason is that you have x86 version of go. Your M1 can run both binaries so it's not a problem until it needs to compile something. But now that it needs cgo
it's expecting it to be x86 code. It's not the extism dependency i don't think.
from extism.
Hi @ananthdurai - just wanted to check in and see if you were able to get this resolved?
from extism.
Excellent, glad to hear that! Going to close the issue now, but please feel free to reopen if the issue reemerges.
from extism.
Related Issues (20)
- runtime: update `Plugin::function_extists` and `extism_plugin_function_exists` to check the type of the functions too HOT 4
- derive that forwards From/ToBytes to specific encoding HOT 4
- runtime: wasi preview2 HOT 10
- How do I silence debug logs in the extism crate? HOT 1
- discord link in readme is expired HOT 6
- Add support for multiple arguments
- Pass plug-in ID into `set_log_callback` callback function
- Error: http: request body too large (recovered by wazero) HOT 5
- option for a WASM instr limit per call HOT 1
- look into calling `_initialize` on all linked plugins when initializing the guest runtime, not just the main module HOT 1
- Question about plugin return types HOT 3
- Direct disk/filesystem access HOT 4
- Cost of the function call throught host/guest boundary HOT 8
- Synchronizing the content of `wasm` folder HOT 2
- feat: add manifest field to limit the size of Extism vars HOT 1
- Extism gem fails to load on Ruby 3.3.0 on macOS HOT 6
- Async / Await / Generators / Coroutines in Plugins HOT 3
- How to unload a plugin? HOT 3
- Could we get access to the `id` on `CurrentPlugin`
- add a feature to control which wasm backend is enabled? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from extism.