"Value of type 'OpaquePointer' has no member 'pointee'" in BitcoinKit.Private.swift
cacaosteve opened this issue · 3 comments
Current behavior
Build error "Value of type 'OpaquePointer' has no member 'pointee'". It seems related to COpenSSL and Swift 5.2. It is probably a fairly simple fix I'm just not sure about pointee and OpaquePointer.
BitcoinKit.Private.swift
if (privateKeyNum.pointee.top == 0) { // BN_is_zero
return nil
}
Now, looking at COpenSSL for BN_new:
public func BN_new() -> OpaquePointer!
And finally in Swift, C, OpaquePointer:
/// A wrapper around an opaque C pointer.
///
/// Opaque pointers are used to represent C pointers to types that
/// cannot be represented in Swift, such as incomplete struct types.
@Frozen public struct OpaquePointer
/Users/steve/BitcoinKit/Sources/BitcoinKitPrivate/BitcoinKit.Private.swift:231:31: Value of type 'OpaquePointer' has no member 'pointee'
Expected behavior
I expected it to build.
Steps to reproduce
- Open BitcoinKit/Package.swift in Xcode
- Build
Environment
- BitcoinKit: 1.1.0
- Xcode Version: 11.4
- Swift Version: 5.2
Same issue here. Anyone found any solution?
Anyone have any solution?
this is likely related to SPM.
I seem to remember just removing that part entirely