Solved: wasm-ld was not found on your system #151

Closed
opened 2023-09-30 21:07:25 +00:00 by SethArchambault · 0 comments

I successfully got samples working after hitting this different issue last time:
#116

That was commit 0b273f1e43 I believe. Just went back to that commit and confirmed that it still works!

But I decided today to try my hand at building my own project in Orca, and after downloading the latest version, when running ./build.sh I get a new error:

$ ./build.sh
ERROR: wasm-ld was not found on your system. This is a component of
Clang that is required in order to produce WebAssembly modules. This
likely means that an old or otherwise incompatible version of Clang is
being used, such as Apple's version of Clang.

Please install Clang 11.0 or newer. We recommend installing Clang via
Homebrew (https://brew.sh/):

  brew install llvm

But clang is updated, and llvm is correctly installed:

$ brew install llvm
Warning: llvm 16.0.6 is already installed and up-to-date.
To reinstall 16.0.6, run:
  brew reinstall llvm

$ clang --version
Apple clang version 15.0.0 (clang-1500.0.40.1)
Target: arm64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Ah okay I think I figured it out. LLVM changed their instructions for how to add to path?

Adding this fixed it:

.zshrc
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"

Keeping this around for posterity!

I successfully got samples working after hitting this different issue last time: https://git.handmade.network/hmn/orca/issues/116 That was commit 0b273f1e43100899bda9c36749fcb57186bdc086 I believe. Just went back to that commit and confirmed that it still works! But I decided today to try my hand at building my own project in Orca, and after downloading the latest version, when running ./build.sh I get a new error: ``` $ ./build.sh ERROR: wasm-ld was not found on your system. This is a component of Clang that is required in order to produce WebAssembly modules. This likely means that an old or otherwise incompatible version of Clang is being used, such as Apple's version of Clang. Please install Clang 11.0 or newer. We recommend installing Clang via Homebrew (https://brew.sh/): brew install llvm ``` But clang is updated, and llvm is correctly installed: ``` $ brew install llvm Warning: llvm 16.0.6 is already installed and up-to-date. To reinstall 16.0.6, run: brew reinstall llvm $ clang --version Apple clang version 15.0.0 (clang-1500.0.40.1) Target: arm64-apple-darwin22.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin ``` Ah okay I think I figured it out. LLVM changed their instructions for how to add to path? Adding this fixed it: ``` .zshrc export PATH="/opt/homebrew/opt/llvm/bin:$PATH" export LDFLAGS="-L/opt/homebrew/opt/llvm/lib" export CPPFLAGS="-I/opt/homebrew/opt/llvm/include" ``` Keeping this around for posterity!
Sign in to join this conversation.
No Label
macOS
windows
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: hmn/orca#151
No description provided.