mason
mason copied to clipboard
Please use the system default c++ ABI
The mason build of mapnik fails to link against mason-built boost libraries on Debian stretch and probably on other modern linux distros with GCC 6 based toolchain. The reason is this snippet on the build script
if [[ $(uname -s) == 'Linux' ]]; then
echo "CUSTOM_LDFLAGS = '${LDFLAGS} -Wl,-z,origin -Wl,-rpath=\\\$\$ORIGIN/../lib/ -Wl,-rpath=\\\$\$ORIGIN/../../'" > config.py
echo "CUSTOM_CXXFLAGS = '${CXXFLAGS} -D_GLIBCXX_USE_CXX11_ABI=0'" >> config.py
else
...
which sets _GLIBCXX_USE_CXX11_ABI=0, where the default in modern systems is to use the c++11 ABI, i.e. to set this to '1'.
A bit more fine-grained conditional than just checking for the OS kernel would be useful here. The only one I can think of right now is to check if the compiler is GCC and its version is >=6, but there is probably a more clever way.
Grepping for GLIBCXX_USE_CXX11_ABI also shows that this problem is present also in the or-tools-6.0 build script.
This is probably related to #319.
And related with https://github.com/mapnik/python-mapnik/issues/103#issuecomment-323389662