Stream: git-wasmtime

Topic: wasmtime / issue #11117 Failed to build `examples/hello.c...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2025 at 04:29):

yomaytk opened issue #11117:

Hello! I tried to build examples/hello.c with the spcified command, but I got an error as follows.

crates/c-api/include/wasi.h:12:10: fatal error: wasmtime/conf.h: No such file or directory
   12 | #include <wasmtime/conf.h>
      |          ^~~~~~~~~~~~~~~~~

We need to include many header files under crates/c-api/include/ when building it. However, conf.h is built by cmake from conf.h.in, so I got an error when I try to build with the specified command.

To fix this, I fix the command to add the cmake build command before cc build command on my fork repository(https://github.com/yomaytk/wasmtime/commit/f85cba9e517e935e6810d23fb51aed71a430a8c8).

I would appreciate any feedback or comments.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2025 at 05:11):

yomaytk edited issue #11117:

Hello! I tried to build examples/hello.c with the spcified command, but I got an error as follows.

crates/c-api/include/wasi.h:12:10: fatal error: wasmtime/conf.h: No such file or directory
   12 | #include <wasmtime/conf.h>
      |          ^~~~~~~~~~~~~~~~~

We need to include many header files under crates/c-api/include/ when building it. However, conf.h is built by cmake from conf.h.in, so I got an error when I try to build with the specified command.

To fix this, I fix the command to add the cmake build command before cc build command on my fork repository(https://github.com/yomaytk/wasmtime/commit/f85cba9e517e935e6810d23fb51aed71a430a8c8). I will fix the command for other sample C or C++ program if this fix is good.

I would appreciate any feedback or comments.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2025 at 14:41):

alexcrichton commented on issue #11117:

Ah yes the comments in the examples do indeed need to be updated. If you'd like to PR a fix that'd be most welcome!

view this post on Zulip Wasmtime GitHub notifications bot (Jun 26 2025 at 01:22):

yomaytk closed issue #11117:

Hello! I tried to build examples/hello.c with the spcified command, but I got an error as follows.

crates/c-api/include/wasi.h:12:10: fatal error: wasmtime/conf.h: No such file or directory
   12 | #include <wasmtime/conf.h>
      |          ^~~~~~~~~~~~~~~~~

We need to include many header files under crates/c-api/include/ when building it. However, conf.h is built by cmake from conf.h.in, so I got an error when I try to build with the specified command.

To fix this, I fix the command to add the cmake build command before cc build command on my fork repository(https://github.com/yomaytk/wasmtime/commit/f85cba9e517e935e6810d23fb51aed71a430a8c8). I will fix the command for other sample C or C++ program if this fix is good.

I would appreciate any feedback or comments.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 26 2025 at 01:22):

yomaytk commented on issue #11117:

I will close this issue because https://github.com/bytecodealliance/wasmtime/pull/11132 resolved this. Thanks!


Last updated: Dec 06 2025 at 07:03 UTC