Cmake build error on Linux

The 5.10 compiler isn't finishing its compilation on Linux:

-- Performing Test CXX_SUPPORTS_FORMAT_NONLITERAL_WARNING
-- Performing Test CXX_SUPPORTS_FORMAT_NONLITERAL_WARNING - Success
-- Performing Test CXX_SUPPORTS_GLOBAL_CONSTRUCTORS_WARNING
-- Performing Test CXX_SUPPORTS_GLOBAL_CONSTRUCTORS_WARNING - Success
-- Performing Test CXX_SUPPORTS_EXIT_TIME_DESTRUCTORS_WARNING
-- Performing Test CXX_SUPPORTS_EXIT_TIME_DESTRUCTORS_WARNING - Success
CMake Error at cmake/modules/SwiftUtils.cmake:116 (get_filename_component):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  stdlib/cmake/modules/SwiftSource.cmake:862 (get_bootstrapping_swift_lib_dir)
  stdlib/cmake/modules/SwiftSource.cmake:137 (_compile_swift_files)
  stdlib/cmake/modules/AddSwiftStdlib.cmake:972 (handle_swift_sources)
  stdlib/cmake/modules/AddSwiftStdlib.cmake:2268 (add_swift_target_library_single)
  stdlib/public/Cxx/CMakeLists.txt:9 (add_swift_target_library)

-- Configuring incomplete, errors occurred!
$ cmake --version
cmake version 3.25.1

I was building swift 5.10 and I specified notest as a preset.

Note, I'm only trying to build 5.10 because when I tried 5.9-RELEASE, it didn't build on x86_64 Linux.

Do you have a prebuilt Swift toolchain installed and in your PATH? It looks like CMake can't find one, but that's required to build the swift-syntax parser.

Check your prior log for the three lines I highlighted in my post last month.

I was told long ago that I can't build Swift if the Swift compiler is installed.
BTW I'm running Debian 12 x86_64.

That may have been true until last year, but since 5.9, a prebuilt Swift compiler is required to build the new parser written in Swift, which the new macro features require.

Currently there isn't a prebuilt compiler that is specifically for Debian.
I wonder if the others will even work.

They probably will, as Ubuntu is Debian-based. I haven't tried it, but I'm guessing the official Ubuntu release can be made to work.