Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • cerbero cerbero
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 99
    • Issues 99
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 31
    • Merge requests 31
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GStreamer
  • cerberocerbero
  • Issues
  • #249

Closed
Open
Created Mar 08, 2020 by Ratchanan Srirattanamet@peat-psuwit

glib fails to compile for Android API level >=28

With target_distro_version = DistroVersion.ANDROID_PIE, glib fails to compile with error: undefined reference to 'libiconv_open' and similar messages. The reason is explained in Android's fork of glib:

Note that if you have libiconv installed in your default include search path (for instance, in /usr/local/), but don't enable it, you will get an error while compiling GLib because the iconv.h that libiconv installs hides the system iconv.

That is, glib's autodetection choose to use Android's iconv (which is available in API level >= 28), but then the compilation includes libiconv's header, which doesn't work with Android's implementation.

There're a couple ways to fix this:

  • Set option iconv to external which makes glib uses libiconv. However, it's possible that other libraries will have the same problem and may not have a similar flag (I didn't check). It also makes the bundle unnecessarily larger if one targets Android 9 and up.
  • Do not include libiconv if the target API is at least 28. However, this requires every recipe to do the same. If one recipe ever requires libiconv, glib (and potentially other libraries) will fail to build. One probably wants to add a helper to help determine that somewhere.

Thus, I open this issue to seek for the best way to solve this.

Why do I want to use API level 28? I want to make use of the NDK version of MediaCodec and SurfaceTexture. I'll file an issue on the gst-plugins-bad explain the reasoning in more detail (spoiler: libhybris).

Assignee
Assign to
Time tracking