PerfectSwift:Can';t编译完善加密

PerfectSwift:Can';t编译完善加密,swift,ubuntu,perfect,Swift,Ubuntu,Perfect,我在Ubuntu 14.04.1,clang-3.8上使用PerfectSwift 我用的是Perfect,一切正常,但现在我不能再编译了(但它可以在我的mac上编译) 错误日志为 /home/celian/swift_server/Packages/PerfectCrypto-1.0.8/Sources/ByteIO.swift:282:43: error: cannot convert value of type 'UnsafeRawPointer?' to expected argumen

我在Ubuntu 14.04.1,clang-3.8上使用PerfectSwift 我用的是Perfect,一切正常,但现在我不能再编译了(但它可以在我的mac上编译)

错误日志为

/home/celian/swift_server/Packages/PerfectCrypto-1.0.8/Sources/ByteIO.swift:282:43: error: cannot convert value of type 'UnsafeRawPointer?' to expected argument type 'UnsafeMutableRawPointer!'
                super.init(bio: BIO_new_mem_buf(pointer.baseAddress, Int32(pointer.count)))
                                                ~~~~~~~~^~~~~~~~~~~
/home/celian/swift_server/Packages/PerfectCrypto-1.0.8/Sources/ByteIO.swift:363:34: error: cannot convert value of type 'String' to expected argument type 'UnsafeMutablePointer<Int8>!'
                super.init(bio: BIO_new_accept(name))
                                               ^~~~
/home/celian/swift_server/Packages/PerfectCrypto-1.0.8/Sources/ByteIO.swift:394:35: error: cannot convert value of type 'String' to expected argument type 'UnsafeMutablePointer<Int8>!'
                super.init(bio: BIO_new_connect(name))
                                                ^~~~
/home/celian/swift_server/Packages/PerfectCrypto-1.0.8/Sources/OpenSSLInternal.swift:357:64: error: cannot convert value of type 'UnsafePointer<UInt8>?' to expected argument type 'UnsafeMutablePointer<UInt8>!'
                guard 1 == EVP_DigestVerifyFinal(ctx, signature.baseAddress?.assumingMemoryBound(to: UInt8.self), mdLen) else {
                                                      ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/bn.h:187:19: error: integer literal is too large to be represented in any integer type
#define BN_MASK         (0xffffffffffffffffffffffffffffffffLL)
                         ^
/home/celian/swift_server/Packages/PerfectCrypto-1.0.8/Sources/OpenSSLInternal.swift:385:31: error: use of unresolved identifier 'EVP_des_ede3_wrap'
                case .des_ede3_wrap:    return EVP_des_ede3_wrap()
                                               ^~~~~~~~~~~~~~~~~
/home/celian/swift_server/Packages/PerfectCrypto-1.0.8/Sources/OpenSSLInternal.swift:413:31: error: use of unresolved identifier 'EVP_aes_128_wrap'
                case .aes_128_wrap:             return EVP_aes_128_wrap()
                                                       ^~~~~~~~~~~~~~~~
/home/celian/swift_server/Packages/PerfectCrypto-1.0.8/Sources/OpenSSLInternal.swift:423:31: error: use of unresolved identifier 'EVP_aes_192_wrap'
                case .aes_192_wrap:             return EVP_aes_192_wrap()
                                                       ^~~~~~~~~~~~~~~~
/home/celian/swift_server/Packages/PerfectCrypto-1.0.8/Sources/OpenSSLInternal.swift:434:31: error: use of unresolved identifier 'EVP_aes_256_wrap'
                case .aes_256_wrap:             return EVP_aes_256_wrap()
                                                       ^~~~~~~~~~~~~~~~
/home/celian/swift_server/Packages/PerfectCrypto-1.0.8/Sources/OpenSSLInternal.swift:437:41: error: use of unresolved identifier 'EVP_aes_128_cbc_hmac_sha256'
                case .aes_128_cbc_hmac_sha256:  return EVP_aes_128_cbc_hmac_sha256()
                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
COpenSSL.EVP_aes_128_cbc_hmac_sha1:1:13: note: did you mean 'EVP_aes_128_cbc_hmac_sha1'?
public func EVP_aes_128_cbc_hmac_sha1() -> UnsafePointer<EVP_CIPHER>!
            ^
/home/celian/swift_server/Packages/PerfectCrypto-1.0.8/Sources/OpenSSLInternal.swift:438:41: error: use of unresolved identifier 'EVP_aes_256_cbc_hmac_sha256'
                case .aes_256_cbc_hmac_sha256:  return EVP_aes_256_cbc_hmac_sha256()
                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
COpenSSL.EVP_aes_256_cbc_hmac_sha1:1:13: note: did you mean 'EVP_aes_256_cbc_hmac_sha1'?
public func EVP_aes_256_cbc_hmac_sha1() -> UnsafePointer<EVP_CIPHER>!
            ^
<unknown>:0: error: build had 1 command failures
error: exit(1): /swift/usr/bin/swift-build-tool -f /home/celian/swift_server/.build/debug.yaml -v

有人能帮我吗?

丹尼尔添加了一条评论-2017年4月12日上午7:43 内部的 永久链接编辑删除
@Alessandro Piazza经过一些研究,明显的问题是PerfectCrypto依赖openssl 1.0.2。官方存储库只有1.0.1版。我按照以下说明安装了openssl v 1.0.2,并且能够编译PerfectCrypto。

我也有同样的问题,但不知道要在哪里运行您链接的.ssh。我在google app engine上运行我的服务器,因此使用gcloud app deploy推送我的package.swift、main.swift、appyaml和Dockerfile。您知道我可以在其中的什么地方安装openssl v1.0.2吗?
    dependencies: [
        .Package(url: "https://github.com/PerfectlySoft/Perfect-HTTPServer.git", majorVersion: 2),    
        .Package(url: "https://github.com/iamjono/SwiftString.git", majorVersion: 1),
        .Package(url: "https://github.com/PerfectlySoft/Perfect-Curl.git", majorVersion: 2, minor: 0),
        .Package(url:"https://github.com/PerfectlySoft/Perfect-XML.git", majorVersion: 2, minor: 0)

    ]