Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

symbol visibility problem on macOS #98

Open
dvhwgumby opened this issue Jul 20, 2020 · 1 comment
Open

symbol visibility problem on macOS #98

dvhwgumby opened this issue Jul 20, 2020 · 1 comment

Comments

@dvhwgumby
Copy link

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

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.

@sarrow104
Copy link

same problem with vcpkg and boost 1.78

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants