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

compilation resp. configure fails with "C++ compiler does not support C++14 standard....." #4298

Open
MarioTrams opened this issue Mar 6, 2022 · 2 comments

Comments

@MarioTrams
Copy link

Because I had troubles that mapnik-render (version 3.0.23) does not work for whatever reason I tried to build it from source as described here: https://github.com/mapnik/mapnik/wiki/UbuntuInstallation

During configure I get:
Checking if compiler (clang++-10) supports -std=c++14 flag... no
C++ compiler does not support C++14 standard (-std=c++14), which is required. Please upgrade your compiler

I have seen that this issue has been reported already multiple times.
For instance here https://ircama.github.io/osm-carto-tutorials/tile-server-ubuntu/ I found a note that one should set the environment variables like
export CXX="clang++-10" && export CC="clang-10"

I also installed clang-12, as this seems the latest available for Ubuntu 20.04. I set
export CXX="clang++-12" && export CC="clang-12"

I's not working either. Very likely the reason for the issue is not the reported one.
What can be wrong here?

Btw., not sure whether this relates to that: Initially configure did not work at all because it reported that python >= 3.5 is required.
Although there had been installed also newer versions of python, /usr/bin/python did point to /usr/bin/python2 on my system. I changed that link accordingly and I did not receive this error any more.

@ChrisSchmidt11
Copy link

When I ran into this error it turned out to be due to an error immediately above it, one of the dependencies needed to be updated. I can't remember which one, unfortunately, but I'd check the log file and see what happened right before this error came up.

@MarioTrams
Copy link
Author

I did check config.log. The last messages are:

scons: Configure: Checking if compiler (clang++-12) supports -std=c++14 flag...
.sconf_temp/conftest_3f9f8e57ee3a30c900280a0be70bf928_0.cpp <-
|
|
|int main()
|{
|#if __cplusplus >= 201402L
| return 0;
|#else
| return -1;
|#endif
|}
|
|
clang++-12 -o .sconf_temp/conftest_3f9f8e57ee3a30c900280a0be70bf928_0.o -c -std=c++14 -DU_USING_ICU_NAMESPACE=0 -D_GLIBCXX_USE_CXX11_ABI=0 -DMAPNIK_MEMORY_MAPPED_FILE -DMAPNIK_HAS_DLCFN -Iinclude -Imason_packages/.link/include -Imason_packages/.link/include/freetype2 -Imason_packages/.link/include/libpng16 .sconf_temp/conftest_3f9f8e57ee3a30c900280a0be70bf928_0.cpp
clang++-12 -o .sconf_temp/conftest_3f9f8e57ee3a30c900280a0be70bf928_0_5855d121ec268ba4a14006bce293d2bb .sconf_temp/conftest_3f9f8e57ee3a30c900280a0be70bf928_0.o -Lsrc -Lsrc/json -Lsrc/wkt -Lmason_packages/.link/lib
/usr/bin/ld: cannot find -lstdc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
scons: Configure: no
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

So lstdc++ cannot be found.

Because my initial problem with mapnik could be reduced to a wrong usage I don't need to compile it from the sources any more. However, this issue seems strange nonetheless....

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