LedgerHQ / ledger-device-rust-sdk

Rust SDK for Ledger device applications
Apache License 2.0
44 stars 29 forks source link

Enable QR code library in C SDK bindings. #182

Closed agrojean-ledger closed 1 month ago

agrojean-ledger commented 1 month ago

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

To reproduce

yogh333 commented 1 month ago

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 commented 1 month ago

@yogh333 you need to bump sdk versions.