Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running ./configure on Ubuntu 20.04 #4174

Closed
raphahardt opened this issue Sep 11, 2020 · 5 comments
Closed

Error when running ./configure on Ubuntu 20.04 #4174

raphahardt opened this issue Sep 11, 2020 · 5 comments

Comments

@raphahardt
Copy link

I'm having trouble trying to install Mapnik v3.0.23, downloaded from the releases.
I'm following the instructions for installing from here: https://github.com/mapnik/mapnik/wiki/UbuntuInstallation

My OS is Ubuntu 20.04. Harfbuzz was installed and compiled beforehand (2.7.2)
It is worth noticing that the installation is expecting the "freetype-config", which in Ubuntu 20 is not supported anymore in favor of "pkg-config"

I tried change de FREETYPE_CONFIG variable, but no success.

Log:

scons: Reading SConscript files ...

Welcome to Mapnik...

Configuring build environment...
Configuring on Linux in *release mode*...
Checking for freetype-config... no
Checking for dlfcn.h support ... yes
Checking if compiler (c++) supports -std=c++11 flag... (cached) yes
Checking for C library z... yes
Checking for C++ library icuuc... yes
Checking for ICU version >= 4.2... found: icu 66.1
(cached) Checking for C++ library harfbuzz... yes
Checking for HarfBuzz version >= 0.9.34... found: HarfBuzz 2.7.2
Checking for HarfBuzz with freetype support
(cached) no
Searching for boost libs and headers... (cached) 
Using default boost lib dir: /usr/lib
Using default boost include dir: /usr/include
Checking for C++ header file boost/version.hpp... yes
Checking for Boost version >= 1.47... yes
Found boost lib version... 1_71
Checking for C++ library boost_system... yes
Checking for C++ library boost_filesystem... yes
Checking for C++ library boost_regex... yes
Checking for C++ library boost_program_options... yes
Checking whether Boost was compiled with C++11 scoped enums ... yes
Checking if boost_regex was built with ICU unicode support... (cached) yes
Checking for C library jpeg... yes
Checking for C library proj... no
Could not find optional header or shared library for proj
Checking for C library png... yes
Checking for C library webp... yes
Checking for C library tiff... yes
Checking for PROJ_LIB directory...Failed to detect (mapnik-config will have null value)
Checking for ICU data directory...Failed to detect (mapnik-config will have null value)
Checking for GDAL data directory...Failed to detect (mapnik-config will have null value)
Checking for pkg-config... yes
Checking for requested plugins dependencies...
Checking for pg_config... yes
Checking for C library sqlite3... yes
Checking if SQLite supports RTREE... (cached) yes
Checking for gdal-config --libs... yes
Checking for gdal-config --cflags... yes
Checking for name of gdal library... yes
Checking for C++ library gdal... yes
Checking for pg_config... yes
Checking if gdal is ogr enabled... yes
Checking for gdal-config --libs... yes
Checking for gdal-config --cflags... yes
Checking for name of ogr library... yes
Checking for C++ library gdal... yes
Checking for cairo... yes
Checking for cairo lib and include paths... yes
Checking for cairo freetype font support ... yes

Exiting... the following required dependencies were not found:
   - freetype-config (freetype-config program | try setting FREETYPE_CONFIG SCons option or configure with FREETYPE_LIBS & FREETYPE_INCLUDES)
   - harfbuzz-with-freetype-support

See '/home/teste/Downloads/mapnik-3.0.23-do-site/mapnik-3.0.23/config.log' for details on possible problems.

