Bug 1411142 - Compilation of mod_tile form source failed by error in mapnik-devel file
Summary: Compilation of mod_tile form source failed by error in mapnik-devel file
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: mapnik
Version: 25
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Tom Hughes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-08 19:17 UTC by Sebastian Krieg
Modified: 2017-01-08 19:50 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-01-08 19:46:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github #132 0 None None None 2017-01-08 19:17:24 UTC

Description Sebastian Krieg 2017-01-08 19:17:24 UTC
Description of problem:

Compiling the apache mod_file failed by error in source code of mapnik-devel file /usr/include/mapnik/mapbox/variant.hpp

Version-Release number of selected component (if applicable):
- mapnik-devel 3.0.12-1.fc25
- mod_tile from github


How reproducible:
Download and compile the apache mod_tile from github.

Steps to Reproduce:
1. Basics: f25 installation and all dependencies are installed
2. wget https://github.com/openstreetmap/mod_tile
3. cd mod_tile
4. ./autogen.sh
5. ./configure
6. make

Actual results:

Output:

...
/usr/include/mapnik/mapbox/variant.hpp:570:15: Fehler: kein Typ namens »type« in »struct std::enable_if<false, void>« typename Enable = typename std::enable_if<Traits::is_valid>::type>
...
Makefile:1135: die Regel für Ziel „src/renderd-gen_tile.o“ scheiterte
make[1]: *** [src/renderd-gen_tile.o] Fehler 1
make[1]: Verzeichnis „/home/gisuser/src/mod_tile“ wird verlassen
Makefile:1299: die Regel für Ziel „all-recursive“ scheiterte
make: *** [all-recursive] Fehler 1



Expected results:
compiling without error

Additional info:
the same procedure works without error with a f24 installation

Comment 1 Tom Hughes 2017-01-08 19:22:04 UTC
Well first of I don't speak German so you'll need to tell me what that error is before I can help...

Secondly, why do you think this is an issue with mapnik rather than with mod_tile? Fedora 25 has mapnik 3.0.12 while 24 only has 3.0.10 so maybe mod_tile needs fixing for the newer mapnik?

Comment 2 Tom Hughes 2017-01-08 19:26:07 UTC
Here's the english version of the error:

g++ -DHAVE_CONFIG_H -I. -I./includes  -pthread -DSYSTEM_LIBINIPARSER=0  -I/usr/include -I/usr/include/mapnik/agg -I/usr/include/mapnik -I/usr/include -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/gdal -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libpng16 -I/usr/include/libdrm -DMAPNIK_MEMORY_MAPPED_FILE -DMAPNIK_HAS_DLCFN -DBIGINT -DBOOST_REGEX_HAS_ICU -DHAVE_JPEG -DMAPNIK_USE_PROJ4 -DHAVE_PNG -DHAVE_WEBP -DHAVE_TIFF -DLINUX -DMAPNIK_THREADSAFE -DBOOST_SPIRIT_NO_PREDEFINED_TERMINALS=1 -DBOOST_PHOENIX_NO_PREDEFINED_TERMINALS=1 -DBOOST_SPIRIT_USE_PHOENIX_V3=1 -DNDEBUG -DHAVE_CAIRO -DGRID_RENDERER -DHAVE_LIBXML2 -std=c++11 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fvisibility=hidden -fvisibility-inlines-hidden -Wall -pthread -ftemplate-depth-300 -Wsign-compare -Wshadow -O2 -g -O2 -MT src/renderd-gen_tile.o -MD -MP -MF src/.deps/renderd-gen_tile.Tpo -c -o src/renderd-gen_tile.o `test -f 'src/gen_tile.cpp' || echo './'`src/gen_tile.cpp
In file included from /usr/include/mapnik/map.hpp:32:0,
                 from src/gen_tile.cpp:2:
