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

Compilation fails on android 5 #2805

Closed
nical opened this issue Jun 23, 2022 · 1 comment · Fixed by #2815
Closed

Compilation fails on android 5 #2805

nical opened this issue Jun 23, 2022 · 1 comment · Fixed by #2815
Labels
area: infrastructure Testing, building, coordinating issues external: upstream Issues happening in lower level APIs or platforms

Comments

@nical
Copy link
Contributor

nical commented Jun 23, 2022

Description

Older android targets do not compile anymore since the introduction of the android-properties dependency.

android-properties/src/android/mod.rs:68: error: undefined reference to '__system_property_read_callback'

Repro steps

I'm not sure how to make an android 5 build, I'll look in to it.

Extra materials

Link to the failing build on Firefox's CI: https://treeherder.mozilla.org/logviewer?job_id=382181918&repo=try&lineNumber=58241

Platform

Android 5

@cwfitzgerald cwfitzgerald added external: upstream Issues happening in lower level APIs or platforms area: infrastructure Testing, building, coordinating issues labels Jun 23, 2022
@nical
Copy link
Contributor Author

nical commented Jun 24, 2022

After some digging the conclusion is that the property symbols from the android libc have to be loaded dynamically instead of linked statically. Gecko already does that in a few places. It's important to Firefox which ships a single binary that works on old and new Android devices (the oldest supported version is 4.4 I think).
Also I'm told that it's the recommended way short of using jni.

upstream PR: miklelappo/android-properties#1

nical added a commit to nical/wgpu that referenced this issue Jun 27, 2022
The former use statically linked Android libc symbols while the latter loads them dynamically. This is required to support old and new versions of Android with the same binary. It unblocks updating wgpu in Gecko.

Fixes gfx-rs#2805.
cwfitzgerald pushed a commit that referenced this issue Jun 27, 2022
The former use statically linked Android libc symbols while the latter loads them dynamically. This is required to support old and new versions of Android with the same binary. It unblocks updating wgpu in Gecko.

Fixes #2805.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: infrastructure Testing, building, coordinating issues external: upstream Issues happening in lower level APIs or platforms
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants