Patch the "SONAME" when building for Android
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 38/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- android, typescript
- Domaine
- build-system, mobile
Piste de recherche
Commencez par les TODOs dans packages/host/src/node/prebuilds/android.ts et packages/host/src/node/cli/android.ts, puis suivez la manière dont les bibliothèques Android sont renommées et installées. Vérifiez les métadonnées ELF résultantes pour les bibliothèques renommées comme pour leurs dépendances ; le travail est terminé lorsque les entrées SONAME et DT_NEEDED font référence à des noms de fichiers qui existent réellement après le build.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
When we're building for Android we rename the dynamic library files but, we don't update the SONAME which should be updatable by running /toolchains/llvm/prebuilt//bin/llvm-objcopy --set-soname=libnewname.so liboriginal.so
The two TODOs in the tree that track this
Adding permalinks (against 29a527d) since both halves of the renaming problem are marked in the source but only the first was described above.
1. The renamed library's own SONAME — prebuilds/android.ts copies the library to lib<name>.so and leaves its install path pointing at the pre-rename name:
This is what the issue describes — llvm-objcopy --set-soname.
2. The DT_NEEDED entries of libraries that depend on a renamed one — the companion problem, marked separately in cli/android.ts:
Fixing only the SONAME is not enough when one addon links against another: the dependent library's DT_NEEDED still names the original library, so the dynamic linker looks for a file that no longer exists under that name. llvm-objcopy does not rewrite DT_NEEDED; patchelf --replace-needed <old> <new> does, or the entries can be patched directly.
Both are the same underlying cause — we rename files after the linker has already baked the old names into the ELF headers — so they are probably best fixed together.
- Langage dominant
- TypeScript
- Étoiles
- 188
- Forks
- 10
- Merge moyen
- 2 j 17 h
- PR mergées (30 j)
- 3
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de callstackincubator/react-native-node-api
-
Android 🤖
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
-
Sanity check of Hermes source directory via environment variable, when building Android projects OuverteAndroid 🤖 good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
callstackincubator/react-native-node-api#163 · 1 commentaire ·
-
enhancement good first issue gyp-to-cmake
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
callstackincubator/react-native-node-api#161 · 3 commentaires · 1 réaction ·
-
enhancement Host 🏡
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
-
Automatable good first issue
Difficulté 3/5 1-2 jours Accessibilité débutants 15/100
callstackincubator/react-native-node-api#424 · 1 commentaire ·
Toutes les issues de callstackincubator/react-native-node-api
Issues similaires
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
-
Mend: dependency security vulnerability untriaged
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100