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

Enable QR code library in C SDK bindings. #182

Merged
merged 6 commits into from
Aug 29, 2024
Merged

Enable QR code library in C SDK bindings. #182

merged 6 commits into from
Aug 29, 2024

Conversation

agrojean-ledger
Copy link
Contributor

Compilation fails with a rust-lld: error: undefined symbol: memchr error.

To reproduce

  • Spawn a ledger-app-dev-tools Docker container and open a terminal inside it.
  • git clone https://github.com/LedgerHQ/ledger-device-rust-sdk.git
  • git checkout enable-qrcode
  • rustup default nightly-2023-11-10-x86_64-unknown-linux-musl
  • cd ledger_device_sdk/
  • cargo run --target stax.json --package ledger_device_sdk --example nbgl_generic_review

@agrojean-ledger agrojean-ledger marked this pull request as draft August 22, 2024 08:46
@yogh333
Copy link
Contributor

yogh333 commented Aug 23, 2024

For information, modifying link_wrap.sh as following:

diff --git a/ledger_device_sdk/link_wrap.sh b/ledger_device_sdk/link_wrap.sh
index 31f6cb7..7ba635c 100755
--- a/ledger_device_sdk/link_wrap.sh
+++ b/ledger_device_sdk/link_wrap.sh
@@ -7,7 +7,7 @@ set -x
 LD=${LD:-rust-lld}
 # Needed because LLD gets behavior from argv[0]
 LD=${LD/-ld/-lld}
-${LD} "$@" --emit-relocs
+${LD} "$@" --emit-relocs -L /usr/arm-none-eabi/lib/ -lc

seems to solve the issue 🤔
Needs to be further investigated...

@agrojean-ledger
Copy link
Contributor Author

@yogh333 you need to bump sdk versions.

@yogh333 yogh333 marked this pull request as ready for review August 29, 2024 15:21
@yogh333 yogh333 merged commit 944818d into master Aug 29, 2024
43 checks passed
@yogh333 yogh333 deleted the enable-qrcode branch August 29, 2024 15:35
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