/usr/include/mapnik/params.hpp: In instantiation of ‘mapnik::value_holder::value_holder(T&&) [with T = char*&]’:
src/gen_tile.cpp:196:34:   required from here
/usr/include/mapnik/params.hpp:62:49: error: no matching function for call to ‘mapnik::util::variant<mapnik::value_null, long int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool>::variant(char*&)’
         : value_holder_base(std::forward<T>(obj))
                                                 ^
In file included from /usr/include/mapnik/params.hpp:29:0,
                 from /usr/include/mapnik/map.hpp:32,
                 from src/gen_tile.cpp:2:
/usr/include/mapnik/util/variant.hpp:42:44: note: candidate: mapnik::util::variant<mapnik::value_null, long int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool>::variant(mapbox::util::no_init)
     using mapbox::util::variant<Types...>::variant;
                                            ^~~~~~~
/usr/include/mapnik/util/variant.hpp:42:44: note:   no known conversion for argument 1 from ‘char*’ to ‘mapbox::util::no_init’
/usr/include/mapnik/util/variant.hpp:42:44: note: candidate: template<class T, class Traits, class Enable> mapnik::util::variant<mapnik::value_null, long int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool>::variant(T&&)
/usr/include/mapnik/util/variant.hpp:42:44: note:   template argument deduction/substitution failed:
In file included from /usr/include/mapnik/util/variant.hpp:27:0,
                 from /usr/include/mapnik/params.hpp:29,
                 from /usr/include/mapnik/map.hpp:32,
                 from src/gen_tile.cpp:2:
/usr/include/mapnik/mapbox/variant.hpp:570:15: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
               typename Enable = typename std::enable_if<Traits::is_valid>::type>
               ^~~~~~~~
In file included from /usr/include/mapnik/params.hpp:29:0,
                 from /usr/include/mapnik/map.hpp:32,
                 from src/gen_tile.cpp:2:
/usr/include/mapnik/util/variant.hpp:35:7: note: candidate: mapnik::util::variant<mapnik::value_null, long int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool>::variant()
 class variant : public mapbox::util::variant<Types...>
       ^~~~~~~
/usr/include/mapnik/util/variant.hpp:35:7: note:   candidate expects 0 arguments, 1 provided
/usr/include/mapnik/util/variant.hpp:35:7: note: candidate: mapnik::util::variant<mapnik::value_null, long int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool>::variant(const mapnik::util::variant<mapnik::value_null, long int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool>&)
/usr/include/mapnik/util/variant.hpp:35:7: note:   no known conversion for argument 1 from ‘char*’ to ‘const mapnik::util::variant<mapnik::value_null, long int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool>&’
/usr/include/mapnik/util/variant.hpp:35:7: note: candidate: mapnik::util::variant<mapnik::value_null, long int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool>::variant(mapnik::util::variant<mapnik::value_null, long int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool>&&)
/usr/include/mapnik/util/variant.hpp:35:7: note:   no known conversion for argument 1 from ‘char*’ to ‘mapnik::util::variant<mapnik::value_null, long int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool>&&’


I have no idea what it all means though.

Comment 3 Tom Hughes 2017-01-08 19:38:17 UTC
It was a bug in mod_tile. I've merged https://github.com/openstreetmap/mod_tile/pull/144 to fix it.

Comment 4 Sebastian Krieg 2017-01-08 19:44:07 UTC
OK, I think the error is shown in the output. But here is the english version:

...
/usr/local/include/mapnik/mapbox/variant.hpp:570:15: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
typename Enable = typename std::enable_ifTraits::is_valid::type>
^
...

This is the error message during compiling the mod_tile. 

You are right: f24 uses mapnik 3.0.10 and f25 3.0.12. I change the files in /usr/local/include/mapnik/mapbox/variant/ from f24 with the files in /usr/local/include/mapnik/mapbox/ from f25. That means that I compile with older files.

Now, It works without error. 

That means:

- the error is in the file from /usr/local/include/mapnik/mapbox/* in mapnik-devel 3.0.12
- I will close this bug.


Note You need to log in before you can comment on or make changes to this bug.