Stream: StarlingMonkey

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


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

Hi,

I initially thought a CMake error I encountered was caused by wasi-sdk, so I opened an issue there "Compatibility with CMake < 3.5 has been removed from CMake.".

After some digging, I realised the real source was that the StarlingMonkey/cmake/wasi-sdk.cmake file, which is currently pulling in wasi-sdk version 20, which includes an outdated toolchain file that uses cmake_minimum_required(VERSION 3.4.0).

Screenshot 2025-05-09 at 23.14.42.png

This causes a hard failure with CMake 4.x, since support for versions <3.5 has been dropped.

The issue seems to be resolved in wasi-sdk v24 and later, where that cmake_minimum_required directive has been removed from the toolchain file. If StarlingMonkey can be updated to pull wasi-sdk v24 or newer, this would resolve the issue.

I was going to open an issue in the StarlingMonkey repo to suggest this, but then saw that a newly created issue already exists "Configuring fails with CMake >=4.0 due to policy changes".

Would it be possible for StarlingMonkey to update to a newer wasi-sdk version, like 24 or 25?

Hi, I see that wasi-sdk has cmake_minimum_required(VERSION 3.22) set in wasi-sdktests/CMakeLists.txt and cmake_minimum_required(VERSION 3.26) set in wasi-sdk/CMakeLists.txt. Compatibility with vers...
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 <...
CMake 4.0 removes compatibility for CMake versions below 3.5. The version of WASI SDK that StarlingMonkey depends on erroneously declares a cmake_minimum_required of 3.4 in its toolchain file, whic...

view this post on Zulip Tomasz Andrzejak (May 11 2025 at 09:05):

Hello! Thank you for all the details. Yes, I believe updating wasi-sdk is the way to move forward. Unfortunately, it's not as simple as just bumping the SDK version in CMake.

@Till Schneidereit gave some reasons for why that's the case in a different thread:

It's a bit unfortunate, as we currently can't update the version of wasi-sdk used by StarlingMonkey, because for that we'd have to rebuild the SpiderMonkey object files—which doesn't work with newer wasi-sdks at the current revision.

Maybe we can patch wasi-sdk as a temporary solution as mentioned here if the failure becomes too annoying.

CMake 4.0 removes compatibility for CMake versions below 3.5. The version of WASI SDK that StarlingMonkey depends on erroneously declares a cmake_minimum_required of 3.4 in its toolchain file, whic...

view this post on Zulip Timothy McCallum (May 12 2025 at 00:24):

Hi @Tomasz Andrzejak
Thanks for the response, the reference to Till's conversation is very useful in providing context to the larger issues and work required. I will take a peek at deps: bump to WASI-SDK 25 #189 because that seems to be the path to getting StarlingMonkey to fetch and use the latest wasi-sdk (which would resolve the CMake version issue).

Updates to the latest WASI SDK 25 just released today.

view this post on Zulip Till Schneidereit (May 19 2025 at 14:53):

thank you for looking into this, @Timothy McCallum! I'll caution though that I tried doing the SDK bump a bit ago, and ran into very mysterious test failures that I'm completely stumped on how to debug


Last updated: Dec 06 2025 at 06:05 UTC