The Swift Package Index logo.Swift Package Index

Build Information

Failed to build CommandLineKit with Swift 5.8 for Linux.

Build Command

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

Build Log

========================================
RunAll
========================================
Builder version: 4.22.5
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/objecthub/swift-commandlinekit.git
Reference: master
Initialized empty Git repository in /host/spi-builder-workspace/.git/
Cloned https://github.com/objecthub/swift-commandlinekit.git into /host/spi-builder-workspace
Revision (git rev-parse @):
SUCCESS checkout https://github.com/objecthub/swift-commandlinekit.git at master
========================================
Build
========================================
Selected platform:         linux
Swift version:             5.8
Building package at path:  /host/spi-builder-workspace
Running build ...
bash -c docker run --rm -v "checkouts-4606859-1":/host -w "/host/spi-builder-workspace" registry.gitlab.com/finestructure/spi-images:basic-5.8-latest swift build 2>&1
warning: 'spi-builder-workspace': found 1 file(s) which are unhandled; explicitly declare them as resources or exclude from the target
    /host/spi-builder-workspace/Sources/CommandLineKitDemo/Info.plist
Building for debugging...
[1/19] Emitting module CommandLineKit
[2/21] Compiling CommandLineKit Terminal.swift
[3/21] Compiling CommandLineKit TextColor.swift
[4/21] Compiling CommandLineKit AnsiCodes.swift
[5/21] Compiling CommandLineKit BackgroundColor.swift
[6/21] Compiling CommandLineKit Command.swift
[7/21] Compiling CommandLineKit TextProperties.swift
[8/21] Compiling CommandLineKit TextStyle.swift
[9/21] Compiling CommandLineKit LineReaderError.swift
[10/21] Compiling CommandLineKit LineReaderHistory.swift
[11/21] Compiling CommandLineKit Flags.swift
[12/21] Compiling CommandLineKit LineReader.swift
[13/21] Compiling CommandLineKit FlagError.swift
[14/21] Compiling CommandLineKit FlagWrapper.swift
[15/21] Compiling CommandLineKit EditState.swift
[16/21] Compiling CommandLineKit Flag.swift
[17/21] Compiling CommandLineKit ControlCharacters.swift
[18/21] Compiling CommandLineKit ConvertibleFromString.swift
[20/23] Wrapping AST for CommandLineKit for debugging
error: emit-module command failed with exit code 1 (use -v to see invocation)
[22/26] Compiling CommandLineKitDemo main.swift
[23/26] 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
//
^
[24/26] 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
//
^
BUILD FAILURE 5.8 linux

Build Machine: Linux 1