Stream: wasi

Topic: wasi-sdk installation from .deb


view this post on Zulip Ralph (Mar 05 2024 at 16:34):

This is a quick question: the wasi-sdk-21.0.deb seems to install in /opt/wasi-sdk/ now whilst earlier it installed elsewhere -- or projects did so themselves. Is this the expected location going forward?

view this post on Zulip Ralph (Mar 05 2024 at 16:34):

dpkg -L wasi-sdk | more
/.
/opt
/opt/wasi-sdk
/opt/wasi-sdk/bin
/opt/wasi-sdk/bin/clang-17
/opt/wasi-sdk/bin/clang-apply-replacements
/opt/wasi-sdk/bin/clang-format
/opt/wasi-sdk/bin/clang-tidy
/opt/wasi-sdk/bin/git-clang-format
/opt/wasi-sdk/bin/lld
/opt/wasi-sdk/bin/llvm-ar
/opt/wasi-sdk/bin/llvm-cxxfilt
/opt/wasi-sdk/bin/llvm-dwarfdump
/opt/wasi-sdk/bin/llvm-mc
/opt/wasi-sdk/bin/llvm-nm
/opt/wasi-sdk/bin/llvm-objcopy
/opt/wasi-sdk/bin/llvm-objdump
/opt/wasi-sdk/bin/llvm-size
/opt/wasi-sdk/bin/llvm-strings
/opt/wasi-sdk/bin/run-clang-tidy

view this post on Zulip Ralph (Mar 05 2024 at 16:34):

I just want to know how/if I should rejigger this in several repos more consistently to which I'm contributing....

view this post on Zulip bjorn3 (Mar 05 2024 at 16:52):

It has been in this place since the beginning: https://github.com/WebAssembly/wasi-sdk/commit/c80964d8d7cf8ca2480d8332cd8022cb0600d421#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52R5

largely based on yury's wasmception

view this post on Zulip Chris Fallin (Mar 05 2024 at 16:55):

I know I've definitely written janky "temporary" makefiles that assume this path too. I do wonder whether there's any push to rename in a more conventional cross-compiler way with binary names prefixed by a triple, e.g. wasm32-wasi-cc, wasm32-wasi-ld, etc? Then one wouldn't need to hardcode or look for a path with a name clang that shadows a likely existing binary (cc @Dan Gohman )

view this post on Zulip Ralph (Mar 05 2024 at 16:56):

GREAT! I've gone through so many different repos that do a manual installation that I think when I actually found out there was a deb I went through the moon. But now the older repos do not have the common install using the .deb.

view this post on Zulip Ralph (Mar 05 2024 at 16:57):

Here's an example repo I'm going through and using for fun and kicks that does the manual version: https://github.com/dev-wasm/dev-wasm-feature/blob/2a1dcb74fcb9c0c7d7ab708a6f7317db4f4cc642/src/wasmtime-wasi/install.sh#L9-L33.

view this post on Zulip Ralph (Mar 05 2024 at 16:57):

I see a LOT of that kind of thing.

view this post on Zulip Ralph (Mar 05 2024 at 16:58):

so I was wondering what was the best path to migrate toward something standard.....

view this post on Zulip Ralph (Mar 05 2024 at 17:04):

Chris Fallin said:

I know I've definitely written janky "temporary" makefiles that assume this path too. I do wonder whether there's any push to rename in a more conventional cross-compiler way with binary names prefixed by a triple, e.g. wasm32-wasi-cc, wasm32-wasi-ld, etc? Then one wouldn't need to hardcode or look for a path with a name clang that shadows a likely existing binary (cc Dan Gohman )

squillace@dellsquill:~$ clang --version
Ubuntu clang version 14.0.0-1ubuntu1.1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
squillace@dellsquill:~$ /opt/wasi-sdk/bin/clang --version
clang version 17.0.6
Target: wasm32-unknown-wasi
Thread model: posix
InstalledDir: /opt/wasi-sdk/bin

view this post on Zulip Ralph (Mar 05 2024 at 17:05):

to be clear, not a critical issue. But as we move forward, I'd love to start hammering out repos I can contribute to.....

view this post on Zulip Dan Gohman (Mar 05 2024 at 18:29):

See also https://github.com/WebAssembly/wasi-sdk/pull/388 which is discussing target-prefixed binaries.

Currently the bin directory installed by wasi-sdk is not currently suitable for putting in $PATH in all cases because it can shadow a system-installed clang executable which is intended for native ...

view this post on Zulip Dan Gohman (Mar 05 2024 at 18:29):

I didn't think target-prefixed binaries was a thing that clang did until now, but it appears they are, so maybe we should do that.


Last updated: Nov 22 2024 at 17:03 UTC