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

Building for aarch #96

Closed
edshamis opened this issue Oct 16, 2022 · 2 comments
Closed

Building for aarch #96

edshamis opened this issue Oct 16, 2022 · 2 comments

Comments

@edshamis
Copy link

I'm trying to build from Termux on Android bad get this

src/pwcache.c:52:18: error: incompatible integer to pointer conversion initializing 'struct passwd *' with an expression of type 'int' [-Wint-conversion]
                struct passwd *ent = getpwent();

uname -a

Linux localhost 4.14.180-perf-ge2a1322887a5 #1 SMP PREEMPT Mon Mar 28 19:47:44 CST 2022 aarch64 Android

Any help would be appreciated

@tavianator
Copy link
Owner

Android only defines getpwent() on API level 26 and above. statx() needs 30 or above. So since 84c672b, this works for me on Termux

~/code/bfs $ make EXTRA_CFLAGS="--target=aarch64-unknown-linux-android30"

statx() isn't absolutely necessary, so I could make it work on Android 26 if there's interest.

@tavianator
Copy link
Owner

eb47b3c fixes the Android build for API level 26. The tests don't run yet because SELinux blocks hard links on recent Android versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants