wasmtime-cpp icon indicating copy to clipboard operation
wasmtime-cpp copied to clipboard

error: invalid conversion from 'int32_t*' {aka 'long int*'} to 'int*'

Open TheMode opened this issue 11 months ago • 1 comments

Trying to compile for the n3ds using the devkitpro toolchain result in the following error/warning

/Users/themode/CLionProjects/Project/build/_deps/wasmtime-cpp-src/include/wasmtime.hh: In member function 'std::optional<long int> wasmtime::Error::i32_exit() const':
/Users/themode/CLionProjects/Project/build/_deps/wasmtime-cpp-src/include/wasmtime.hh:169:47: error: invalid conversion from 'int32_t*' {aka 'long int*'} to 'int*' [-fpermissive]
  169 |     if (wasmtime_error_exit_status(ptr.get(), &status)) {
      |                                               ^~~~~~~
      |                                               |
      |                                               int32_t* {aka long int*}
In file included from /Users/themode/CLionProjects/Project/build/include/wasmtime/config.h:12,
                 from /Users/themode/CLionProjects/Project/build/include/wasmtime.h:186,
                 from /Users/themode/CLionProjects/Project/build/_deps/wasmtime-cpp-src/include/wasmtime.hh:52:
/Users/themode/CLionProjects/Project/build/include/wasmtime/error.h:62:54: note:   initializing argument 2 of 'bool wasmtime_error_exit_status(const wasmtime_error_t*, int*)'
   62 |                                                 int *status);

TheMode avatar Feb 26 '25 12:02 TheMode

Thanks for the report! Would you be up for sending a PR to fix this? I'm not sure how to compile for that target myself so I wouldn't know how to verify a fix.

alexcrichton avatar Feb 26 '25 19:02 alexcrichton

I'm going to close this as this repository has now migrated into the wasmtime repository itself -- https://github.com/bytecodealliance/wasmtime/pull/10582

alexcrichton avatar Apr 16 '25 19:04 alexcrichton