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

Bump libwally-core to 0.8.5 #62

Merged
merged 1 commit into from
Apr 13, 2022
Merged

Bump libwally-core to 0.8.5 #62

merged 1 commit into from
Apr 13, 2022

Conversation

Sjors
Copy link
Owner

@Sjors Sjors commented Apr 13, 2022

For some reason I can no longer build for the device or simulator on macOS 12.3.1:

Undefined symbols for architecture x86_64:
  "_secp256k1_nonce_function_default", referenced from:
      _wally_internal_ec_nonce_fn in libwallycore.a(libwallycore_la-internal.o)
...

@Sjors
Copy link
Owner Author

Sjors commented Apr 13, 2022

Building the latest master branch from scratch still works for me. My guess is that something in ElementsProject/libwally-core#321 requires updating our build stuff.

@jurvis any thoughts for what would be a quick fix? Or is it better to bite the bullet and make a more rigorous improvement like #61? Update: after review, I think PR 61 should be easy enough to merge so we don't need a quick fix.

@jurvis
Copy link
Contributor

jurvis commented Apr 13, 2022

hey @Sjors, I ran to the same issue as well. I believe ElementsProject/libwally-core#321 excludes the secp256k1 symbols so we'll have to manually include the libsecp256k1 static library in our Libwally project.

image

This is represented by this pbxproj change in #61

EDIT: showing my work:

excludes the secp256k1 symbols so we'll have to manually include the libsecp256k1 static library in our Libwally project.

if you run nm libwallycore.a you'll get this output. where you can see that the symbols are undefined
image

@jurvis
Copy link
Contributor

jurvis commented Apr 13, 2022

TL;DR: #61 should hopefully fix a libwally-core build issue with libtool@2.4.7, support M1 macs running arm64 simulator targets, support xcframeworks for potential Swift Package Manager integration in the future

@Sjors the improvement I'm working on in #61 hopefully achieves a couple of things, actually:

  1. Update to libwally-core@0.8.5 which fixes build issues for me with libtool@2.4.7
  2. Support running Libwally on M1 Mac running arm64 simulators. This necessitates the use of xcframeworks afaik. lipo will end up packaging both simulator and device arm64 targets which Xcode will not like 😬
  3. With that said, 1 enables us to actually clean up our podspec file, and may even mean we can delete the Carthage build script -- since we're actually building the .xcframework directly for users to drag into their project.

At this current moment, if you checkout 60ed50a, run ./build-libwally.sh -sdc, and drag Libwally.xcframework into any iOS project, it builds!

However, I'm having a hard time trying to debug getting it to work with Cocoapods (sample project):
image

and Carthage currently spits out a bunch of errors for me.

@Sjors Sjors force-pushed the 2022/04/libwally-core-0.8.5 branch from 94ad7f8 to a456fb2 Compare April 13, 2022 15:19
@Sjors
Copy link
Owner Author

Sjors commented Apr 13, 2022

we'll have to manually include the libsecp256k1 static library in our Libwally project

That was easy enough and did the trick!

@Sjors Sjors merged commit 78e3f14 into master Apr 13, 2022
@Sjors Sjors deleted the 2022/04/libwally-core-0.8.5 branch April 13, 2022 15:38
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

Successfully merging this pull request may close these issues.

2 participants