fuzzilli icon indicating copy to clipboard operation
fuzzilli copied to clipboard

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

Open shopifyjohncoulter-code opened this issue 2 months ago • 2 comments

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.

shopifyjohncoulter-code avatar Nov 13 '25 09:11 shopifyjohncoulter-code