libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch #10393] Fix shared library support on Android


From: Bruno Haible
Subject: Re: [patch #10393] Fix shared library support on Android
Date: Wed, 17 Jan 2024 01:12:59 +0100

Roumen Petrov wrote:
> Android and Microsoft windows must not encode any paths.

You probably mean to say: Shared libraries packaged in Android .apk
files are mentioned in the Android manifest file (elements <uses-library>
and <uses-native-library>) [1] and therefore don't need a RUNPATH.

But shared libraries created in the Termux environment are a different
case, and they do need a RUNPATH, as I explained in the previous mail.

> When I build PKIX-SSH and OpenSSL binaries I must ensure that those libraries 
> and executable could run in any Android profile.
> The packages are "SecureBox Pro" or SecureBox as add-on to "TermOne Plus".
> PKIX-SSH binaries use ldns as resolver library. This library uses libtool.

Again: If you want a certain binary that you build to have no RUNPATH, use the
Android SDK, not Termux and not libtool. Or use libtool outside of Termux
and don't provide a -R option.

> Also to ensure that binaries runs on support API levels elf-cleaner is should 
> be run to "strip" certain sections.

You mean [2] or [3]? I think this is out of scope for libtool, because:
  - As far as I understand, it applies to both shared libraries and
    executables, and since executables can be created without using libtool,
    the right place to invoke these tools are not in libtool.
  - As you say, it depends on the minimum supported Android API level, which
    is a priori known to the Makefile and to the compiler (via '-target'
    options), but not known to libtool.

Bruno

[1] https://developer.android.com/guide/topics/manifest/manifest-intro
[2] https://github.com/kost/android-elf-cleaner
[3] https://github.com/termux/termux-elf-cleaner






reply via email to

[Prev in Thread] Current Thread [Next in Thread]