-
Notifications
You must be signed in to change notification settings - Fork 761
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
Build error with Android NDK r15c #942
Comments
The configure script definitely does test for the presence of the |
My apologies! I should have included more specifics especially since I made a mistake. I mixed some of the
Out of curiosity I removed Hopefully this is much more helpful! |
That looks like a bug in the code (presumably the |
Looks like NetBSD and FreeBSD also use |
How do I build this for Android? The Android.mk files that are in contrib/android is for the platform, not the NDK, and cmake gives me:
I could send a patch to do this either way, but I'd prefer to check that it works first... |
We went the standalone toolchain route with the NDK and use make, but our script is fairly old. In other words, if there is a newer, preferred way to build libarchive, we are not doing it. |
Ah, okay. Looking at the issues that come up with cmake, I think they can be fixed pretty easily. Unless one of you beats me to it, I can put a patch together on Monday. |
@kientzle: what's your expected minimum supported Android version? libarchive uses things like |
Also, what's the oldest NDK you want to support? If you're only supporting modern NDKs that have non-ancient headers the fix for building with cmake is to just delete some of the android specific hacks, but if you want to keep supporting pre-r15 then you'll need to keep the hacks around. |
@DanAlbert Could you tell me how to include this file during a cmake build? I'm trying to build opencv in android and this error keeps coming up. There's a patch for this in termux - https://github.com/termux/termux-packages/blob/27afd9e6656803aa3b4c96bdb4eef2add7a57337/packages/libarchive/archive.h.patch But I don't know how to make cmake use the patched library. Cmake seems to download and use this one instead. Any help? |
How to compile it ? |
@zgbilltalent you got any answer on using it in Android project? |
Which answer?No one told me,I have solved it |
Which answer?No one told me,I have solved it |
I'm in same position as you were, would like take your help. |
|
While trying to build libarchive 3.3.2 with Android NDK r15c on OS X 10.12.6, I encounter a compile issue with statvfs. NDK 15 uses the new "unified header files" by default which essentially means all header files are present from the NDK regardless of the minimum API version being compiled for.
In my case, the minimum version is API 15 (not to be confused with the NDK version) where statvfs is not available at runtime. Most of the definitions inside statvfs.h are protected with API level checks, but the header file is still visible to libarchive's configure script. Hence, this causes the later compile error since the configure script just checks for the presence of statsvfs.h.
The text was updated successfully, but these errors were encountered: