Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation failed on Linux. Missing dependency? #1077

Closed
fappelman opened this issue Aug 29, 2021 · 6 comments
Closed

Compilation failed on Linux. Missing dependency? #1077

fappelman opened this issue Aug 29, 2021 · 6 comments
Labels

Comments

@fappelman
Copy link

I was "upgraded" automatically from version 0.12.2 to the latest version 0.13.0 when I compiled a package.

Compilation now fails with this error:

Blob.swift [6/857] Compiling SQLite Blob.swift 
...checkouts/SQLite.swift/Sources/SQLite/Core/Connection.swift:32:8: error: no such module 'CSQLite'
import CSQLite
       ^

No other changes. When I forced a rollback using this in Package.swift:

.package(url: "https://github.com/stephencelis/SQLite.swift.git", .upToNextMinor(from: "0.12.2"))

it compiles again. It seems like there is a dependency missing in 0.13.0.

@jberkel
Copy link
Collaborator

jberkel commented Aug 30, 2021

Strange, the Linux build has not changed since 01.2.2 (neither have the dependencies), and the CI performs a Linux build, so not sure why this would now fail. Can you share the complete build log?

@fappelman
Copy link
Author

Here you are. I have provided the one that fails and the one that succeeds. The only difference is the Package.swift line as mentioned earlier. It is a docker build. I did filter out the references to the internal resources so there are some lines removed.

This is the failing one:

Building XXX
Sending build context to Docker daemon  4.608kB
Step 1/18 : FROM swift:5.4
 ---> 6ffea00eca3e
Step 2/18 : LABEL maintainer="Fred Appelman"
 ---> Using cache
 ---> e335bcdba469
Step 3/18 : RUN apt-get -q update &&     apt-get -q install -y     vim curl libncurses5 libncurses5-dev    libsqlite3-dev libgd-dev libssl-dev libcurl4-openssl-dev
 ---> Using cache
 ---> ab3efd4f72c3
Step 6/18 : WORKDIR /tmp/
 ---> Using cache
 ---> ce77550f6be2
Step 7/18 : RUN cd XXX && make build-release
 ---> Running in 85a61b10b73a
rm -f Package.pins
swift build --build-path "./.linux" -c release
Fetching https://github.com/fappelman/SwiftGD.git
Fetching https://github.com/IBM-Swift/Swift-SMTP
Fetching https://github.com/apple/swift-crypto
Fetching https://github.com/apple/swift-argument-parser
Fetching https://github.com/IBM-Swift/HeliumLogger.git
Fetching https://github.com/IBM-Swift/Kitura-StencilTemplateEngine.git
Fetching https://github.com/IBM-Swift/Kitura.git
Fetching https://github.com/apple/swift-nio-ssl.git
Fetching https://github.com/apple/swift-nio.git
Fetching https://github.com/stephencelis/SQLite.swift.git
Fetching https://github.com/swift-server/async-http-client.git
Fetching https://github.com/apple/swift-log.git
Fetching https://github.com/IBM-Swift/Kitura-TemplateEngine.git
Fetching https://github.com/kylef/Stencil.git
Fetching https://github.com/Kitura/LoggerAPI.git
Fetching https://github.com/Kitura/KituraContracts.git
Fetching https://github.com/Kitura/Kitura-net.git
Fetching https://github.com/Kitura/TypeDecoder.git
Fetching https://github.com/Kitura/BlueSignals.git
Fetching https://github.com/Kitura/BlueSocket.git
Fetching https://github.com/Kitura/BlueSSLService.git
Fetching https://github.com/Kitura/OpenSSL.git
Fetching https://github.com/kylef/PathKit.git
Fetching https://github.com/kylef/Spectre.git
Fetching https://github.com/Kitura/BlueCryptor.git
Fetching https://github.com/apple/swift-nio-transport-services.git
Fetching https://github.com/apple/swift-nio-extras.git
Cloning https://github.com/Kitura/LoggerAPI.git
Resolving https://github.com/Kitura/LoggerAPI.git at 1.9.200
Cloning https://github.com/apple/swift-nio-transport-services.git
Resolving https://github.com/apple/swift-nio-transport-services.git at 1.11.2
Cloning https://github.com/Kitura/KituraContracts.git
Resolving https://github.com/Kitura/KituraContracts.git at 1.2.200
Cloning https://github.com/Kitura/BlueSignals.git
Resolving https://github.com/Kitura/BlueSignals.git at 1.0.200
Cloning https://github.com/Kitura/BlueSocket.git
Resolving https://github.com/Kitura/BlueSocket.git at 1.0.200
Cloning https://github.com/IBM-Swift/Swift-SMTP
Resolving https://github.com/IBM-Swift/Swift-SMTP at 5.1.200
Cloning https://github.com/Kitura/TypeDecoder.git
Resolving https://github.com/Kitura/TypeDecoder.git at 1.3.201
Cloning https://github.com/Kitura/BlueSSLService.git
Resolving https://github.com/Kitura/BlueSSLService.git at 1.0.200
Cloning https://github.com/kylef/PathKit.git
Resolving https://github.com/kylef/PathKit.git at 0.9.2
Cloning https://github.com/Kitura/BlueCryptor.git
Resolving https://github.com/Kitura/BlueCryptor.git at 1.0.200
Cloning https://github.com/swift-server/async-http-client.git
Resolving https://github.com/swift-server/async-http-client.git at 1.5.0
Cloning https://github.com/IBM-Swift/Kitura.git
Resolving https://github.com/IBM-Swift/Kitura.git at 2.9.200
Cloning https://github.com/apple/swift-argument-parser
Resolving https://github.com/apple/swift-argument-parser at 0.4.4
Cloning https://github.com/stephencelis/SQLite.swift.git
Resolving https://github.com/stephencelis/SQLite.swift.git at 0.13.0
Cloning https://github.com/apple/swift-nio-extras.git
Resolving https://github.com/apple/swift-nio-extras.git at 1.10.0
Cloning https://github.com/kylef/Spectre.git
Resolving https://github.com/kylef/Spectre.git at 0.9.2
Cloning https://github.com/IBM-Swift/Kitura-StencilTemplateEngine.git
Resolving https://github.com/IBM-Swift/Kitura-StencilTemplateEngine.git at 1.11.1
Cloning https://github.com/kylef/Stencil.git
Resolving https://github.com/kylef/Stencil.git at 0.13.1
Cloning https://github.com/Kitura/Kitura-net.git
Resolving https://github.com/Kitura/Kitura-net.git at 2.4.200
Cloning https://github.com/apple/swift-log.git
Resolving https://github.com/apple/swift-log.git at 1.4.2
Cloning https://github.com/apple/swift-nio-ssl.git
Resolving https://github.com/apple/swift-nio-ssl.git at 2.14.1
Cloning https://github.com/IBM-Swift/HeliumLogger.git
Resolving https://github.com/IBM-Swift/HeliumLogger.git at 1.9.200
Cloning https://github.com/apple/swift-nio.git
Resolving https://github.com/apple/swift-nio.git at 2.32.1
Cloning https://github.com/Kitura/OpenSSL.git
Resolving https://github.com/Kitura/OpenSSL.git at 2.2.200
Cloning https://github.com/fappelman/SwiftGD.git
Resolving https://github.com/fappelman/SwiftGD.git at 2.5.1
Cloning https://github.com/IBM-Swift/Kitura-TemplateEngine.git
Resolving https://github.com/IBM-Swift/Kitura-TemplateEngine.git at 2.0.200
Cloning https://github.com/apple/swift-crypto
Resolving https://github.com/apple/swift-crypto at 1.1.6
'SQLite.swift' /tmp/XXX/.linux/checkouts/SQLite.swift: warning: found 1 file(s) which are unhandled; explicitly declare them as resources or exclude from the target
    /tmp/XXX/.linux/checkouts/SQLite.swift/Sources/SQLite/Info.plist

[1/852] Compiling URLManip URLManip.swift
[2/853] Compiling _NIODataStructures Heap.swift
[3/854] Compiling Signals Signals.swift
[4/855] Compiling SwiftGD Color.swift
[5/856] Compiling TypeDecoder OrderedDictionary.swift
[6/857] Compiling PathKit PathKit.swift
/tmp/XXX/.linux/checkouts/PathKit/Sources/PathKit.swift:98:14: warning: 'Hashable.hashValue' is deprecated as a protocol requirement; conform type 'Path' to 'Hashable' by implementing 'hash(into:)' instead
  public var hashValue: Int {
             ^
[7/858] Compiling KituraTemplateEngine TemplateEngine.swift
[8/859] Compiling SQLite Blob.swift
/tmp/XXX/.linux/checkouts/SQLite.swift/Sources/SQLite/Core/Connection.swift:32:8: error: no such module 'CSQLite'
import CSQLite
       ^
[9/859] Compiling e_chacha20poly1305.c
[10/859] Compiling a_d2i_fp.c
[11/859] Compiling a_bool.c
[12/859] Compiling a_bitstr.c
Makefile:44: recipe for target 'build-release' failed
make: *** [build-release] Error 1
The command '/bin/sh -c cd XXX && make build-release' returned a non-zero code: 2

Here is the succeeding one. I stopped the log after the compilation of Blob.swift:

swift build --build-path "./.linux" -c release
Fetching https://github.com/fappelman/SwiftGD.git
Fetching https://github.com/IBM-Swift/Swift-SMTP
Fetching https://github.com/apple/swift-crypto
Fetching https://github.com/apple/swift-argument-parser
Fetching https://github.com/IBM-Swift/HeliumLogger.git
Fetching https://github.com/IBM-Swift/Kitura-StencilTemplateEngine.git
Fetching https://github.com/IBM-Swift/Kitura.git
Fetching https://github.com/apple/swift-nio-ssl.git
Fetching https://github.com/apple/swift-nio.git
Fetching https://github.com/stephencelis/SQLite.swift.git
Fetching https://github.com/swift-server/async-http-client.git
Fetching https://github.com/apple/swift-log.git
Fetching https://github.com/IBM-Swift/Kitura-TemplateEngine.git
Fetching https://github.com/kylef/Stencil.git
Fetching https://github.com/stephencelis/CSQLite.git
Fetching https://github.com/Kitura/LoggerAPI.git
Fetching https://github.com/Kitura/TypeDecoder.git
Fetching https://github.com/Kitura/KituraContracts.git
Fetching https://github.com/Kitura/Kitura-net.git
Fetching https://github.com/Kitura/BlueSSLService.git
Fetching https://github.com/Kitura/BlueSignals.git
Fetching https://github.com/Kitura/BlueSocket.git
Fetching https://github.com/Kitura/OpenSSL.git
Fetching https://github.com/kylef/Spectre.git
Fetching https://github.com/kylef/PathKit.git
Fetching https://github.com/Kitura/BlueCryptor.git
Fetching https://github.com/apple/swift-nio-transport-services.git
Fetching https://github.com/apple/swift-nio-extras.git
Cloning https://github.com/apple/swift-crypto
Resolving https://github.com/apple/swift-crypto at 1.1.6
Cloning https://github.com/IBM-Swift/Kitura-TemplateEngine.git
Resolving https://github.com/IBM-Swift/Kitura-TemplateEngine.git at 2.0.200
Cloning https://github.com/Kitura/OpenSSL.git
Resolving https://github.com/Kitura/OpenSSL.git at 2.2.200
Cloning https://github.com/Kitura/LoggerAPI.git
Resolving https://github.com/Kitura/LoggerAPI.git at 1.9.200
Cloning https://github.com/kylef/PathKit.git
Resolving https://github.com/kylef/PathKit.git at 0.9.2
Cloning https://github.com/IBM-Swift/Kitura.git
Resolving https://github.com/IBM-Swift/Kitura.git at 2.9.200
Cloning https://github.com/IBM-Swift/HeliumLogger.git
Resolving https://github.com/IBM-Swift/HeliumLogger.git at 1.9.200
Cloning https://github.com/Kitura/BlueSSLService.git
Resolving https://github.com/Kitura/BlueSSLService.git at 1.0.200
Cloning https://github.com/Kitura/KituraContracts.git
Resolving https://github.com/Kitura/KituraContracts.git at 1.2.200
Cloning https://github.com/Kitura/TypeDecoder.git
Resolving https://github.com/Kitura/TypeDecoder.git at 1.3.201
Cloning https://github.com/kylef/Stencil.git
Resolving https://github.com/kylef/Stencil.git at 0.13.1
Cloning https://github.com/stephencelis/CSQLite.git
Resolving https://github.com/stephencelis/CSQLite.git at 0.0.3
Cloning https://github.com/apple/swift-argument-parser
Resolving https://github.com/apple/swift-argument-parser at 0.4.4
Cloning https://github.com/apple/swift-nio-ssl.git
Resolving https://github.com/apple/swift-nio-ssl.git at 2.14.1
Cloning https://github.com/IBM-Swift/Kitura-StencilTemplateEngine.git
Resolving https://github.com/IBM-Swift/Kitura-StencilTemplateEngine.git at 1.11.1
Cloning https://github.com/apple/swift-nio.git
Resolving https://github.com/apple/swift-nio.git at 2.32.1
Cloning https://github.com/Kitura/Kitura-net.git
Resolving https://github.com/Kitura/Kitura-net.git at 2.4.200
Cloning https://github.com/apple/swift-log.git
Resolving https://github.com/apple/swift-log.git at 1.4.2
Cloning https://github.com/IBM-Swift/Swift-SMTP
Resolving https://github.com/IBM-Swift/Swift-SMTP at 5.1.200
Cloning https://github.com/Kitura/BlueSignals.git
Resolving https://github.com/Kitura/BlueSignals.git at 1.0.200
Cloning https://github.com/fappelman/SwiftGD.git
Resolving https://github.com/fappelman/SwiftGD.git at 2.5.1
Cloning https://github.com/apple/swift-nio-extras.git
Resolving https://github.com/apple/swift-nio-extras.git at 1.10.0
Cloning https://github.com/apple/swift-nio-transport-services.git
Resolving https://github.com/apple/swift-nio-transport-services.git at 1.11.2
Cloning https://github.com/Kitura/BlueCryptor.git
Resolving https://github.com/Kitura/BlueCryptor.git at 1.0.200
Cloning https://github.com/swift-server/async-http-client.git
Resolving https://github.com/swift-server/async-http-client.git at 1.5.0
Cloning https://github.com/kylef/Spectre.git
Resolving https://github.com/kylef/Spectre.git at 0.9.2
Cloning https://github.com/stephencelis/SQLite.swift.git
Resolving https://github.com/stephencelis/SQLite.swift.git at 0.12.2
Cloning https://github.com/Kitura/BlueSocket.git
Resolving https://github.com/Kitura/BlueSocket.git at 1.0.200
'CSQLite' /tmp/XXX/.linux/checkouts/CSQLite: warning: ignoring declared target(s) 'CSQLite' in the system package
[1/852] Compiling URLManip URLManip.swift
[2/853] Compiling _NIODataStructures Heap.swift
[3/854] Compiling Signals Signals.swift
[4/855] Compiling SwiftGD Color.swift
[5/856] Compiling TypeDecoder OrderedDictionary.swift
[6/857] Compiling PathKit PathKit.swift
/tmp/XXX/.linux/checkouts/PathKit/Sources/PathKit.swift:98:14: warning: 'Hashable.hashValue' is deprecated as a protocol requirement; conform type 'Path' to 'Hashable' by implementing 'hash(into:)' instead
  public var hashValue: Int {
             ^
[7/858] Compiling KituraTemplateEngine TemplateEngine.swift
[8/859] Compiling Logging Locks.swift
[9/860] Compiling Socket Socket.swift
[10/861] Compiling FileIO FileIO.swift
[11/862] Compiling LoggerAPI Logger.swift
[12/863] Compiling LibraryLogManager ConditionalLogger.swift
[13/864] Compiling SSLService SSLPointerTricks.swift
[14/865] Compiling HeliumLogger HeliumLogHandler.swift
[15/866] Compiling Cryptor Crypto.swift
/tmp/XXX/.linux/checkouts/BlueCryptor/Sources/Cryptor/StreamCryptor.swift:188:21: warning: static property 'none' produces an empty option set
                public static let none = Options(rawValue: 0)
                                  ^
/tmp/XXX/.linux/checkouts/BlueCryptor/Sources/Cryptor/StreamCryptor.swift:188:21: note: use [] to silence this warning
                public static let none = Options(rawValue: 0)
                                  ^             ~~~~~~~~~~~~~
                                                ([])
/tmp/XXX/.linux/checkouts/BlueCryptor/Sources/Cryptor/Updatable.swift:68:4: warning: using '_' to ignore the result of a Void-returning function is redundant
                        _ = data.withUnsafeBytes() {
                        ^~~~

[16/867] Compiling Stencil Context.swift
/tmp/XXX/.linux/checkouts/Stencil/Sources/Node.swift:65:9: warning: variable 'components' was never mutated; consider changing to 'let' constant
    var components = token.components()
    ~~~ ^
    let
/tmp/XXX/.linux/checkouts/Stencil/Sources/Template.swift:11:3: warning: 'internal(set)' modifier is redundant for an internal property
  internal(set) var environment: Environment
  ^~~~~~~~~~~~~~

[17/868] Compiling SQLite Blob.swift
[18/869] Compiling SwiftSMTP Attachment.swift

@jberkel jberkel added the linux label Aug 30, 2021
@jberkel
Copy link
Collaborator

jberkel commented Aug 30, 2021

Hmm, the failing build is missing the clone of the dependency:

Fetching https://github.com/stephencelis/CSQLite.git
Cloning https://github.com/stephencelis/CSQLite.git

We currently don't have a full integration test of the library on Linux. (it builds the project itself, but not another project depending on it). I'll add one.

@fappelman
Copy link
Author

Thanks

@jberkel
Copy link
Collaborator

jberkel commented Sep 5, 2021

@fappelman Can you try if master works ok?

.package(url: "https://github.com/stephencelis/SQLite.swift.git", .branch("master"))

@fappelman
Copy link
Author

I can confirm that it compiles now! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants