The Swift Package Index logo.Swift Package Index

Build Information

Failed to build CommandLineKit with Swift 5.9 for Linux.

Build Command

docker run --rm -v "checkouts-4606859-1":/host -w "/host/spi-builder-workspace" registry.gitlab.com/finestructure/spi-images:basic-5.9-latest swift build 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.19.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/objecthub/swift-commandlinekit.git
Reference: 0.3.5
Cloned https://github.com/objecthub/swift-commandlinekit.git into spi-builder-workspace
SUCCESS checkout https://github.com/objecthub/swift-commandlinekit.git at 0.3.5
========================================
Build
========================================
Selected platform:         linux
Swift version:             5.9
Building package at path:  spi-builder-workspace
Running build ...
docker run --rm -v "checkouts-4606859-1":/host -w "/host/spi-builder-workspace" registry.gitlab.com/finestructure/spi-images:basic-5.9-latest swift build 2>&1
Building for debugging...
[1/18] Emitting module CommandLineKit
[2/19] Compiling CommandLineKit AnsiCodes.swift
[3/19] Compiling CommandLineKit BackgroundColor.swift
[4/19] Compiling CommandLineKit TextStyle.swift
[5/19] Compiling CommandLineKit TextColor.swift
[6/19] Compiling CommandLineKit TextProperties.swift
[7/19] Compiling CommandLineKit LineReaderHistory.swift
[8/19] Compiling CommandLineKit Terminal.swift
[9/19] Compiling CommandLineKit FlagError.swift
[10/19] Compiling CommandLineKit Flags.swift
[11/19] Compiling CommandLineKit LineReader.swift
[12/19] Compiling CommandLineKit LineReaderError.swift
[13/19] Compiling CommandLineKit EditState.swift
[14/19] Compiling CommandLineKit Flag.swift
[15/19] Compiling CommandLineKit ControlCharacters.swift
[16/19] Compiling CommandLineKit ConvertibleFromString.swift
[18/21] Wrapping AST for CommandLineKit for debugging
error: emit-module command failed with exit code 1 (use -v to see invocation)
[20/24] Compiling CommandLineKitDemo main.swift
[21/24] Emitting module CommandLineKitDemo
/host/spi-builder-workspace/Sources/CommandLineKitDemo/LinuxMain.swift:35:1: error: 'main' attribute cannot be used in a module that contains top-level code
@main struct CommandLineKitDemo {
^
/host/spi-builder-workspace/Sources/CommandLineKitDemo/main.swift:1:1: note: top-level code defined in this source file
//
^
/host/spi-builder-workspace/Sources/CommandLineKitDemo/main.swift:1:1: note: pass '-parse-as-library' to compiler invocation if this is intentional
//
^
[22/24] Compiling CommandLineKitDemo LinuxMain.swift
/host/spi-builder-workspace/Sources/CommandLineKitDemo/LinuxMain.swift:35:1: error: 'main' attribute cannot be used in a module that contains top-level code
@main struct CommandLineKitDemo {
^
/host/spi-builder-workspace/Sources/CommandLineKitDemo/main.swift:1:1: note: top-level code defined in this source file
//
^
/host/spi-builder-workspace/Sources/CommandLineKitDemo/main.swift:1:1: note: pass '-parse-as-library' to compiler invocation if this is intentional
//
^
error: fatalError
BUILD FAILURE 5.9 linux

Build Machine: Linux 1