Skip to content

Build Failure on Linux (Swift 5.10.1): [[ Missing Darwin APIs sequence counting and type errors #539

Description

Environment
OS: Kali Linux (x86_64)
Swift Toolchain: 5.10.1
Build Command: swift build -c release
Fuzzilli Revision: (current main, as of November 2025)

Fuzzilli fails to compile on Linux using Swift 5.10.1 due to Darwin specific APIs operator overloading conflicts and sequence counting syntax that differs from macOS Swift Foundation implementations

Steps to Reproduce::::

git clone https://github.com/googleprojectzero/fuzzilli.git
cd fuzzilli
# get swift if not available in the system
swift build -c release

Representative errors::::
/Fuzzilli/Environment/JavaScriptEnvironment.swift:3224:125: error: type 'Locale' has no member 'NumberingSystem'
/Fuzzilli/Environment/JavaScriptEnvironment.swift:3240:117: error: type 'Locale' has no member 'Currency'
/Fuzzilli/Lifting/WasmLifter.swift:716:52: error: cannot call value of non-function type 'Int'
temp += Leb128.unsignedEncode(self.exports.count { $0.getImport() != nil })
...
/Fuzzilli/Lifting/WasmLifter.swift:833:18: error: operator function '+=' requires that 'Data' conform to 'AttributedStringProtocol'

note:::
/FuzzIL/WasmOperations.swift:1353:13: error: the compiler is unable to type check this expression in reasonable time

Causes::

  1. Darwin only locale extensions
    Locale.NumberingSystem and Locale.Currency are ( unavailable ) on linux Foundation.
  2. Sequence counting syntax differences
    Linux Swift requires .count(where:) or .filter(...).count instead of .count { predicate }
  3. Type mismatch with data and operator +=
    += operator on data conflicts with AttributedStringProtocol overloads
  4. Complex chained expressions causing type check timeouts.

Activity

  1. Liedtke commented on Nov 13, 2025

    @Liedtke
    Collaborator

    Fuzzilli fails to compile on Linux using Swift 5.10.1

    See also issue #499, we depend on Swift features that are only available on Swift 6.

    Furthermore, since 72eaa81 we depend on Swift 6.1.x as on 6.0.3 the Swift compiler crashes when compiling that change in release mode.

    I would assume that all the 4 mentioned issues will disappear when switching to a newer toolchain. Most if not all our developers use Linux for their Fuzzilli development (Debian-based). We also use Linux both in our internal CI as well as on GitHub, see e.g. https://github.com/googleprojectzero/fuzzilli/actions/runs/19233695165/job/54980135062, so there shouldn't be any Darwin specific APIs used by Fuzzilli.

  2. shopifyjohncoulter-code commented on Nov 13, 2025

    @shopifyjohncoulter-code
    Author

    Thanks for response, I'd shift to fixed version, Swift 6.2.1 for ubuntu 22.04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions