Open denniswon opened 1 month ago
Hi 👋 - thanks for the report.
To summarise:
wasm-ld
and a WASM compatible clang are only required if you want to use Juvix's WASM target. This is not necessary if you want to compile Anoma applications.juvix doctor
warning if you have installed wasm-ld
yourself. But note that the active version of clang
should match the active version of wasm-ld
. wasm-ld
using brew by installing the lld
package: brew install lld
.What follows is a more detailed description of what we need to fix.
wasm-ld
is no longer present in the homebrew llvm
packagewasm-ld
was removed from the llvm
package in the latest version (version 19).
$ brew ls -v llvm@18 | grep wasm-ld
/opt/homebrew/Cellar/llvm@18/18.1.8/bin/wasm-ld
$ brew ls -v llvm | grep wasm-ld
wasm-ld
is installed by the lld
homebrew package.
$ brew ls -v lld | grep wasm-ld
/opt/homebrew/Cellar/lld/19.1.0/bin/wasm-ld
wasm-ld
using the lld
homebrew package.juvix doctor
diagnosis is misleadingWe require that the doctor checks that:
wasm-ld
is available on the user's PATHwasm-ld
is compatible with the version of clang
on the user's PATHWe currently do this by checking that wasm-ld
exists in the llvm
distribution.
For macOS the implemented check does not cover the two requirements.
juvix
doctor links are brokenFor example:
$ curl -s -o /dev/null -w "%{http_code}\n" https://docs.juvix.org/0.6.6/reference/tooling/doctor/#could-not-find-the-wasm-ld-command
404
Fix this as part of
The Juvix WASM backend was developed at a time when Anoma applications were represented as WASM code. This is no longer the case and so it's not important for Juvix users of Anoma to setup WASM tooling. The Juvix documentation and doctor make it seem like WASM setup is important.
Describe the bug
I am Apple M1 Pro (OS: macos sonoma) and I installed juvix. juvix itself installs fine but
juvix doctor
command is not being able to detect mywasm-ld
installed locally. (I do want to compile to WebAssembly)On Apple silicon macos machines, the brew installed llvm's
wasm-ld
linker does not seem to be detected by juvix doctor command. I also tried installing and building wasm-ld directly (https://lld.llvm.org/). But either way, wasm-ld is not detected by juvix doctor.Can anyone help me here? Not sure if this is the issue with the llvm setup on my local mac or the juvix doctor.
Desktop (please complete the following information):
To Reproduce Steps to reproduce the behavior: https://docs.juvix.org/0.6.3/howto/installing.html
Expected behavior
juvix doctor
to detect locally installedwasm-ld