boostorg / boostorg/program_options
symbol visibility problem on macOS
- Lenguaje dominante
- C++
- Estrellas
- 136
- Forks
- 117
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
When I compile with gcc-9, gcc-10, clang-9, clang-10 or the Xcode clang I have this problem. I do not see it under Linux (Ubuntu 18 LTS):
[BUG-REPORT.txt](https://github.com/boostorg/program_options/files/4944925/BUG-REPORT.txt)
I get linkage warnings that suggest possible runtime failure
ld: warning: direct access in function '__ZN5boost10wrapexceptINS_15program_options14unknown_optionEEC1ERKS3_' from file lib/libboost_program_options.a(options_description.o)' to global weak symbol '__ZTVN5boost15program_options5errorE' from file XXX means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
What's weird is that visibility should only apply to dynamic linkage, and I have built the libraries entirely statically.
I was able to get around this by building all of boost by supplying `cxxflags="-fvisibility=default"` to b2. Probably not the right fix but make the problem go away.
Probably incomplete list of symbols causing this problem. I do not have this issue with any other Boost library I use.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Comienza con BUG-REPORT.txt y reproduce la compilación estática en macOS usando las versiones de GCC, Clang o Xcode Clang indicadas. Compara la compilación con y sin b2's cxxflags="-fvisibility=default" y comprueba las advertencias del enlazador relacionadas con los símbolos de program_options. Se considera terminado cuando las advertencias de visibilidad se hayan resuelto sin depender de esa solución alternativa.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- cpp
- Área
- build-system, compilers
- 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