Closed eito closed 5 years ago
It looks like you’re using swift tools version 4. This only works with swift tools version 5
I’ll paste a vapor alpha package.swift momentarily.
Thanks for the quick response. I'm past the hang but am getting some compilation errors related to the generated shim.h
// swift-tools-version:5.0
import PackageDescription
let package = Package(
name: "hackathon",
products: [
.library(name: "hackathon", targets: ["App"]),
],
dependencies: [
// 💧 A server-side Swift web framework.
.package(url: "https://github.com/vapor/vapor.git", from: "4.0.0-alpha"),
.package(url: "https://github.com/kylebrowning/APNSwift.git", from: "1.0.0"),
.package(url: "https://github.com/apple/swift-nio.git", from: "2.0.0"),
.package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.0.0"),
.package(url: "https://github.com/apple/swift-nio-extras.git", from: "1.0.0"),
.package(url: "https://github.com/apple/swift-nio-http2.git", from: "1.0.0"),
.package(url: "https://github.com/apple/swift-nio-transport-services.git", from: "1.0.0")
],
targets: [
.target(name: "App", dependencies: ["Vapor"]),
.target(name: "Run", dependencies: ["App"]),
.testTarget(name: "AppTests", dependencies: ["App"])
]
)
Brew install openssl@1.1
You can also type, pkg-config openssl --cflags
To see which openssl would be linked when compiling.
thanks, got past the first issue, now I am wading through CryptoKit compilation errors... 🎉
@eito I believe those are related to which openssl version is being pulled in.
yeah, the errors are all related to OpaquePointer/UnsafePointer conversion issues, which I saw some mention of in APNSwiftPointerTricks.swift... trying to wrap my head around that all
What do you see when you type pkg-config openssl --cflags
╰─❱ pkg-config openssl --cflags
Package openssl was not found in the pkg-config search path.
Perhaps you should add the directory containing `openssl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'openssl' found
It looks like it's getting symbols from
Instead of CNIOBoringSSL's versions.. not sure if that's expected
SO when you did brew install openssl, it should have told you about the CFLAGS to export into your path for pkg-config.
double check pkg-config is installed, and then you can do
For pkg-config to find openssl@1.1 you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig"
Then clean build, and regenerate xcode-proj and you should be good.
@eito ^
cool, thanks @kylebrowning will try it out
Im going to close this as the original problem seems to be resolved.
If something else comes up, don't hesitate to reach out!
Wasn't sure where else to post this, but including this as a dependency causes SwiftPM to hang. If I include the dependency it hangs on explicitly, it hangs on a different one... I'm not sure where to look to see what's going on, the best I can do is use
--verbose
when updating vapor.Here is my package.swift
If I uncomment the latter package, it hangs on a different package:
I'm willing to dig in to resolve this, just not sure where I should look at this point
NOTE: it completes fine if I remove APNSwift