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

"Value of type 'OpaquePointer' has no member 'pointee'" in BitcoinKit.Private.swift #250

Open
cacaosteve opened this issue Apr 15, 2020 · 3 comments

Comments

@cacaosteve
Copy link

cacaosteve commented Apr 15, 2020

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

  1. Open BitcoinKit/Package.swift in Xcode
  2. Build

Environment

  • BitcoinKit: 1.1.0
  • Xcode Version: 11.4
  • Swift Version: 5.2
@iampawan
Copy link

Same issue here. Anyone found any solution?

@s3ton
Copy link

s3ton commented Mar 30, 2021

Anyone have any solution?
this is likely related to SPM.

@cacaosteve
Copy link
Author

I seem to remember just removing that part entirely

yspreen added a commit to yspreen/BitcoinKit that referenced this issue Apr 24, 2024
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

3 participants