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

Error building libwally-swift with libtool@2.4.7 #59

Closed
jurvis opened this issue Apr 4, 2022 · 2 comments · Fixed by #69
Closed

Error building libwally-swift with libtool@2.4.7 #59

jurvis opened this issue Apr 4, 2022 · 2 comments · Fixed by #69

Comments

@jurvis
Copy link
Contributor

jurvis commented Apr 4, 2022

When running./build-libwally.sh -dsc / pod install, I am getting the following errors:

/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
Making all in secp256k1
gcc -DHAVE_CONFIG_H -I. -I./src -O2  -std=c89 -pedantic -Wno-long-long -Wnested-externs -Wshadow -Wstrict-prototypes -Wundef -Wno-overlength-strings -Wall -Wno-unused-function -Wextra -Wcast-align -Wconditional-uninitialized -fvisibility=hidden -g -O2 -c src/gen_context.c -o gen_context.o
gcc -O2  -std=c89 -pedantic -Wno-long-long -Wnested-externs -Wshadow -Wstrict-prototypes -Wundef -Wno-overlength-strings -Wall -Wno-unused-function -Wextra -Wcast-align -Wconditional-uninitialized -fvisibility=hidden -g -O2  gen_context.o -o gen_context
./gen_context
  CC       src/libsecp256k1_la-secp256k1.lo
./libtool: line 151: -o: command not found
  CCLD     libsecp256k1.la
./libtool: line 151: -o: command not found
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: no output file specified (specify with -o output)

After digging into it, it looks like an issue with a recent update to libtool that affected our ability to build libwally-core (ElementsProject/libwally-core#320).

For anyone encountering this issue, I have a workaround:

brew unlink libtool
curl https://raw.githubusercontent.com/Homebrew/homebrew-core/0fbd6e24c4122e18ade1ec6c5916cb21de14f352/Formula/libtool.rb -o libtool.rb
brew install libtool.rb

This essentially unlinks your current install of libtool@2.4.7, pulls an old formula of libtool (2.4.6_4), and installs that instead. That should fix the build until libwally-core and libwally-swift is updated.

To undo the workaround above,

brew unlink libtool
rm -rf /opt/homebrew/Cellar/libtool/2.4.6_4
brew install libtool

P.S: huge fan of your Bitcoin Explained podcast! Thanks for your work on that and this library! 🙏🏼

@Sjors
Copy link
Owner

Sjors commented Apr 5, 2022

Thanks! I subscribed to the upstream issue so will keep an eye on that. When there's a new libwally-core release I'll publish a new LibWallySwift release too.

@jurvis
Copy link
Contributor Author

jurvis commented Apr 7, 2022

@Sjors sounds good. I've been following the https://github.com/ElementsProject/libwally-core/issues/320 to make sure that it works for our use case. There are a few things I need to tweak in the script related to build architectures, but I should be able to submit a PR for review once I get the time to sit down and figure it out 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants