ognevny opened issue #9382:
when built with MSYS2 toolchain,
wasmtime/conf.h
isn't installed, and (for example) tree-sitter compilation fails withIn 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> | ^~~~~~~~~~~~~~~~~
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 theconf.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.
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
alexcrichton commented on issue #9382:
Would you be able to provide some steps for reproduction?
ognevny commented on issue #9382:
download msys2
runmakepkg-mingw -s
for recipe
ognevny commented on issue #9382:
but without the line, that install conf.h _manually_
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)
ognevny edited a comment on issue #9382:
download msys2
runmakepkg-mingw -s
for recipe
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.
ognevny commented on issue #9382:
I wonder can you switch to meson?
Last updated: Nov 22 2024 at 16:03 UTC