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

Support for s390x/systemz #257

Closed
udai05 opened this issue Aug 24, 2021 · 4 comments
Closed

Support for s390x/systemz #257

udai05 opened this issue Aug 24, 2021 · 4 comments

Comments

@udai05
Copy link

udai05 commented Aug 24, 2021

Team,
I was wondering are we planning to add support for s390x platform soon.

@webmaster128
Copy link
Member

No, we are not. Our priorities right now are ARM and Windows. Both are blocked by support of the singlepass backend of Wasmer.

@udai05
Copy link
Author

udai05 commented Sep 13, 2021

Hi @webmaster128
Sorry for the late reply. I was trying to build wasmvm to see how much I can integrate wasmer to wasmvm.

"#make build-rust"...
...
   Compiling wasmvm v0.0.0 (/ossvg/udai/terra/wasmvm/libwasmvm)
error: unsupported platform
   --> /ossvg/udai/.cargo/registry/src/github.com-eae4ba8cbf2ce1c7/wasmer-vm-2.0.0/src/trap/traphandlers.rs:289:21
    |
289 |                     compile_error!("unsupported platform");
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
   --> /ossvg/udai/.cargo/registry/src/github.com-eae4ba8cbf2ce1c7/wasmer-vm-2.0.0/src/trap/traphandlers.rs:205:52
    |
205 |         unsafe fn get_pc(cx: *mut libc::c_void) -> *const u8 {
    |                   ------                           ^^^^^^^^^ expected *-ptr, found `()`
    |                   |
    |                   implicitly returns `()` as its body has no tail or `return` expression
    |
    = note: expected raw pointer `*const u8`
                 found unit type `()`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0308`.
error: could not compile `wasmer-vm`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
make: *** [Makefile:38: build-rust-release] Error 101..

Then I did a clone of wasmer. And after some changes I could get “make build-capi” completed.

Compiling wasmer-types v2.0.0 (/ossvg/udai/terra/wasmer/lib/types) Compiling addr2line v0.16.0 Compiling wasmer-wasi-types v2.0.0 (/ossvg/udai/terra/wasmer/lib/wasi-types) Compiling wasmer-c-api v2.0.0 (/ossvg/udai/terra/wasmer/lib/c-api) Compiling wasmer-compiler v2.0.0 (/ossvg/udai/terra/wasmer/lib/compiler) Compiling wasmer-engine v2.0.0 (/ossvg/udai/terra/wasmer/lib/engine) Compiling wasmer-object v2.0.0 (/ossvg/udai/terra/wasmer/lib/object) Compiling wasmer-engine-universal v2.0.0 (/ossvg/udai/terra/wasmer/lib/engine-universal) Compiling wasmer-engine-dylib v2.0.0 (/ossvg/udai/terra/wasmer/lib/engine-dylib) Compiling wasmer-engine-staticlib v2.0.0 (/ossvg/udai/terra/wasmer/lib/engine-staticlib) Compiling wasmer v2.0.0 (/ossvg/udai/terra/wasmer/lib/api) Compiling cranelift-frontend v0.76.0 Compiling wasmer-middlewares v2.0.0 (/ossvg/udai/terra/wasmer/lib/middlewares) Compiling wasmer-wasi v2.0.0 (/ossvg/udai/terra/wasmer/lib/wasi) Building [=======================> ] 211/213: cranelift-codegen Finished release [optimized] target(s) in 9m 29s udai@blkdom:~/terra/wasmer$

I need your help/directions to build "make build-wasmer". I am getting below error

warning: use of deprecated associated function `wasmer::WasmCell::<'a, T>::get_mut`: Please use the memory-safe set method instead
   --> lib/emscripten/src/env/unix/mod.rs:250:65
    |
250 |                 let mut pg = prev_guest.deref(&memory).unwrap().get_mut();
    |                                                                 ^^^^^^^
    |
    = note: `#[warn(deprecated)]` on by default

warning: use of deprecated associated function `wasmer::WasmCell::<'a, T>::get_mut`: Please use the memory-safe set method instead
   --> lib/emscripten/src/env/unix/mod.rs:262:81
    |
262 |                 let guest_sockaddr = guest_sockaddr_ptr.deref(&memory).unwrap().get_mut();
    |                                                                                 ^^^^^^^

warning: use of deprecated associated function `wasmer::WasmCell::<'a, T>::get_mut`: Please use the memory-safe set method instead
   --> lib/emscripten/src/env/unix/mod.rs:291:89
    |
291 |             let mut current_guest_node = current_guest_node_ptr.deref(&memory).unwrap().get_mut();
    |                                                                                         ^^^^^^^

warning: use of deprecated associated function `wasmer::WasmCell::<'a, T>::get_mut`: Please use the memory-safe set method instead
   --> lib/emscripten/src/syscalls/unix.rs:636:81
    |
636 |             let address_len_addr = unsafe { address_len.deref(&memory).unwrap().get_mut() };
    |                                                                                 ^^^^^^^

warning: use of deprecated associated function `wasmer::WasmCell::<'a, T>::get_mut`: Please use the memory-safe set method instead
   --> lib/emscripten/src/syscalls/unix.rs:646:73
    |
646 |             let address_addr = unsafe { address.deref(&memory).unwrap().get_mut() };
    |                                                                         ^^^^^^^

warning: use of deprecated associated function `wasmer::WasmCell::<'a, T>::get_mut`: Please use the memory-safe set method instead
   --> lib/emscripten/src/syscalls/unix.rs:670:81
    |
670 |             let address_len_addr = unsafe { address_len.deref(&memory).unwrap().get_mut() };
    |                                                                                 ^^^^^^^

warning: use of deprecated associated function `wasmer::WasmCell::<'a, T>::get_mut`: Please use the memory-safe set method instead
   --> lib/emscripten/src/syscalls/unix.rs:686:76
    |
686 |             let mut address_mut = unsafe { address.deref(&memory).unwrap().get_mut() };
    |                                                                            ^^^^^^^

warning: use of deprecated associated function `wasmer::WasmCell::<'a, T>::get_mut`: Please use the memory-safe set method instead
   --> lib/emscripten/src/syscalls/unix.rs:860:56
    |
860 |     let fds_mut = unsafe { fds.deref(&memory).unwrap().get_mut() };
    |                                                        ^^^^^^^

Sorry for the long reply as well.

@ethanfrey
Copy link
Member

ethanfrey commented Sep 13, 2021

@US-05 We do not maintain wasmer.
Please reach out to the kind folks behind https://GitHub.com/wasmerio/wasmer

We need singlepass support from any supported os. And as wasmer does not support Windows or MacOS/arm64 yet for singlepass (but does for another non-blockchain backend), we cannot use it. I don't think s390x/systemz is high on their priority list, but if this is really important for a large (non-hobby) project, you can offer to support them to add it.

@webmaster128
Copy link
Member

wasmerio/wasmer#2463 is where you can request support for that system. If for some reason we get it for free because singlepass v2 can be implemented without system-specific code, it should not be hard to make CosmWasm work with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants