macOS linker warnings in macOS ventura
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 77.2k
- Forks
- 36k
- Merge medio
- 1 d 9 h
- PR fusionados (30 d)
- 558
Descripción
Turns out ld shipped with Xcode 14+ emits a warning when using -undefined dynamic_lookup.`
ld: warning: -undefined dynamic_lookup may not work with chained fixups
Some investigation reveals that in fact -undefined dynamic_lookup doesn't work when:
- Link a shared library with the option
- Link it with a program that uses the chained-fixup introduced from macOS 12 and iOS 15
This is because -undefined dynamic_lookup uses lazy-bindings and they won't be bound while dyld fixes-up by traversing chained-fixup info.
However, we build extension modules with as bundles (-bundle) and they are loaded only through
dlopen, so it's safe to use -undefined dynamic_lookup in theory. So the warning produced by ld64 is
likely to be a false-positive.
ld64 also provides the -bundle_loader <executable> option, which allows resolving symbols defined in the executable symbol table while linking. It behaves almost the same with -undefined dynamic_lookup, but it makes the following changes:
- Require that unresolved symbols among input objects must be defined in the executable.
- Lazy symbol binding will lookup only the symbol table of the bundle loader executable. (
-undefined dynamic_lookuplookups all symbol tables as flat namespace)
See "New Features" subsection under "Linking" section for chained fixup
developer.apple.com/documentation/xcode-release-notes/xcode-13-release-notes for more information.
Also, check the same problem in ruby where most of this information is taken from.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
No se nombran archivos, pruebas ni puntos de entrada. Empieza por localizar la configuración del enlazador de CPython para módulos de extensión de macOS y los usos de -undefined dynamic_lookup; compara el comportamiento actual con la opción -bundle_loader de ld64. Se considera terminado cuando se haya abordado la advertencia de Ventura/Xcode 14+ sin romper la carga de módulos de extensión.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- macos, python
- Área
- build-system, operating-systems
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 35/100