termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
13.19k stars 3.03k forks source link

[Bug]: CANNOT LINK EXECUTABLE "gdalinfo": library "libwebp.so" #12611

Closed riveryeti closed 1 year ago

riveryeti commented 1 year ago

Problem description

Installing gdal with pkg install gdal after pkg upgrade && pkg update I still get this error:

CANNOT LINK EXECUTABLE "gdalinfo": library "libwebp.so" not found: needed by /data/data/com.termux/files/usr/lib/libgdal.so in namespace (default)

What steps will reproduce the bug?

pkg install gdal gdalinfo --version

What is the expected behavior?

Print gdalinfo version

System information

termux-info:

Termux Variables:
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=696
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://packages.termux.dev/apt/termux-main stable main
Updatable packages:
All packages up to date
termux-tools version:
1.31.0
Android version:
12
Kernel build information:
Linux localhost 4.14.113-24706840 #1 SMP PREEMPT Fri Jul 29 15:12:47 KST 2022 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-G975N
xtkoba commented 1 year ago

A workaround is to pkg in libwebp.

For devs: this is so-called automagic dependencies, a common packaging error. In CI, libwebp is pulled in as a dependency of libjxl-progs, a subpackage of libjxl which gdal depends on. So even a single rebuild of gdal in CI makes it depend on libwebp automagically. As gdal does not depend on libjxl-progs either directly or indirectly, it is not pulled in by pkg in gdal.

2096779623 commented 1 year ago

Adding libwebp to TERMUX_PKG_DEPENDS solved the problem, if updated to the latest version it would encounter build errors.

https://github.com/2096779623/termux-packages/actions/runs/3350673054/jobs/5551632892#step:6:1680

I think it is possible to link this to solve this problem.

riveryeti commented 1 year ago

Thanks for the quick fix! Thanks to y'all I was able to build a VRT pointing to a remote cloud-optimized geotiff (COG) all from the comfort of my phone!