Mac building of the dynamic libraries
Summary
Building the dynamic libraries for opal and its python wrappers fails on the Mac. There are two issues:
- The link stage fails for the main Opal dylib due to the undefined symbols gmsg and gmsgAll. This can be fixed with the linker option '-Wl,-undefined,dynamic_lookup'
- The python wrapper dylibs are missing symbols (that are present in the *.a libraries) This can be fixed by changing the compiler option '-fvisibility=hidden' to '-fvisibility=default' The compiler option '-fvisibility-inlines-hidden' has also been specified, probably best to remove this to avoid other missing symbols in the future.
Steps to reproduce
Build on a Mac.
Note linker failure for top level Opal dylib.
Once past that, note missing OpalException symbols in the top level Opal dylib.
What is the current bug behavior?
Build fails and python import statements fail
What is the expected correct behavior?
Build succeeds and python import statements succeed.
Possible fixes
In the top level CMakeLists.txt file changes lines 103 & 104 from:
add_compile_options (-fvisibility=hidden)
add_compile_options (-fvisibility-inlines-hidden)
to:
add_compile_options (-fvisibility=default)
add_link_options("-Wl,-undefined,dynamic_lookup")