Skip to content

Conversation

@PhantomInTheWire
Copy link
Contributor

Explanation

This PR updates the outdated macOS build instructions page to reflect the current LLVM installation path used via Homebrew (llvm@16) and removes a deprecated section Known issues (since the issue has been resolved and there are no currently known issues).

Related issue

None

Motivation

While working on a separate PR, I noticed that the macOS build instructions were outdated and caused build failures. Specifically, the current instructions rely on brew install llvm, which now installs LLVM 20 by default. LLVM 20 has a different header structure especially for lldwhich breaks the build with errors like:

fatal error: 'lld/Common/Driver.h' file not found

To fix this, users would need to install lld separately and manually update include paths, which complicates the setup. However, using llvm@16 avoids these issues because its layout matches the expectations of the WasmEdge build system (e.g., it places lld/Common/Driver.h under $LLVM_DIR/include).

This PR updates the instructions to use llvm@16, ensuring a smoother and consistent build experience on macOS.

What type of PR is this

/kind documentation

Proposed Changes

  • Updated the macOS build instructions to explicitly install llvm@16 via Homebrew (brew install cmake ninja llvm@16) to avoid compatibility issues introduced by LLVM 20.
  • Updated the LLVM_DIR export path to match the location of llvm@16 CMake files:
    export LLVM_DIR="$(brew --prefix)/opt/llvm@16/lib/cmake".
  • Removed the deprecated "Known issues" section, as the referenced macOS-specific test failure (wasmedgeWasiSocketTests) has been resolved.

Copy link
Member

juntao commented May 31, 2025

Hello, I am a PR summary agent on flows.network. Here are my reviews of code commits in this PR.


Overall Summary

Potential Issues and Errors:

  1. Inconsistent LLVM Version: There is inconsistency between the two summaries regarding which LLVM version should be used (llvm@16 vs llvm@18). This discrepancy needs to be resolved.
  2. Version Specificity: The first summary specifies a specific LLVM version (llvm@16), while the second updates it to a newer version (llvm@18). It is unclear which one is correct or if both are valid but at different stages of documentation evolution.
  3. Removed Known Issues Section: Removing sections about known issues can be misleading if these issues still exist. Ensure that there has been verification that all previously mentioned unresolved tests have indeed been resolved.

Most Important Findings:

  • The PR aims to update the macOS build from source documentation by specifying a newer LLVM version and adjusting the LLVM_DIR path accordingly.
  • The removal of the known issues section suggests an improvement in the current state of the software, but it should be verified that these issues are no longer present.
  • Ensuring consistency across different parts of the documentation (specifically regarding the LLVM version) is critical for accurate and reliable instructions.

Details

Commit ad0b5613b4d5eef3568a01fccf83b403b795e4a7

Key Changes:

  1. Updated LLVM Version: Changed the LLVM version from unspecified to llvm@16 in Homebrew installation.
  2. Updated LLVM_DIR Path: Modified the LLVM_DIR environment variable to point to the specific llvm@16 path.
  3. Removed Known Issues Section: Removed the section about known issues and unresolved tests on macOS, specifically related to wasmedgeWasiSocketTests.

Summary:

  • The main update is specifying LLVM version 16 for consistency and correctness in building from source on macOS.
  • Removed outdated information regarding unresolved test issues to keep the documentation current.

Commit 3a2cbb88a0e1d0dec237666afc4bfea283147a3e

Key Changes

  • Updated LLVM Version: Changed the required LLVM version from 16.0.4 to 18.1.8 in the macOS build from source documentation.
  • Brew Install Command: Updated the brew install command to use llvm@18 instead of llvm@16.
  • LLVM_DIR Environment Variable: Modified the LLVM_DIR environment variable to point to LLVM 18's path.

@PhantomInTheWire PhantomInTheWire marked this pull request as ready for review May 31, 2025 22:55
@hydai hydai merged commit ca67760 into WasmEdge:main Jun 1, 2025
6 checks passed
@PhantomInTheWire PhantomInTheWire deleted the docs/fix-macos-build-instructions branch June 2, 2025 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants