Cacao icon indicating copy to clipboard operation
Cacao copied to clipboard

Build fails on ubuntu 16.04 using swift 4.0.3

Open codeinred opened this issue 6 years ago • 3 comments

Output of swift build:

Fetching https://github.com/PureSwift/Silica.git
Fetching https://github.com/PureSwift/Cairo.git
Fetching https://github.com/PureSwift/SDL.git
Fetching https://github.com/PureSwift/CSDL2.git
Fetching https://github.com/PureSwift/LittleCMS.git
Fetching https://github.com/PureSwift/CLCMS.git
Fetching https://github.com/PureSwift/CFreeType.git
Fetching https://github.com/PureSwift/CFontConfig.git
Fetching https://github.com/PureSwift/CCairo.git
Cloning https://github.com/PureSwift/CLCMS.git
Resolving https://github.com/PureSwift/CLCMS.git at 1.0.0
Cloning https://github.com/PureSwift/CFontConfig.git
Resolving https://github.com/PureSwift/CFontConfig.git at 1.0.1
Cloning https://github.com/PureSwift/CSDL2.git
Resolving https://github.com/PureSwift/CSDL2.git at 1.0.1
Cloning https://github.com/PureSwift/Silica.git
Resolving https://github.com/PureSwift/Silica.git at 1.3.2
Cloning https://github.com/PureSwift/CFreeType.git
Resolving https://github.com/PureSwift/CFreeType.git at 1.0.4
Cloning https://github.com/PureSwift/SDL.git
Resolving https://github.com/PureSwift/SDL.git at 1.0.1
Cloning https://github.com/PureSwift/Cairo.git
Resolving https://github.com/PureSwift/Cairo.git at 1.2.3
Cloning https://github.com/PureSwift/LittleCMS.git
Resolving https://github.com/PureSwift/LittleCMS.git at 1.0.2
Cloning https://github.com/PureSwift/CCairo.git
Resolving https://github.com/PureSwift/CCairo.git at 1.1.1
warning: error while trying to use pkgConfig flags for CSDL2: nonWhitelistedFlags("Non whitelisted flags found: [\"-D_REENTRANT\"] in pc file sdl2")
Compile Swift Module 'SDL' (10 sources)
Compile Swift Module 'LittleCMS' (14 sources)
Compile Swift Module 'Cairo' (14 sources)
Compile Swift Module 'Silica' (17 sources)
/home/sky/.software/Cacao/.build/checkouts/SDL.git-6140504252031209735/Sources/SDL/BitMaskOption.swift:18:20: warning: redeclaration of associated type 'RawValue' from protocol 'RawRepresentable' is better expressed as a 'where' clause on the protocol
    associatedtype RawValue: Integer
    ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
    
Swift.RawRepresentable:94:20: note: 'RawValue' declared here
    associatedtype RawValue
                   ^
/home/sky/.software/Cacao/.build/checkouts/SDL.git-6140504252031209735/Sources/SDL/BitMaskOption.swift:18:20: warning: redeclaration of associated type 'RawValue' from protocol 'RawRepresentable' is better expressed as a 'where' clause on the protocol
    associatedtype RawValue: Integer
    ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
    
Swift.RawRepresentable:94:20: note: 'RawValue' declared here
    associatedtype RawValue
                   ^
/home/sky/.software/Cacao/.build/checkouts/SDL.git-6140504252031209735/Sources/SDL/BitMaskOption.swift:18:20: warning: redeclaration of associated type 'RawValue' from protocol 'RawRepresentable' is better expressed as a 'where' clause on the protocol
    associatedtype RawValue: Integer
    ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
    
Swift.RawRepresentable:94:20: note: 'RawValue' declared here
    associatedtype RawValue
                   ^
/home/sky/.software/Cacao/.build/checkouts/SDL.git-6140504252031209735/Sources/SDL/BitMaskOption.swift:18:20: warning: redeclaration of associated type 'RawValue' from protocol 'RawRepresentable' is better expressed as a 'where' clause on the protocol
    associatedtype RawValue: Integer
    ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
    
Swift.RawRepresentable:94:20: note: 'RawValue' declared here
    associatedtype RawValue
                   ^
/home/sky/.software/Cacao/.build/checkouts/SDL.git-6140504252031209735/Sources/SDL/BitMaskOption.swift:18:20: warning: redeclaration of associated type 'RawValue' from protocol 'RawRepresentable' is better expressed as a 'where' clause on the protocol
    associatedtype RawValue: Integer
    ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
    
Swift.RawRepresentable:94:20: note: 'RawValue' declared here
    associatedtype RawValue
                   ^
/home/sky/.software/Cacao/.build/checkouts/SDL.git-6140504252031209735/Sources/SDL/BitMaskOption.swift:18:20: warning: redeclaration of associated type 'RawValue' from protocol 'RawRepresentable' is better expressed as a 'where' clause on the protocol
    associatedtype RawValue: Integer
    ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
    
Swift.RawRepresentable:94:20: note: 'RawValue' declared here
    associatedtype RawValue
                   ^
/home/sky/.software/Cacao/.build/checkouts/SDL.git-6140504252031209735/Sources/SDL/BitMaskOption.swift:18:20: warning: redeclaration of associated type 'RawValue' from protocol 'RawRepresentable' is better expressed as a 'where' clause on the protocol
    associatedtype RawValue: Integer
    ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
    
Swift.RawRepresentable:94:20: note: 'RawValue' declared here
    associatedtype RawValue
                   ^
/home/sky/.software/Cacao/.build/checkouts/SDL.git-6140504252031209735/Sources/SDL/BitMaskOption.swift:18:20: warning: redeclaration of associated type 'RawValue' from protocol 'RawRepresentable' is better expressed as a 'where' clause on the protocol
    associatedtype RawValue: Integer
    ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
    
Swift.RawRepresentable:94:20: note: 'RawValue' declared here
    associatedtype RawValue
                   ^
/home/sky/.software/Cacao/.build/checkouts/SDL.git-6140504252031209735/Sources/SDL/BitMaskOption.swift:18:20: warning: redeclaration of associated type 'RawValue' from protocol 'RawRepresentable' is better expressed as a 'where' clause on the protocol
    associatedtype RawValue: Integer
    ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
    
Swift.RawRepresentable:94:20: note: 'RawValue' declared here
    associatedtype RawValue
                   ^
/home/sky/.software/Cacao/.build/checkouts/SDL.git-6140504252031209735/Sources/SDL/BitMaskOption.swift:18:20: warning: redeclaration of associated type 'RawValue' from protocol 'RawRepresentable' is better expressed as a 'where' clause on the protocol
    associatedtype RawValue: Integer
    ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
    
Swift.RawRepresentable:94:20: note: 'RawValue' declared here
    associatedtype RawValue
                   ^
Compile Swift Module 'SDLDemo' (1 sources)
/home/sky/.software/Cacao/.build/checkouts/Silica.git-3700298429439828320/Sources/Silica/CGFont.swift:236:25: warning: 'init' is deprecated: Failable initializer was removed in Swift 4. When upgrading to Swift 4, please use non-failable String.init(_:UTF8View)
        let substring = String(utf8[indexRange])
                        ^
Linking ./.build/x86_64-unknown-linux/debug/SDLDemo
Compile Swift Module 'Cacao' (78 sources)
/home/sky/.software/Cacao/Sources/Cacao/UIResponder.swift:238:27: error: use of undeclared type 'UndoManager'
    open var undoManager: UndoManager? { return nil }
                          ^~~~~~~~~~~
/home/sky/.software/Cacao/Sources/Cacao/UIResponder.swift:238:27: error: use of undeclared type 'UndoManager'
    open var undoManager: UndoManager? { return nil }
                          ^~~~~~~~~~~
/home/sky/.software/Cacao/Sources/Cacao/UIResponder.swift:238:27: error: use of undeclared type 'UndoManager'
    open var undoManager: UndoManager? { return nil }
                          ^~~~~~~~~~~
/home/sky/.software/Cacao/Sources/Cacao/UIResponder.swift:238:27: error: use of undeclared type 'UndoManager'
    open var undoManager: UndoManager? { return nil }
                          ^~~~~~~~~~~
/home/sky/.software/Cacao/Sources/Cacao/UIResponder.swift:238:27: error: use of undeclared type 'UndoManager'
    open var undoManager: UndoManager? { return nil }
                          ^~~~~~~~~~~
/home/sky/.software/Cacao/Sources/Cacao/UIResponder.swift:238:27: error: use of undeclared type 'UndoManager'
    open var undoManager: UndoManager? { return nil }
                          ^~~~~~~~~~~
/home/sky/.software/Cacao/Sources/Cacao/UIResponder.swift:238:27: error: use of undeclared type 'UndoManager'
    open var undoManager: UndoManager? { return nil }
                          ^~~~~~~~~~~
/home/sky/.software/Cacao/Sources/Cacao/UIResponder.swift:238:27: error: use of undeclared type 'UndoManager'
    open var undoManager: UndoManager? { return nil }
                          ^~~~~~~~~~~
/home/sky/.software/Cacao/Sources/Cacao/UIResponder.swift:238:27: error: use of undeclared type 'UndoManager'
    open var undoManager: UndoManager? { return nil }
                          ^~~~~~~~~~~
/home/sky/.software/Cacao/Sources/Cacao/UIResponder.swift:238:27: error: use of undeclared type 'UndoManager'
    open var undoManager: UndoManager? { return nil }
                          ^~~~~~~~~~~
/home/sky/.software/Cacao/Sources/Cacao/UIResponder.swift:238:27: error: use of undeclared type 'UndoManager'
    open var undoManager: UndoManager? { return nil }
                          ^~~~~~~~~~~
/home/sky/.software/Cacao/Sources/Cacao/UIResponder.swift:238:27: error: use of undeclared type 'UndoManager'
    open var undoManager: UndoManager? { return nil }
                          ^~~~~~~~~~~
/home/sky/.software/Cacao/Sources/Cacao/UIResponder.swift:238:27: error: use of undeclared type 'UndoManager'
    open var undoManager: UndoManager? { return nil }
                          ^~~~~~~~~~~
/home/sky/.software/Cacao/Sources/Cacao/UIResponder.swift:238:27: error: use of undeclared type 'UndoManager'
    open var undoManager: UndoManager? { return nil }
                          ^~~~~~~~~~~
/home/sky/.software/Cacao/Sources/Cacao/SDL.swift:82:17: warning: result of call to 'run(mode:before:)' is unused
        runloop.run(mode: .defaultRunLoopMode, before: Date() + (1.0 / TimeInterval(framesPerSecond)))
                ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/sky/.software/Cacao/Sources/Cacao/UIResponder.swift:238:27: error: use of undeclared type 'UndoManager'
    open var undoManager: UndoManager? { return nil }
                          ^~~~~~~~~~~
/home/sky/.software/Cacao/Sources/Cacao/UIResponder.swift:238:27: error: use of undeclared type 'UndoManager'
    open var undoManager: UndoManager? { return nil }
                          ^~~~~~~~~~~
error: terminated(1): /home/sky/.software/swift-lang/usr/bin/swift-build-tool -f /home/sky/.software/Cacao/.build/debug.yaml main`

codeinred avatar Mar 11 '18 00:03 codeinred

Any update on this?

dicearr avatar Apr 05 '18 13:04 dicearr

UndoManager seems to be Cocoa-specific. If you comment out that line, it builds.

Of course, now I've managed to crash the Swift compiler, which is fantastic. :neutral_face:

refi64 avatar Apr 15 '18 19:04 refi64

I've tried googling for the source for UndoManager in the UIKit SDK in case there's a way to at least stub this out and implement it later...

Building on Ubuntu 18.04 on Swift 5.1

kevinvandenbreemen avatar Nov 23 '19 14:11 kevinvandenbreemen