Re: Build versionless .so for Android

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Matthias Kuhn <matthias(at)opengis(dot)ch>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Build versionless .so for Android
Date: 2024-01-18 08:27:55
Message-ID: a3c831d3-71e2-4cf5-8e49-813e9281fc9b@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 14.01.24 12:37, Matthias Kuhn wrote:
> What I try to do is packaging an app with androiddeployqt which fails
> with an error:
>
> The bundled library lib/libpq.so.5 doesn't end with .so. Android only
> supports versionless libraries ending with the .so suffix.
>
> This error was introduced in response to this issue which contains hints
> about the underlying problem:
>
> https://bugreports.qt.io/plugins/servlet/mobile#issue/QTBUG-101346
> <https://bugreports.qt.io/plugins/servlet/mobile#issue/QTBUG-101346>

I think the scenario there is using dlopen(), possibly via Qt, possibly
via Java, so it's a very specific scenario, not necessarily indicative
of a general requirement on Android, and apparently not using build-time
linking. It's quite conceivable that this issue would also exist with
Qt on other platforms.

As I mentioned before, Meson has Android support. Some people there
clearly thought about it. So I suggest you try building PostgreSQL for
your Android environment using Meson and see what it produces.(*) If
the output files are the same as the autoconf/make build, then I would
think your scenario is nonstandard. If the output files are different,
then we should check that and consider changes to get them to match.

It's of course possible that Meson is wrong, too, but then we need to
have a broader analysis, because the implicit goal is to keep the two
build systems for PostgreSQL consistent.

(*) - This means specifically that the installation trees produced by
"make install-world-bin" and "meson install" should produce exactly the
same set of files (same names in the same directories, not necessarily
the same contents).

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2024-01-18 08:33:16 Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)
Previous Message Kyotaro Horiguchi 2024-01-18 08:26:31 Re: Network failure may prevent promotion