-
Notifications
You must be signed in to change notification settings - Fork 106
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
Build system support for .so on GNU Linux for both x86_64 and aarch64 #303
Comments
In #305 the same is done for the musl librarues. Maybe this helps for orientation as well. Point 5. is not implemented though. However, the .a file needs to be copied separately anyways. |
I was able to find an official release of a gcc cross compiler, but I was unable to find any official glibc rpms for cross compiling. I am attempting to build gcc and glibc for cross compiling from source, but if someone has a better idea please let me know. |
Switch compiler? Clang should be around and work well. |
Could you post your error message? I guess this is about the C build of handlers.c via build.rs when wasmer-vm is compiled. This part requires a C cross compiler. |
I've been spinning in circles quite a bit, but that is exactly where it is failing now. I currently have clang set as my compiler, and I'm getting the following error.
I can install glibc-devel.i686, but I don't think that's correct. I tried installing the only glibc-aarch64 rpms I could find which are: |
I was able to resolve most of the issues by setting the linker in cargo-config and installing the following dependencies...
However, I am missing libgcc_s.so. I'm not sure why these packages don't have it, but the linker needs it. The last thing I can really think of is building gcc from source.
|
In https://github.com/CosmWasm/wasmvm#builds-of-libwasmvm you see that libwasmvm.so (x64_64) and libwasmvm.aarch64.so are supposed to be built. But we do not yet have the build system for it. One builder image (the CentOS one) can build both of them. This makes it easy to integrate both builds in the CI.
What needs to be done is
x86_64-unknown-linux-gnu
andaarch64-unknown-linux-gnu
(as we did for Mac)cargo build
s with explicit--target
tobuild_linux.sh
(as we did for Mac here and here)target/{x86_64,aarch64}-unknown-linux-gnu/release/…
and write them in theartifacts
folderapi/
folderapi/link_std.go
that links thelibwasmvm.aarch64.so
which has a different name than the x86_64 library.(optional) Once 1-5 works nicely, the builder image can be built for ARM64 as well in order to get better build performance on M1 machines.It seems like Cent OS 7 is available on x86 and x86_64 only. So we need Intel builders to create those libraries.The text was updated successfully, but these errors were encountered: