You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey folks, I'm trying build binaries (for multiple architectures) in a project that uses v8go and not having much luck. I haven't compiled projects with CGO enabled before, so it's possible that there are important gaps in my understanding.
Everything builds fine for my own architecture (Darwin arm64) but as soon as I try to build for another architecture or OS, I start seeing C compiler errors/warnings (usually about JSError, although not sure that's relevant).
In theory, should it be possible for me to build my project for, say Intel Macs, or Linux/arm, on this machine? I'm assuming that cross compilation is going to be limited to the vendored builds of V8 in the deps folder, but do I also need to be building on the targeted OS/architecture too?
A rough rundown of how to tackle this kind of cross compilation would be great. Thanks for the project!
The text was updated successfully, but these errors were encountered:
v8go has a dependency on your system's libc. When you compile for your own architecture, your machine's libc gets bundled in. When you compile for a different architecture, it doesn't have the other architecture's libc (and can't use your architecture's), so it won't work.
The way we get around this is by having all the different architectures as remote servers that a build script builds on.
Hey folks, I'm trying build binaries (for multiple architectures) in a project that uses v8go and not having much luck. I haven't compiled projects with CGO enabled before, so it's possible that there are important gaps in my understanding.
Everything builds fine for my own architecture (Darwin arm64) but as soon as I try to build for another architecture or OS, I start seeing C compiler errors/warnings (usually about JSError, although not sure that's relevant).
In theory, should it be possible for me to build my project for, say Intel Macs, or Linux/arm, on this machine? I'm assuming that cross compilation is going to be limited to the vendored builds of V8 in the
deps
folder, but do I also need to be building on the targeted OS/architecture too?A rough rundown of how to tackle this kind of cross compilation would be great. Thanks for the project!
The text was updated successfully, but these errors were encountered: