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

Fix android builds of statusgo for ndk r26b #2

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

siddarthkay
Copy link

@siddarthkay siddarthkay commented Sep 18, 2024

Summary

This PR fixes a build error which was generated after we upgraded our Android NDK from 25.2.9519653 to 26.1.10909125

Building status-go for: android/arm,android/arm64,android/386
/nix/store/c9v1brjfqvk8pag8gglwgk7whv5z8ng5-gomobile-unstable-2022-05-18/bin/gomobile: 
go build -tags gowaku_skip_migrations,gowaku_no_rln -ldflags -X github.com/status-im/status-
go/params.GitCommit=b866640dc56471846f530e907d50a1df6df13ae0 -X 
github.com/status-im/status-go/params.IpfsGatewayURL=https://ipfs.status.im/ -X
 github.com/status-im/status-go/params.Version=0.186.0 -s -w -buildid= -buildmode=c-shared 
 -o=/private/tmp/nix-build-status-go-0.186.0-b866640-android.drv-0/gomobile-work/android/src/main/
 jniLibs/arm64-v8a/libgojni.so ./gobind failed: exit status 1

# github.com/status-im/status-go/vendor/github.com/mutecomm/go-sqlcipher/v4
aesce.c:194:18: error: always_inline function 'vaesimcq_u8' requires target feature 'aes', 
but would be inlined into function 'mbedtls_aesce_inverse_key' that is compiled without support for 'aes'

The following functions need to be compiled with target for both as aes and crypto :

  • aesce_encrypt_block
  • aesce_decrypt_block
  • aes_sub_word
  • mbedtls_aesce_inverse_key

related status-go PR : status-im/status-go#5844

The following functions need to target both as aes and crypto :
- aesce_encrypt_block
- aesce_decrypt_block
- aes_sub_word
- mbedtls_aesce_inverse_key
@siddarthkay siddarthkay force-pushed the fix-android-statusgo-for-ndk-r26b branch from 27b9c50 to 848aa0a Compare September 18, 2024 02:54
@jakubgs
Copy link
Member

jakubgs commented Sep 19, 2024

How did you find that out?

@siddarthkay
Copy link
Author

@jakubgs : mostly by fixing the target error for aes and the after rebuilding the error would change for missing crypto target for these functions.
For explicitly setting the compile target for these functions I had referred to this useful info in clang docs -> https://clang.llvm.org/docs/AttributeReference.html#target

@siddarthkay siddarthkay merged commit abfb97b into master Sep 20, 2024
@jakubgs jakubgs deleted the fix-android-statusgo-for-ndk-r26b branch September 24, 2024 06:14
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.

4 participants