Skip to content

Fix/android 16kb alignment - #67

Closed
danielealbano wants to merge 2 commits into
ngrok:mainfrom
danielealbano:fix/android-16kb-alignment
Closed

Fix/android 16kb alignment#67
danielealbano wants to merge 2 commits into
ngrok:mainfrom
danielealbano:fix/android-16kb-alignment

Conversation

@danielealbano

Copy link
Copy Markdown

The newer versions of Android require 16KB native libraries, this PR update the build options in cargo for ngrok-rust to produce 16kb aligned so native libraries.

In addition mute a number of warnings.

Not sure if this PR will ever be merged but it might be useful for other people facing the same issue.

Android 15+ requires ELF shared libraries to have 16KB-aligned
PT_LOAD segments. The Rust linker defaults to 4KB alignment.
This adds the -z max-page-size=16384 linker flag for both
aarch64 and x86_64 Android targets.
Add -A dead_code and -A mismatched_lifetime_syntaxes to rustflags
for all targets. These warnings come from upstream source and
auto-generated jaffi code that we don't modify.
@bmpngrok

Copy link
Copy Markdown
Contributor

@danielealbano Would you mind rebasing on or merging main in? I think that should get CI passing, and I'm on board with this change in general

@danielealbano

Copy link
Copy Markdown
Author

Super! Sure thing but will do the same change on a different pr, I am using this branch / commit as submodule.
I integrated ngrok in my android remote control mcp server 💪

@bmpngrok

Copy link
Copy Markdown
Contributor

That's fine with me. Should I close this one then @danielealbano , or leave it open for now?

@danielealbano

Copy link
Copy Markdown
Author

Closing it, I will try to make the new one over the weekend (I have been super busy at work 🤦).

@bmpngrok

Copy link
Copy Markdown
Contributor

No rush! I appreciate you taking the time

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