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

secp256k1: enable ellswift module #94

Merged
merged 1 commit into from
Jul 6, 2024
Merged

Conversation

benma
Copy link
Contributor

@benma benma commented Jul 5, 2024

When running cargo tarpaulin (for test coverage) in a project that depends on this crate, compilation fails with:

= note: /usr/bin/ld: /rust-bitcoinconsensus/target/debug/build/bitcoinconsensus-6e1dd1af27ef0a27/out/libbitcoinconsensus.a(0ad13e9c6ad06456-pubkey.o): in function `EllSwiftPubKey::Decode() const':
          /rust-bitcoinconsensus/depend/bitcoin/src/pubkey.cpp:355: undefined reference to `secp256k1_ellswift_decode'
          collect2: error: ld returned 1 exit status

I am not sure why it's not a problem when compiling using cargo test, but the code does reference this function, so the module should be enabled.

When running `cargo tarpaulin` (for test coverage) in a project that
depends on this crate, compilation fails with:

```
= note: /usr/bin/ld: /rust-bitcoinconsensus/target/debug/build/bitcoinconsensus-6e1dd1af27ef0a27/out/libbitcoinconsensus.a(0ad13e9c6ad06456-pubkey.o): in function `EllSwiftPubKey::Decode() const':
          /rust-bitcoinconsensus/depend/bitcoin/src/pubkey.cpp:355: undefined reference to `secp256k1_ellswift_decode'
          collect2: error: ld returned 1 exit status

```

I am not sure why it's not a problem when compiling using `cargo
test`, but the code does reference this function, so the module should
be enabled.
@apoelstra
Copy link
Member

Thanks! Yeah, it's super frustrating that you have to explicitly call everything before the linker will complain that the code isn't even there.

Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK d132eec

@apoelstra apoelstra merged commit 788ce4d into rust-bitcoin:master Jul 6, 2024
5 checks passed
@benma benma deleted the ellswift branch July 7, 2024 10: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