Stream: git-wasmtime

Topic: wasmtime / issue #9382 not all headers are installed for ...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 06 2024 at 11:12):

ognevny opened issue #9382:

when built with MSYS2 toolchain, wasmtime/conf.h isn't installed, and (for example) tree-sitter compilation fails with

In file included from C:/msys64/clang64/include/wasmtime.h:182:
C:/msys64/clang64/include/wasi.h:12:10: fatal error: 'wasmtime/conf.h' file not found
   12 | #include <wasmtime/conf.h>
      |          ^~~~~~~~~~~~~~~~~

view this post on Zulip Wasmtime GitHub notifications bot (Oct 06 2024 at 20:30):

alexcrichton commented on issue #9382:

Thanks for the report! The installation of the C API changed a few versions ago in Wasmtime to use cmake to install, and cmake should install the conf.h header file. If it's missing here then that means whatever is managing the C API probably isn't pulling in the latest version one way or another. There's been a few other PRs/issues for tree-sitter using a Rust dependency on the C API and getting that working too.

If you're interested in primarily packaging tree-sitter this might be a better issue to raise with them? They might be more familiar with the build system and packaging of tree sitter.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 22 2024 at 15:29):

ognevny commented on issue #9382:

I forgot to answer, but cmake doesn't install conf.h this just can't be issue from tree-sitter's side

view this post on Zulip Wasmtime GitHub notifications bot (Oct 22 2024 at 19:34):

alexcrichton commented on issue #9382:

Would you be able to provide some steps for reproduction?

view this post on Zulip Wasmtime GitHub notifications bot (Oct 23 2024 at 03:44):

ognevny commented on issue #9382:

download msys2
run makepkg-mingw -s for recipe

view this post on Zulip Wasmtime GitHub notifications bot (Oct 23 2024 at 03:53):

ognevny commented on issue #9382:

but without the line, that install conf.h _manually_

view this post on Zulip Wasmtime GitHub notifications bot (Oct 23 2024 at 03:54):

ognevny edited a comment on issue #9382:

but without the line, that install conf.h _manually_ (https://github.com/msys2/MINGW-packages/blob/cb29d91491e2e202d66e0ffc5a1ff2ed068e8622/mingw-w64-wasmtime/PKGBUILD#L118)

view this post on Zulip Wasmtime GitHub notifications bot (Oct 23 2024 at 03:55):

ognevny edited a comment on issue #9382:

download msys2
run makepkg-mingw -s for recipe

view this post on Zulip Wasmtime GitHub notifications bot (Oct 23 2024 at 16:25):

alexcrichton commented on issue #9382:

I ran these commands:

$ cmake -G Ninja -DCMAKE_INSTALL_PREFIX=`pwd`/target/c-api-install -DBUILD_SHARED_LIBS=OFF -S ./crates/c-api -B target/build-static
$ cmake --build target/build-static
$ DESTDIR=./target/c-api-install2 cmake --install target/build-static

to model what that script is doing

The --install step shows:

...
-- Installing: /home/alex/code/wasmtime/target/c-api-install/include/wasmtime/conf.h
-- Up-to-date: ./target/c-api-install2/home/alex/code/wasmtime/target/c-api-install/include
-- Installing: ./target/c-api-install2/home/alex/code/wasmtime/target/c-api-install/include/wasi.h
...

which shows that the conf.h is being installed, just to the wrong spot.

I think this has to do with the combination of DESTDIR and -DCMAKE_INSTALL_PREFIX and those being different. I fear though that I'm not knowledgable enough with CMake to know how best to solve this.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 23 2024 at 16:31):

ognevny commented on issue #9382:

I wonder can you switch to meson?


Last updated: Dec 23 2024 at 12:05 UTC