From 2a826e7fc80eeee82f5d44f022ea23319e7772f1 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 20 Jan 2014 11:15:10 -0800 Subject: [PATCH] fix linux linking order in python bindings --- bindings/python/build.py | 6 +++++- src/build.py | 3 --- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/bindings/python/build.py b/bindings/python/build.py index 757da6e56..5544fd5ab 100644 --- a/bindings/python/build.py +++ b/bindings/python/build.py @@ -55,6 +55,11 @@ link_all_libs = env['LINKING'] == 'static' or env['RUNTIME_LINK'] == 'static' or if link_all_libs: py_env.AppendUnique(LIBS=env['LIBMAPNIK_LIBS']) +# even though boost_thread is no longer used in mapnik core +# we need to link in for boost_python to avoid missing symbol: _ZN5boost6detail12get_tss_dataEPKv / boost::detail::get_tss_data +py_env.AppendUnique(LIBS = 'boost_thread%s' % env['BOOST_APPEND']) + +# note: on linux -lrt must be linked after thread to avoid: undefined symbol: clock_gettime if env['RUNTIME_LINK'] == 'static' and env['PLATFORM'] == 'Linux': py_env.AppendUnique(LIBS='rt') @@ -177,7 +182,6 @@ if 'uninstall' not in COMMAND_LINE_TARGETS: py_env.ParseConfig('pkg-config --cflags pycairo') py_env.Append(CPPDEFINES = '-DHAVE_PYCAIRO') -py_env.AppendUnique(LIBS = 'boost_thread%s' % env['BOOST_APPEND']) py_env.Append(LINKFLAGS=python_link_flag) _mapnik = py_env.LoadableModule('mapnik/_mapnik', sources, LDMODULEPREFIX='', LDMODULESUFFIX='.so') diff --git a/src/build.py b/src/build.py index 77ccbcc72..ef6e7639d 100644 --- a/src/build.py +++ b/src/build.py @@ -86,9 +86,6 @@ if len(env['EXTRA_FREETYPE_LIBS']): lib_env['LIBS'].append('xml2') lib_env['LIBS'].append('z') -#if env['THREADING'] == 'multi': -# lib_env['LIBS'].append('boost_thread%s' % env['BOOST_APPEND']) - if '-DBOOST_REGEX_HAS_ICU' in env['CPPDEFINES']: lib_env['LIBS'].append('icui18n')