From e9bb5666e71720df63d302ad6aede8fbc59883c9 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Sun, 8 Jan 2012 17:21:04 -0800 Subject: [PATCH] scons: fully workaround potential compile error with gcc/boost 1.42/ubuntu relating to interprocess bug - refs #1001 and #950 --- SConstruct | 2 +- src/build.py | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index d9a237de9..256508aa7 100644 --- a/SConstruct +++ b/SConstruct @@ -1146,7 +1146,7 @@ if not preconfigured: if not env['BOOST_VERSION']: env['MISSING_DEPS'].append('boost version >=%s' % BOOST_MIN_VERSION) else: - color_print(4,'Found boost lib version... %s' % boost_lib_version_from_header ) + color_print(4,'Found boost lib version... %s' % env.get('BOOST_LIB_VERSION_FROM_HEADER') ) for count, libinfo in enumerate(BOOST_LIBSHEADERS): if not conf.CheckLibWithHeader('boost_%s%s' % (libinfo[0],env['BOOST_APPEND']), libinfo[1], 'C++'): diff --git a/src/build.py b/src/build.py index 70abcbea3..f3f6f42a7 100644 --- a/src/build.py +++ b/src/build.py @@ -194,6 +194,20 @@ if env['RENDERING_STATS']: else: source.insert(0,processor_cpp); +if env.get('BOOST_LIB_VERSION_FROM_HEADER'): + boost_version_from_header = int(env['BOOST_LIB_VERSION_FROM_HEADER'].split('_')[1]) + if boost_version_from_header < 46: + # avoid ubuntu issue with boost interprocess: + # https://github.com/mapnik/mapnik/issues/1001 + env4 = lib_env.Clone() + env4.Append(CXXFLAGS = '-fpermissive') + cpp ='mapped_memory_cache.cpp' + source.remove(cpp) + if env['LINKING'] == 'static': + source.insert(0,env4.StaticObject(cpp)) + else: + source.insert(0,env4.SharedObject(cpp)) + if env['JPEG']: source += Split( """