I followed the steps mentioed in https://mapnik.org/pages/downloads.html to install mapnik from source.
I have clang version 14. But when I am trying to install mapnik on Windows, it says "C++ compiler does not support C++14 standard (-std=c++14), which is required. Please upgrade your compiler"
$ ./configure CXX=clang++-14 CC=clang-14
scons: Reading SConscript files ...
Welcome to Mapnik...
Configuring build environment...
Configuring on Windows in release mode...
Checking for pkg-config... no
Checking for freetype-config... no
Checking for dlfcn.h support ... no
Checking if compiler (clang++-14) supports -std=c++14 flag... (cached) no
C++ compiler does not support C++14 standard (-std=c++14), which is required. Please upgrade your compiler
The config.log contents are:
file D:\projects\qgis\mapnik\SConstruct,line 1266:
Configure(confdir = .sconf_temp)
scons: Configure: Checking for pkg-config...
pkg-config --atleast-pkgconfig-version=0.15.0
'pkg-config' is not recognized as an internal or external command,
operable program or batch file.
scons: Configure: no
scons: Configure: Checking for freetype-config...
freetype-config --libs --cflags
'freetype-config' is not recognized as an internal or external command,
operable program or batch file.
scons: Configure: no
scons: Configure: Checking for dlfcn.h support ...
.sconf_temp\conftest_2.cpp <-
|
|
|#include <dlfcn.h>
|
|int main()
|{
| return 0;
|}
|
|
clang++-14 /Fo.sconf_temp\conftest_2.obj /c .sconf_temp\conftest_2.cpp /TP -std=c++14 -DU_USING_ICU_NAMESPACE=0 /nologo /D-DMAPNIK_MEMORY_MAPPED_FILE /Iinclude /ID:\usr\include
'clang++-14' is not recognized as an internal or external command,
operable program or batch file.
scons: Configure: no
.sconf_temp\conftest_3.cpp <-
|
|
|int main()
|{
|#if __cplusplus >= 201402L
| return 0;
|#else
| return -1;
|#endif
|}
|
|
clang++-14 /Fo.sconf_temp\conftest_3.obj /c .sconf_temp\conftest_3.cpp /TP -std=c++14 -DU_USING_ICU_NAMESPACE=0 /nologo /D-DMAPNIK_MEMORY_MAPPED_FILE /Iinclude /ID:\usr\include
'clang++-14' is not recognized as an internal or external command,
operable program or batch file.
scons: Configure: Checking if compiler (clang++-14) supports -std=c++14 flag...
scons: Configure: (cached) no
If you see config.log, it says "'clang++-14' is not recognized as an internal or external command,"
Why is it trying to run the command with the version name? If this is not the way, how then should I pass the version to ./configure command?
I tried with g++ (version 6.3.0) as well and got similar issues. My previous clang was version 12 that comes with Visual Studio. When I run just ./configure, the config log says:
file D:\projects\qgis\mapnik\SConstruct,line 1266:
Configure(confdir = .sconf_temp)
scons: Configure: Checking for pkg-config...
pkg-config --atleast-pkgconfig-version=0.15.0
'pkg-config' is not recognized as an internal or external command,
operable program or batch file.
scons: Configure: no
scons: Configure: Checking for freetype-config...
freetype-config --libs --cflags
'freetype-config' is not recognized as an internal or external command,
operable program or batch file.
scons: Configure: no
scons: Configure: Checking for dlfcn.h support ...
.sconf_temp\conftest_2.cpp <-
|
|
|#include <dlfcn.h>
|
|int main()
|{
| return 0;
|}
|
|
c++ /Fo.sconf_temp\conftest_2.obj /c .sconf_temp\conftest_2.cpp /TP -std=c++14 -DU_USING_ICU_NAMESPACE=0 /nologo /D-DMAPNIK_MEMORY_MAPPED_FILE /Iinclude /ID:\usr\include
c++: error: /Fo.sconf_temp\conftest_2.obj: No such file or directory
c++: error: /c: No such file or directory
c++: error: /TP: No such file or directory
c++: error: /nologo: No such file or directory
c++: error: /D-DMAPNIK_MEMORY_MAPPED_FILE: No such file or directory
c++: error: /Iinclude: No such file or directory
c++: error: /ID:\usr\include: Invalid argument
scons: Configure: no
.sconf_temp\conftest_3.cpp <-
|
|
|int main()
|{
|#if __cplusplus >= 201402L
| return 0;
|#else
| return -1;
|#endif
|}
|
|
c++ /Fo.sconf_temp\conftest_3.obj /c .sconf_temp\conftest_3.cpp /TP -std=c++14 -DU_USING_ICU_NAMESPACE=0 /nologo /D-DMAPNIK_MEMORY_MAPPED_FILE /Iinclude /ID:\usr\include
c++: error: /Fo.sconf_temp\conftest_3.obj: No such file or directory
c++: error: /c: No such file or directory
c++: error: /TP: No such file or directory
c++: error: /nologo: No such file or directory
c++: error: /D-DMAPNIK_MEMORY_MAPPED_FILE: No such file or directory
c++: error: /Iinclude: No such file or directory
c++: error: /ID:\usr\include: Invalid argument
scons: Configure: Checking if compiler (c++) supports -std=c++14 flag...
scons: Configure: (cached) no
When clang v12 didn't work, I installed LLVM + clang v14. I also tried by exporting variables first like export CXX="clang++-14" and export CC="clang-14". But no luck... Please help as I am badly stuck in this for the past 2 days... Thanks