Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Patch the "SONAME" when building for Android

Offen
#14 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

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

Android 🤖 CMake RN good first issue

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 SONAMEprebuilds/android.ts copies the library to lib<name>.so and leaves its install path pointing at the pre-rename name:

https://github.com/callstackincubator/react-native-node-api/blob/29a527d87fa8cb965b0048b1b4c1cff2b0eab281/packages/host/src/node/prebuilds/android.ts#L62-L65

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:

https://github.com/callstackincubator/react-native-node-api/blob/29a527d87fa8cb965b0048b1b4c1cff2b0eab281/packages/host/src/node/cli/android.ts#L46-L52

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

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus callstackincubator/react-native-node-api

Alle Issues in callstackincubator/react-native-node-api

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.