Also, these OPTIONAL dependencies were not found:
   - proj (Proj.4 C Projections library | configure with PROJ_LIBS & PROJ_INCLUDES | more info: http://trac.osgeo.org/proj/)

Set custom paths to these libraries and header files on the command-line or in a file called 'config.py'
    ie. $ python scons/scons.py BOOST_INCLUDES=/usr/local/include BOOST_LIBS=/usr/local/lib

Once all required dependencies are found a local 'config.py' will be saved and then install:
    $ sudo python scons/scons.py install

To view available path variables:
    $ python scons/scons.py --help or -h

To view overall SCons help options:
    $ python scons/scons.py --help-options or -H

More info: https://github.com/mapnik/mapnik/wiki/Mapnik-Installation
@artemp
Copy link
Member

artemp commented Sep 11, 2020

@raphahardt - do you have freetype-config on your system ? If not, you can't use FREETYPE_CONFIG route, try setting FREETYPE_INCLUDES and FREETYPE_LIBS as suggested in your stderr :

freetype-config (freetype-config program | try setting FREETYPE_CONFIG SCons option or configure with FREETYPE_LIBS & FREETYPE_INCLUDES)

@artemp
Copy link
Member

artemp commented Sep 11, 2020

@raphahardt

#3870
#4164 <-- has a pointer to a workable solution e.g

Missing freetype-config:
''freetype-config'' is depreciated and ''pkg-config'' should be used instead. A fix for this is available and was merged with master in #3892, but SConstruct in v3.0.23 doesn't include them. Adding those checks resolves the freetype-config dependency.

@raphahardt
Copy link
Author

Thank you very much! I didn't see that the same issue was opened before, I'm sorry.
The solution of define FREETYPE_LIBS and FREETYPE_INCLUDES worked on the configure phase, but now on the "make" phase I got this (see below):

Seems like some file is missing. I downloaded the zip from the releases page, so I assume it has all the files needed.
I can try cloning from the repo and clone the submodules if that is the case.

Thanks in advance

$ make
# we first build memory intensive files with -j1
python scons/scons.py -j1 \
	--config=cache --implicit-cache --max-drift=1 \
	src/renderer_common/render_group_symbolizer.os \
	src/renderer_common/render_markers_symbolizer.os \
	src/renderer_common/render_thunk_extractor.os \
	src/json/libmapnik-json.a \
	src/wkt/libmapnik-wkt.a \
	src/css_color_grammar.os \
	src/expression_grammar.os \
	src/transform_expression_grammar.os \
	src/image_filter_grammar.os \
	src/marker_helpers.os \
	src/svg/svg_transform_parser.os \
	src/agg/process_line_symbolizer.os \
	plugins/input/geojson/geojson_datasource.os \
	utils/mapnik-index/process_geojson_file.o \
	src/svg/svg_path_parser.os \
	src/svg/svg_parser.os \
	src/svg/svg_points_parser.os \
	src/svg/svg_transform_parser.os \

scons: Reading SConscript files ...
Using previous successful configuration...
Re-configure by running "python scons/scons.py configure".

Welcome to Mapnik...

scons: done reading SConscript files.
scons: Building targets ...
c++ -o src/renderer_common/render_group_symbolizer.os -c -std=c++11 -DU_USING_ICU_NAMESPACE=0 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -pthread -ftemplate-depth-300 -Wsign-compare -Wshadow -O3 -fPIC -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1 -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 -Ideps -Ideps/mapbox/variant/include -Ideps/agg/include -Iinclude -I/usr/include -I/usr/include/freetype2 -I/usr/include/postgresql -I/usr/include/gdal -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/libpng16 src/renderer_common/render_group_symbolizer.cpp
In file included from include/mapnik/value_hash.hpp:27,
                 from include/mapnik/value.hpp:29,
                 from include/mapnik/transform_processor.hpp:28,
                 from include/mapnik/attribute_collector.hpp:27,
                 from src/renderer_common/render_group_symbolizer.cpp:24:
include/mapnik/util/variant.hpp:27:10: fatal error: mapbox/variant.hpp: No such file or directory
   27 | #include <mapbox/variant.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
scons: *** [src/renderer_common/render_group_symbolizer.os] Error 1
scons: building terminated because of errors.
make: *** [Makefile:32: src/json/libmapnik-json.a] Error 2

@artemp
Copy link
Member

artemp commented Sep 11, 2020

@raphahardt - yes, you need to run git submodule update --init after cloning

@raphahardt
Copy link
Author

It worked. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants