Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Patch the "SONAME" when building for Android

Abierto
#14 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
38/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
android, typescript

Línea de trabajo

Comienza con los TODOs de packages/host/src/node/prebuilds/android.ts y packages/host/src/node/cli/android.ts, y luego sigue el proceso de renombrado e instalación de las bibliotecas de Android. Verifica los metadatos ELF resultantes tanto para las bibliotecas renombradas como para sus dependientes; se considera terminado cuando las entradas SONAME y DT_NEEDED hacen referencia a nombres de archivo que realmente existen después del build.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
188
Forks
10
Merge medio
2 d 17 h
PR fusionados (30 d)
3

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de callstackincubator/react-native-node-api

Todos los issues de callstackincubator/react-native-node-api

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.