In an attempt to limit runtime dependencies, I am using static libraries
where possible. Under OSX (10.4.4) I get the following error when I try to
link my application:
/usr/bin/ld: multiple definitions of symbol _munmap
definition of _munmap
[path-to-mpi-libs]/libopal.a(memory_darwin_component.o) definition of
_munmap in section (__TEXT,__text)
I have configured R8901 with --disable-shared and --enable-static
(I have also tried --with-memory-manager=none, with no effect).
If I understand correctly, openmpi's munmap depends on munmap being a weak
symbol. But according to nm -mg, munmap is not a weak symbol in
libSystem.dylib (a.k.a. libc.dylib). In fact there aren't any weak symbols
in this library.
It would seem that this is technically a problem with shared libraries as
well, but it would only be detected at run time because there is so much
indirection (empirically, there is no problem problem with dynamic
Any ideas on a solution to this problem?