-
Notifications
You must be signed in to change notification settings - Fork 101
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
Android prebuilds? #38
Comments
I guess these would need to use the bionic libc and be cross-compiled for ARMv7 and ARM64v8. Happy to accept a PR with Dockerfiles that create suitable cross-build environments for this. |
Works for me! Out of curiosity, I've noticed that lots of other projects use prebuild, which maintains its own Dockerfiles for a bunch of platforms -- is that something you've explored, or would be interested in using? |
sharp already uses prebuild, this repo is to prebuild libvips for sharp, but we might be able to use the same base images it uses though - see https://github.com/dockcross/dockcross |
Note that supporting Android devices would require libvips to be cross-compiled with an Android-compatible toolchain such as NDK. It looks like Termux has succeeded in this, see PR termux/termux-packages#6325. fwiw, as an experiment I tried to reuse the Linux ARM64v8 glibc binaries on Android (with Xamarin), but that doesn't seem to work. Details<ItemGroup>
<PackageReference Include="NetVips" Version="2.0.0" ExcludeAssets="Compile" GeneratePathProperty="true" />
<PackageReference Include="NetVips.Native.linux-arm64" Version="8.10.6" GeneratePathProperty="true" />
</ItemGroup>
<ItemGroup>
<!-- Use the Linux variant of NetVips on Android -->
<Reference Include="NetVips">
<HintPath>$(PkgNetVips)\runtimes\linux\lib\netstandard2.0\NetVips.dll</HintPath>
</Reference>
<!-- Include libvips ARM64v8-A glibc as native Android library -->
<AndroidNativeLibrary Include="$(PkgNetVips_Native_linux-arm64)\runtimes\linux-arm64\native\libvips.so.42">
<Abi>arm64-v8a</Abi>
</AndroidNativeLibrary>
</ItemGroup>
|
Hi there! I'd like to run Sharp on Android, but Android doesn't support libvips by default. I've tried to install libvips via Termux, but the package hasn't been ported. Would you be opening to creating prebuilds for Android? I saw this workaround, but I'm concerned about compatibility (for Sharp and other native modules).
Thanks!
The text was updated successfully, but these errors were encountered: