Closed shawmat closed 7 years ago
I get exactly the same error with the same boost and gcc version. Any help would be appreciated.
@shawmat @fredd2409 - could you try building using scons directly to see your compiler flags
./scons/scons.py install -j4
For the record I was be able to build mapnik (latest master) on ubuntu 16.04
g++-6 (Ubuntu 6.2.0-3ubuntu11~16.04) 6.2.0 20160901
boost 1.63
on docker
image using 2gb ram
/cc @shawmat @fredd2409
Hi Artem
Thanks for responding. My steps just now were:
Revert Makefile to original
make clean
< clear up what I was doing before
./scons/scons.py install -j4
The build still fails. The text is attached.
@shawmat - your compile flags look good to me. Did you compile boost with the same compiler?
Also, what do you get from
c++ --version
?
Boost wasn't compiled by me. I downloaded and unpacked boost_1_63_0.tar.bz2 from the Boost site. Ubuntu comes with 1.58 so I had to move that out of the way. It may not be the correct approach but the fact that every other part of Mapnik builds led me to think Boost was not the problem.
c++ (Ubuntu 6.2.0-3ubuntu11~16.04) 6.2.0 20160901 Copyright (C) 2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I had actually compiled boost with gcc-5 and only installed gcc-6 after another issue mentioned here. I'll try to recompile boost now with gcc-6 and see what happens.
EDIT: Unfortunately, the error is still the same. @artemp
c++ --version ?
We should totally print this at the start of every build, unconditionally, so that it's in every report.
@lightmare 👍 ^
4d57fb1a6c2bd0894cf0538717a34ae67377b528 adds CXX --version
print out during configure.
c++ --version: c++ (Ubuntu 6.2.0-3ubuntu11~16.04) 6.2.0 20160901
gcc --version: gcc (Ubuntu 6.2.0-3ubuntu11~16.04) 6.2.0 20160901
g++ --version: g++ (Ubuntu 6.2.0-3ubuntu11~16.04) 6.2.0 20160901
And attached is the output when running ./scons/scons.py install -j4
Can confirm with boost 1.63 / g++-6 (Ubuntu 6.3.0-8ubuntu1) 6.3.0 20170221 It's this exclusion of boost >= 1.63
@lightmare - interesting ^. At least on docker ubuntu 16.04 I can compile with un-patched boost-1.63 g++-6 . I wonder what's different ..
Ok I'm using g++-6 (Ubuntu 6.2.0-3ubuntu11~16.04) 6.2.0 20160901
I'll try 6.3
I'm confused I'm getting :
include/mapnik/wkt/wkt_grammar_x3_def.hpp:34:8: error: redefinition of 'struct boost::spirit::x3::traits::is_substitute<T&, Attribute&, Enable>'
struct is_substitute<T&, Attribute&, Enable>
...
/opt/boost_1_63/include/boost/spirit/home/x3/support/traits/is_substitute.hpp:101:12: error: previous definition of 'struct boost::spirit::x3::traits::is_substitute<T&, Attribute&, Enable>'
struct is_substitute<T&, Attribute&, Enable>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scons: *** [src/wkt/wkt_grammar_x3.o] Error 1
scons: building terminated because of errors.
when I'm removing check for boost version. /cc @lightmare @shawmat @fredd2409
@artemp @fredd2409 @lightmare After a few days away, I've attempted a new build. With no config changes at my end, this particular problem seems to have been fixed - thank you. However the build now fails further on, and I have created a new issue for it. "Harfbuzz failure #3642". I'll see if I can work around it.
There seems to be a problem building \src\wkt\wkt_grammar_x3
I am using Ubuntu 16.04, Boost 1.63, GCC6.2 and Python 2.7.12. Memory is 6Gb. Mapnik was cloned from git today (3rd March 2017).
./configure passes. Running "make" initially looks OK. The following steps succeed:
c++ -o src/renderer_common/render_group_symbolizer.os c++ -o src/renderer_common/render_markers_symbolizer.os c++ -o src/renderer_common/render_thunk_extractor.os c++ -o src/json/generic_json_grammar_x3.o c++ -o src/json/mapnik_geometry_to_geojson.o c++ -o src/json/mapnik_json_generator_grammar.o c++ -o src/json/mapnik_feature_to_geojson.o c++ -o src/json/topojson_grammar_x3.o c++ -o src/json/feature_from_geojson.o c++ -o src/json/parse_feature.o c++ -o src/json/extract_bounding_boxes_x3.o c++ -o src/json/feature_grammar_x3.o c++ -o src/json/unicode_string_grammar_x3.o c++ -o src/json/geometry_from_geojson.o c++ -o src/json/geojson_grammar_x3.o c++ -o src/json/positions_grammar_x3.o ar rc src/json/libmapnik-json.a ranlib src/json/libmapnik-json.a c++ -o src/wkt/wkt_factory.o c++ -o src/wkt/mapnik_wkt_generator_grammar.o
But then it exits with:
scons: [src/wkt/wkt_grammar_x3.o] Error 1 make: [src/json/libmapnik-json.a] Error 2
There are a number of error messages leading up to this.
src/wkt/wkt_grammarx3.cpp:30:1: required from here /usr/include/boost/mpl/aux/has_type.hpp:20:1: error: ambiguous template instantiation for...
src/wkt/wkt_grammarx3.cpp:30:1: required from here /usr/include/boost/mpl/aux/nested_type_wknd.hpp:26:31: error: invalid use of incomplete type...
src/wkt/wkt_grammarx3.cpp:30:1: required from here /usr/include/boost/mpl/aux/preprocessed/gcc/and.hpp:23:8: error: ‘value’ is not a member of...
/usr/include/boost/mpl/equal.hpp:56:21: error: no type named ‘type’ in...
Full make text is here: maketext.txt
Removing the following line from Makefile allows the job to go much further:
src/wkt/libmapnik-wkt.a \
But unfortunately it eventually falls over because the wkt dependencies are missing. I don't know what they're for anyway!
Can someone please advise how I can make progress? I'm not a C developer so I have no skills to actually fix this myself.