scons: fully workaround potential compile error with gcc/boost 1.42/ubuntu relating to interprocess bug - refs #1001 and #950

This commit is contained in:
Dane Springmeyer 2012-01-08 17:21:04 -08:00
parent 5b167b4fa2
commit e9bb5666e7
2 changed files with 15 additions and 1 deletions

View file

@ -1146,7 +1146,7 @@ if not preconfigured:
if not env['BOOST_VERSION']: if not env['BOOST_VERSION']:
env['MISSING_DEPS'].append('boost version >=%s' % BOOST_MIN_VERSION) env['MISSING_DEPS'].append('boost version >=%s' % BOOST_MIN_VERSION)
else: 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): for count, libinfo in enumerate(BOOST_LIBSHEADERS):
if not conf.CheckLibWithHeader('boost_%s%s' % (libinfo[0],env['BOOST_APPEND']), libinfo[1], 'C++'): if not conf.CheckLibWithHeader('boost_%s%s' % (libinfo[0],env['BOOST_APPEND']), libinfo[1], 'C++'):

View file

@ -194,6 +194,20 @@ if env['RENDERING_STATS']:
else: else:
source.insert(0,processor_cpp); 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']: if env['JPEG']:
source += Split( source += Split(
""" """