Patch the "SONAME" when building for Android
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 38/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- android, typescript
- Bereich
- build-system, mobile
Rechercherichtung
Beginne mit den TODOs in packages/host/src/node/prebuilds/android.ts und packages/host/src/node/cli/android.ts und verfolge anschließend, wie Android-Bibliotheken umbenannt und installiert werden. Überprüfe die resultierenden ELF-Metadaten sowohl für die umbenannten Bibliotheken als auch für deren Abhängige; als abgeschlossen gilt dies, wenn SONAME- und DT_NEEDED-Einträge auf Dateinamen verweisen, die nach dem Build tatsächlich existieren.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 188
- Forks
- 10
- Ø Merge
- 2 T. 17 Std.
- Gemergte PRs (30 T.)
- 3
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus callstackincubator/react-native-node-api
-
Android 🤖
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
-
Sanity check of Hermes source directory via environment variable, when building Android projects OffenAndroid 🤖 good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
callstackincubator/react-native-node-api#163 · 1 Kommentar ·
-
enhancement good first issue gyp-to-cmake
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
callstackincubator/react-native-node-api#161 · 3 Kommentare · 1 Reaktion ·
-
enhancement Host 🏡
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
-
Automatable good first issue
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 15/100
callstackincubator/react-native-node-api#424 · 1 Kommentar ·
Alle Issues in callstackincubator/react-native-node-api
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
vercel-labs/just-bash#464 ·
-
looksLikeSlug() is ASCII-only, so non-Latin entity slugs (e.g. Korean) skip exact match and collapse Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
TanStack/tanstack.com#1293 ·