Bug#791482: mapnik: ftbfs, "please upgrade your compiler to at least g++ 4.7"

James Cowgill james410 at cowgill.org.uk
Mon Jul 6 21:35:03 UTC 2015


Control: severity -1 important
Control: retitle -1 mapnik: incorrectly handles CPPFLAGS

On Sun, 5 Jul 2015 17:04:05 +0200 Holger Levsen <holger at layer-acht.org> wrote:
> Source: mapnik
> Version: 3.0.0~rc3+ds-2
> Severity: serious
> x-debbugs-cc: reproducible-builds at lists.alioth.debian.org
> User: reproducible-builds at lists.alioth.debian.org
> Usertags: ftbfs
> 
> Dear Maintainer,
> 
> mapnik fails to build from source in sid, as can be seen at 
> https://reproducible.debian.net/rbuild/unstable/amd64/mapnik_3.0.0~rc3+ds-2.rbuild.log
> 
> Quoting that log:
> 
> Welcome to Mapnik...
> 
> Configuring build environment...
> Configuring on Linux in *release mode*...
> Checking for freetype-config... yes
> Checking for xml2-config... yes
> Checking for dlfcn.h support ... no
> Checking if compiler (c++) supports -std=c++11 flag... (cached) no
> C++ compiler does not support C++11 standard (-std=c++11), which is 
> required. Please upgrade your compiler to at least g++ 4.7 (ideally 4.8)
> debian/rules:28: recipe for target 'debian/stamps/configure-python' failed
> make[1]: *** [debian/stamps/configure-python] Error 1
> make[1]: Leaving directory '/tmp/buildd/mapnik-3.0.0~rc3+ds'
> debian/rules:58: recipe for target 'build' failed

I couldn't reproduce this in a clean unstable chroot.

However I could reproduce the build failure from the rbuild by running
scons manually with the arguments from it. It appears that mapnik
incorrectly handles the CPPFLAGS variable - the addition of -Wdate-time
in the reproducible builds caused the build failure.

Running scons gives this in config.log:
c++ -o .sconf_temp/conftest_3.o -c -std=c++11 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -g0 "-D-Wdate-time -D_FORTIFY_SOURCE=2 -g0" -DSHAPE_MEMORY_MAPPED_FILE -Iinclude -I/usr/include -I/usr/include/freetype2 -I/usr/include/libxml2 .sconf_temp/conftest_3.cpp
<command-line>:0:1: error: macro names must be identifiers

The '-D-Wdate-time' comes from adding CPPFLAGS to the CUSTOM_DEFINES
variable in debian/rules. SCons prefixes everything in this variable
with -D so it is not suitable for CPPFLAGS. I suggest you append
CPPFLAGS to both CUSTOM_CFLAGS and CUSTOM_CXXFLAGS instead.

Thanks,
James
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-grass-devel/attachments/20150706/ba78a23e/attachment.sig>


More information about the Pkg-grass-devel mailing list