Stream: wasi

Topic: `wasi-sdk`: Error (CMake < 3.5 has been removed from CMake)


view this post on Zulip Timothy McCallum (May 09 2025 at 05:56):

Hi,

Just curious about the best path forward regarding CMake versions when using wasi-sdk and other repositories where wasi-sdk is a dependency. I submitted an issue in the WebAssembly/wasi-sdk repository with some additional details.

https://github.com/WebAssembly/wasi-sdk/issues/529.

Thanks
Tim

Hi, I see that wasi-sdk has cmake_minimum_required(VERSION 3.22) set in tests/CMakeLists.txt and cmake_minimum_required(VERSION 3.26) set in wasi-sdk/CMakeLists.txt. Compatibility with versions of ...

view this post on Zulip Timothy McCallum (May 09 2025 at 14:09):

I now realise where the error came from.

The StarlingMonkey/cmake) /wasi-sdk.cmake file uses WASI_SDK_VERSION 20 which in turn fetches an older wasi-sdk/share/cmake/wasi-sdk.cmake file that contains the cmake_minimum_required(VERSION 3.4.0) and hence the issue (when I am installing StarlingMonkey with cmake 4.0.2):

CMake Error at deps/cpm_cache/wasi-sdk ... wasi-sdk.cmake ...
  Compatibility with CMake < 3.5 has been removed from CMake.

I noticed this closed wasi-sdk PR to "Remove cmake_minimum_required from toolchain files", and evidently the latest wasi-sdk toolchain files no longer contain the cmake_minimum_required, which is a solution to the issue.

Can StarlingMonkey use WASI_SDK_VERSION 24, which is where the fix landed? I was going to ask the question via a new issue in the StarlingMonkey repo, but then noticed this issue "Make SpiderMonkey build with the latest WASI-SDK and support dynamic linking".

Any thoughts on StarlingMonkey using a newer wasi-sdk version?

The StarlingMonkey JS runtime. Contribute to bytecodealliance/StarlingMonkey development by creating an account on GitHub.
This command is generally not included in toolchain files. It is used in project configuration files that will consume the toolchain file. Also, such a low value triggers warnings, support for <...
The StarlingMonkey JS runtime. Contribute to bytecodealliance/StarlingMonkey development by creating an account on GitHub.

view this post on Zulip Timothy McCallum (May 10 2025 at 00:05):

Moved to :right: StarlingMonkey channel


Last updated: Dec 06 2025 at 06:05 UTC