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

Cannot compile on linux #15

Open
alkismavridis opened this issue Aug 12, 2018 · 2 comments
Open

Cannot compile on linux #15

alkismavridis opened this issue Aug 12, 2018 · 2 comments

Comments

@alkismavridis
Copy link

alkismavridis commented Aug 12, 2018

I saw an other issue mentioning a linking error under linux.
What happens to my case is compile error.

alkis@alkisPC:~/p/swift/logic2$ git clone https://github.com/PerfectlySoft/PerfectTemplate.git
Cloning into 'PerfectTemplate'...
remote: Counting objects: 230, done.
remote: Total 230 (delta 0), reused 0 (delta 0), pack-reused 230
Receiving objects: 100% (230/230), 53.17 KiB | 259.00 KiB/s, done.
Resolving deltas: 100% (117/117), done.
alkis@alkisPC:~/p/swift/logic2$ cd PerfectTemplate
alkis@alkisPC:~/p/swift/logic2/PerfectTemplate$ swift build
Fetching https://github.com/PerfectlySoft/Perfect-HTTPServer.git
Fetching https://github.com/PerfectlySoft/Perfect-Net.git
Fetching https://github.com/PerfectlySoft/Perfect-HTTP.git
Fetching https://github.com/PerfectlySoft/Perfect-CZlib-src.git
Fetching https://github.com/PerfectlySoft/Perfect-Crypto.git
Fetching https://github.com/PerfectlySoft/Perfect-LinuxBridge.git
Fetching https://github.com/PerfectlySoft/Perfect-Thread.git
Fetching https://github.com/PerfectlySoft/PerfectLib.git
Fetching https://github.com/PerfectlySoft/Perfect-COpenSSL-Linux.git
Completed resolution in 21.39s
Cloning https://github.com/PerfectlySoft/Perfect-LinuxBridge.git
Resolving https://github.com/PerfectlySoft/Perfect-LinuxBridge.git at 3.0.0
Cloning https://github.com/PerfectlySoft/Perfect-CZlib-src.git
Resolving https://github.com/PerfectlySoft/Perfect-CZlib-src.git at 0.0.4
Cloning https://github.com/PerfectlySoft/Perfect-Crypto.git
Resolving https://github.com/PerfectlySoft/Perfect-Crypto.git at 3.1.2
Cloning https://github.com/PerfectlySoft/Perfect-Net.git
Resolving https://github.com/PerfectlySoft/Perfect-Net.git at 3.2.0
Cloning https://github.com/PerfectlySoft/Perfect-HTTPServer.git
Resolving https://github.com/PerfectlySoft/Perfect-HTTPServer.git at 3.0.17
Cloning https://github.com/PerfectlySoft/PerfectLib.git
Resolving https://github.com/PerfectlySoft/PerfectLib.git at 3.1.1
Cloning https://github.com/PerfectlySoft/Perfect-Thread.git
Resolving https://github.com/PerfectlySoft/Perfect-Thread.git at 3.0.4
Cloning https://github.com/PerfectlySoft/Perfect-COpenSSL-Linux.git
Resolving https://github.com/PerfectlySoft/Perfect-COpenSSL-Linux.git at 3.0.1
Cloning https://github.com/PerfectlySoft/Perfect-HTTP.git
Resolving https://github.com/PerfectlySoft/Perfect-HTTP.git at 3.1.0
warning: PackageDescription API v3 is deprecated and will be removed in the future; used by package(s): PerfectTemplate, PerfectThread, COpenSSL, LinuxBridge
Compile PerfectCZlib zutil.c
Compile PerfectCZlib inffast.c
Compile PerfectCZlib inflate.c
Compile PerfectCZlib inftrees.c
Compile PerfectCZlib trees.c
Compile PerfectCZlib infback.c
Compile PerfectCZlib uncompr.c
Compile PerfectCZlib gzwrite.c
Compile PerfectCZlib gzread.c
Compile PerfectCZlib gzlib.c
Compile PerfectCZlib gzclose.c
Compile PerfectCZlib deflate.c
Compile PerfectCZlib crc32.c
Compile PerfectCZlib adler32.c
Compile PerfectCZlib compress.c
Compile PerfectCHTTPParser http_parser.c
Compile LinuxBridge LinuxBridge.c
Compile COpenSSL openssl.c
Compile Swift Module 'PerfectThread' (3 sources)
Compile Swift Module 'PerfectLib' (9 sources)
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/PerfectLib.git-7127146926598439540/Sources/PerfectLib/Dir.swift:129:16: warning: 'readdir_r' is deprecated
        return readdir_r(d, &dirEnt, endPtr)
               ^
Compile Swift Module 'PerfectCrypto' (7 sources)
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/Keys.swift:35:35: error: use of undeclared type 'EVP_PKEY'
        init(_ key: UnsafeMutablePointer<EVP_PKEY>?) {
                                         ^~~~~~~~
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/ByteIO.swift:64:45: error: use of undeclared type 'BIO'
typealias BIOPointer = UnsafeMutablePointer<BIO>?
                                            ^~~
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/ByteIO.swift:78:48: error: use of undeclared type 'BIO_METHOD'
        fileprivate init(method: UnsafeMutablePointer<BIO_METHOD>?) {
                                                      ^~~~~~~~~~
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/ByteIO.swift:232:11: error: initializer does not override a designated initializer from its superclass
        override init(bio: BIOPointer) {
        ~~~~~~~~ ^
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/ByteIO.swift:210:14: error: 'checkedResult' produces 'Int', not the expected contextual result type 'Int'
                return try checkedResult(Int(BIO_write(head, bytes.baseAddress, Int32(bytes.count))))
                           ^
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/OpenSSLInternal.swift:281:25: error: use of undeclared type 'EVP_MD'
        var evp: UnsafePointer<EVP_MD> {
                               ^~~~~~
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/OpenSSLInternal.swift:408:25: error: use of undeclared type 'EVP_CIPHER'
        var evp: UnsafePointer<EVP_CIPHER> {
                               ^~~~~~~~~~
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/Keys.swift:31:33: error: use of undeclared type 'EVP_PKEY'
        let pkey: UnsafeMutablePointer<EVP_PKEY>?
                                       ^~~~~~~~
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/Keys.swift:35:35: error: use of undeclared type 'EVP_PKEY'
        init(_ key: UnsafeMutablePointer<EVP_PKEY>?) {
                                         ^~~~~~~~
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/Keys.swift:71:32: error: use of undeclared type 'EVP_PKEY'
        init(kp: UnsafeMutablePointer<EVP_PKEY>?) {
                                      ^~~~~~~~
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/Keys.swift:80:32: error: use of undeclared type 'EVP_PKEY'
                var kp: UnsafeMutablePointer<EVP_PKEY>? = nil
                                             ^~~~~~~~
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/ByteIO.swift:64:45: error: use of undeclared type 'BIO'
typealias BIOPointer = UnsafeMutablePointer<BIO>?
                                            ^~~
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/Keys.swift:198:32: error: use of undeclared type 'EVP_PKEY'
                var kp: UnsafeMutablePointer<EVP_PKEY>?
                                             ^~~~~~~~
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/ByteIO.swift:78:48: error: use of undeclared type 'BIO_METHOD'
        fileprivate init(method: UnsafeMutablePointer<BIO_METHOD>?) {
                                                      ^~~~~~~~~~
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/ByteIO.swift:64:45: error: use of undeclared type 'BIO'
typealias BIOPointer = UnsafeMutablePointer<BIO>?
                                            ^~~
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/ByteIO.swift:78:48: error: use of undeclared type 'BIO_METHOD'
        fileprivate init(method: UnsafeMutablePointer<BIO_METHOD>?) {
                                                      ^~~~~~~~~~
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/ByteIO.swift:64:45: error: use of undeclared type 'BIO'
typealias BIOPointer = UnsafeMutablePointer<BIO>?
                                            ^~~
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/OpenSSLInternal.swift:32:3: error: use of unresolved identifier 'ERR_load_crypto_strings'
                ERR_load_crypto_strings()
                ^~~~~~~~~~~~~~~~~~~~~~~
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/OpenSSLInternal.swift:34:3: error: use of unresolved identifier 'OPENSSL_add_all_algorithms_conf'
                OPENSSL_add_all_algorithms_conf()
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/OpenSSLInternal.swift:36:20: error: use of unresolved identifier 'CRYPTO_num_locks'; did you mean 'CRYPTO_dynlock'?
                for i in 0..<Int(CRYPTO_num_locks()) {
                                 ^~~~~~~~~~~~~~~~
                                 CRYPTO_dynlock
COpenSSL.CRYPTO_dynlock:1:15: note: 'CRYPTO_dynlock' declared here
public struct CRYPTO_dynlock {
              ^
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/OpenSSLInternal.swift:49:3: error: use of unresolved identifier 'CRYPTO_set_locking_callback'
                CRYPTO_set_locking_callback(lockingCallback)
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/OpenSSLInternal.swift:59:3: error: use of unresolved identifier 'CRYPTO_set_id_callback'
                CRYPTO_set_id_callback(threadIdCallback)
                ^~~~~~~~~~~~~~~~~~~~~~
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/OpenSSLInternal.swift:275:30: error: use of undeclared type 'BIO'
        func bio() -> UnsafePointer<BIO>? {
                                    ^~~
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/OpenSSLInternal.swift:281:25: error: use of undeclared type 'EVP_MD'
        var evp: UnsafePointer<EVP_MD> {
                               ^~~~~~
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/OpenSSLInternal.swift:408:25: error: use of undeclared type 'EVP_CIPHER'
        var evp: UnsafePointer<EVP_CIPHER> {
                               ^~~~~~~~~~
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/ByteIO.swift:78:48: error: use of undeclared type 'BIO_METHOD'
        fileprivate init(method: UnsafeMutablePointer<BIO_METHOD>?) {
                                                      ^~~~~~~~~~
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/OpenSSLInternal.swift:304:19: error: use of unresolved identifier 'EVP_MD_CTX_create'
                guard let ctx = EVP_MD_CTX_create() else {
                                ^~~~~~~~~~~~~~~~~
COpenSSL.EVP_MD_CTX_free:1:13: note: did you mean 'EVP_MD_CTX_free'?
public func EVP_MD_CTX_free(_ ctx: OpaquePointer!)
            ^
COpenSSL.EVP_MD_CTX_reset:1:13: note: did you mean 'EVP_MD_CTX_reset'?
public func EVP_MD_CTX_reset(_ ctx: OpaquePointer!) -> Int32
            ^
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/OpenSSLInternal.swift:348:19: error: use of unresolved identifier 'EVP_MD_CTX_create'
                guard let ctx = EVP_MD_CTX_create() else {
                                ^~~~~~~~~~~~~~~~~
COpenSSL.EVP_MD_CTX_free:1:13: note: did you mean 'EVP_MD_CTX_free'?
public func EVP_MD_CTX_free(_ ctx: OpaquePointer!)
            ^
COpenSSL.EVP_MD_CTX_reset:1:13: note: did you mean 'EVP_MD_CTX_reset'?
public func EVP_MD_CTX_reset(_ ctx: OpaquePointer!) -> Int32
            ^
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/OpenSSLInternal.swift:308:4: error: use of unresolved identifier 'EVP_MD_CTX_destroy'
                        EVP_MD_CTX_destroy(ctx)
                        ^~~~~~~~~~~~~~~~~~
COpenSSL.EVP_MD_CTX_ctrl:1:13: note: did you mean 'EVP_MD_CTX_ctrl'?
public func EVP_MD_CTX_ctrl(_ ctx: OpaquePointer!, _ cmd: Int32, _ p1: Int32, _ p2: UnsafeMutableRawPointer!) -> Int32
            ^
COpenSSL.EVP_MD_CTX_reset:1:13: note: did you mean 'EVP_MD_CTX_reset'?
public func EVP_MD_CTX_reset(_ ctx: OpaquePointer!) -> Int32
            ^
/home/alkis/p/swift/logic2/PerfectTemplate/.build/checkouts/Perfect-Crypto.git--6717123795754789427/Sources/PerfectCrypto/OpenSSLInternal.swift:352:4: error: use of unresolved identifier 'EVP_MD_CTX_destroy'
                        EVP_MD_CTX_destroy(ctx)
                        ^~~~~~~~~~~~~~~~~~
COpenSSL.EVP_MD_CTX_ctrl:1:13: note: did you mean 'EVP_MD_CTX_ctrl'?
public func EVP_MD_CTX_ctrl(_ ctx: OpaquePointer!, _ cmd: Int32, _ p1: Int32, _ p2: UnsafeMutableRawPointer!) -> Int32
            ^
COpenSSL.EVP_MD_CTX_reset:1:13: note: did you mean 'EVP_MD_CTX_reset'?
public func EVP_MD_CTX_reset(_ ctx: OpaquePointer!) -> Int32
            ^
error: terminated(1): /opt/swift-4.2/usr/bin/swift-build-tool -f /home/alkis/p/swift/logic2/PerfectTemplate/.build/debug.yaml main output:
    

alkis@alkisPC:~/p/swift/logic2/PerfectTemplate$ 

system: Ubuntu 18.04
swift --version:

Swift version 4.2 (swift-4.2-CONVERGENCE)
Target: x86_64-unknown-linux-gnu
@alkismavridis alkismavridis changed the title Cannot compile in linux Cannot compile on linux Oct 15, 2018
@kptanjunhao
Copy link

I have the same question on Ubuntu 18.04 with Swift 5.

@kptanjunhao
Copy link

After using
swift package update
It's work!
Thanks!

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

No branches or pull requests

2 participants