GNU Libtool - Patches: patch #10393, Fix shared library support on...
You are not allowed to post comments on this tracker with your current authentication level.
patch #10393: Fix shared library support on Android
Submitter: | Bruno Haible <haible> | ||
Submitted: | Mon 18 Sep 2023 11:25:06 AM UTC | ||
Category: | None | Priority: | 5 - Normal |
Status: | None | Privacy: | Public |
Assigned to: | None | Open/Closed: | Open |
Attached Files
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follows 1 latest change.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2023-09-18 | haible | Attached File | - | ![]() |
Added 0001-Fix-shared-library-support-on-Android.patch, #55144 |
On Android, within the termux environment, I encountered two problems during the "make install" phase of GNU gettext. The attached patch fixes them.
1) On this platform, libtool is configured to relink libraries during "make install". This leads to a problem during the installation of libgettextsrc: The relink command that libtool emits has the form
$CC -shared -fPIC -DPIC .libs/*.o -L$(libdir) ... -lgettextlib ... -o .libs/libgettextsrc-@VERSION@.soT
The option -lgettextlib resolves to $(libdir)/libgettextlib.a, not to $(libdir)/libgettextlib-@VERSION@.so. Thus the linker attempts to include many object files from libgettextlib.a into libgettextsrc-@VERSION@.soT, but some of these reference global variables in a non-PIC way, and the linker thus complains
ld.lld: error: relocation R_ARM_REL32 cannot be used against symbol 'program_name'; recompile with -fPIC
2) The installed executables don't have a RUNPATH property that points to the directory that contains the shared libraries. Thus these executables don't run.