Patch the "SONAME" when building for Android
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 38/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- android, typescript
- Domínio
- build-system, mobile
Direção de pesquisa
Comece pelos TODOs em packages/host/src/node/prebuilds/android.ts e packages/host/src/node/cli/android.ts e, em seguida, rastreie como as bibliotecas Android são renomeadas e instaladas. Verifique os metadados ELF resultantes tanto para as bibliotecas renomeadas quanto para suas dependentes; está concluído quando as entradas SONAME e DT_NEEDED fizerem referência a nomes de arquivo que realmente existam após o build.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- TypeScript
- Estrelas
- 188
- Forks
- 10
- Merge médio
- 2d 17h
- PRs com merge (30d)
- 3
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de callstackincubator/react-native-node-api
-
Android 🤖
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
-
Sanity check of Hermes source directory via environment variable, when building Android projects AbertaAndroid 🤖 good first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
callstackincubator/react-native-node-api#163 · 1 comentário ·
-
enhancement good first issue gyp-to-cmake
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
callstackincubator/react-native-node-api#161 · 3 comentários · 1 reação ·
-
enhancement Host 🏡
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
-
Automatable good first issue
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 15/100
callstackincubator/react-native-node-api#424 · 1 comentário ·
Todas as issues de callstackincubator/react-native-node-api
Issues semelhantes
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 85/100
-
Mend: dependency security vulnerability untriaged
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100