A problem of iconv for build Android glib

Hi everyone,

I’m experiencing the exact same issue described here:

I wanted to ask whether anyone has found a solution or workaround since the last update.

In my case, the problem manifests as follows:
I’m using the Conan C++ Package Manager and trying to compile GLib with Android NDK, but Meson fails to detect the iconv dependency:

Run-time dependency iconv found: NO (tried builtin and system)
../src/meson.build:2241:13: ERROR: Dependency "iconv" not found, tried builtin and system

I tried forcing Meson to use pkg-config to retrieve the dependency by patching meson.build like this:

libiconv = dependency('iconv', method: 'pkg-config')

However, it seems Meson handles the iconv dependency using library-specific fallback logic (as described in the official documentation about Meson dependencies )

../src/meson.build:2241:13: ERROR: Unsupported detection method: pkg-config, allowed methods are auto, builtin and system

Does anyone have an idea on how to overcome this issue?
If there is any additional information I can provide to help diagnose the problem, please let me know.

Thanks in advance for any guidance.

Starting with SDK 28, bionic provides iconv. If you have to target an older SDK and meson isn’t finding your own iconv, it should probably be reported to mesonbuild instead.