Skip to content

Error when building for native_sim or native_sim/64 #206

@javad123javad

Description

@javad123javad

Please provide information requested in the template below as much as possible.

Describe the bug

Hi,

When builing for native_sim platform the following error is reported

zephyrproject/ocre-runtime/wasm-micro-runtime/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c: In function ‘wasmtime_ssp_poll_oneoff’:
/home/javad/workspace/Mind/MindOS/OCRE/zephyrproject/ocre-runtime/wasm-micro-runtime/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c:2220:42: error: initialization of ‘os_file_handle’ {aka ‘struct zephyr_handle *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 2220 |                     os_file_handle tfd = fos[i]->file_handle->fd;
      |                                          ^~~
/home/javad/workspace/Mind/MindOS/OCRE/zephyrproject/ocre-runtime/wasm-micro-runtime/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c:2226:31: error: initialization of ‘int’ from ‘os_file_handle’ {aka ‘struct zephyr_handle *’} makes integer from pointer without a cast [-Wint-conversion]
 2226 |                         .fd = tfd,
      |                               ^~~
zephyrproject/ocre-runtime/wasm-micro-runtime/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c:2226:31: note: (near initialization for ‘(anonymous).fd’)

How to reproduce

The build command is:

west build -p always -b native_sim ocre-runtime/src/samples/mini/zephyr

and

west build -p always -b native_sim/native/64 ocre-runtime/src/samples/mini/zephyr

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions