From 801a92c99f4ca5cce9287e681845d7b882ed716c Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 19 Feb 2015 23:12:07 -0800 Subject: [PATCH] occi: defer symbol resolution till runtime for osx --- plugins/input/occi/build.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/input/occi/build.py b/plugins/input/occi/build.py index 1e8cb5ac9..4db36eb6d 100644 --- a/plugins/input/occi/build.py +++ b/plugins/input/occi/build.py @@ -43,6 +43,16 @@ libraries.append(env['ICU_LIB_NAME']) if env['PLUGIN_LINKING'] == 'shared': libraries.append(env['MAPNIK_NAME']) + # libocci.dylib, at least for 11.2 links to libstdc++ + # so we defer symbol resolution to runtime in order to + # dodge linking errors like + # Undefined symbols for architecture x86_64: + # "std::string::_Rep::_M_destroy(std::allocator const&)", referenced from: + # RegisterClasses(oracle::occi::Environment*) in spatial_classesm.os + + if env['PLATFORM'] == 'Darwin': + plugin_env.Append(LINKFLAGS='-undefined dynamic_lookup') + TARGET = plugin_env.SharedLibrary('../%s' % PLUGIN_NAME, SHLIBPREFIX='', SHLIBSUFFIX='.input',