Skip to content

fatal error: 'algorithm' file not found when installing WASI-Virt on MacOS #8

@danbugs

Description

@danbugs

Creating this issue in case others run into it.

When installing wasi-virt (i.e., cargo install wasi-virt --git https://github.com/bytecodealliance/WASI-Virt --rev b662e419 --locked) on MacOS, I got the following error:

cargo:warning=/Users/danbugs/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cxx-1.0.116/src/../include/cxx.h:2:10: fatal error: 'algorithm' file not found
  cargo:warning=    2 | #include <algorithm>

This can be solved by setting the include path directly when installing:

export CXXFLAGS="-isysroot $(xcrun --show-sdk-path) -I$(xcrun --show-sdk-path)/usr/include/c++/v1"
cargo install wasi-virt --git https://github.com/bytecodealliance/WASI-Virt --rev b662e419 --locked

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions