Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Doc]: update minimum gcc version? #24530

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

Closed
rcomer opened this issue Nov 21, 2022 · 3 comments · Fixed by #24540
Closed

[Doc]: update minimum gcc version? #24530

rcomer opened this issue Nov 21, 2022 · 3 comments · Fixed by #24540

Comments

@rcomer
Copy link
Member

rcomer commented Nov 21, 2022

Documentation Link

https://matplotlib.org/devdocs/devel/dependencies.html#c-compiler

Problem

The minimum stated version of gcc for building matplotlib is currently 4.8.1. When trying to build matplotlib with (our system default) gcc v4.8.5, I get

/usr/include/c++/4.8.2/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.

On the same system, if I point at gcc v8.1.0, the build works fine.

Suggested improvement

I suspect the simplest option would be to increase the stated minimum version in the installation guide, though I do not know what version that would be. I note that 4.8.5 came out in 2015.

@oscargus
Copy link
Member

It seems like it is not clear from the docs when this was turned on by default, so not clear if one should bump the version or possibly clarify how to build with 4.8.1? That is, how to pass the compiler flag (environment variable?).

@tacaswell
Copy link
Member

https://gcc.gnu.org/projects/cxx-status.html#cxx11 says 4.8.1 is the minimum that implements c++11 and 6.5 (https://gcc.gnu.org/onlinedocs/gcc-6.5.0/gcc/Standards.html#C_002b_002b-Language) is the first version that defaults to c++11 (well, actually gnu++14 which I am assuming is a superset of c++11).

I think the lazy fix here is to add a note that for old gcc the CXXFLAGS env needs to be set, the better fix (which I do not know the right place to do!) is to detect and add this flag as part of the build chain.

@timhoffm
Copy link
Member

IMHO lazy is good enough here. If somebody is able and wiling enough to compile from source, we can expect them to read the docs (at least when something is not working). Also this will become less important one time less because it only affects older gcc versions. Both reasons make the issue less critical.

tacaswell added a commit to tacaswell/matplotlib that referenced this issue Nov 24, 2022
@tacaswell tacaswell added this to the v3.6-doc milestone Nov 24, 2022
tacaswell added a commit to tacaswell/matplotlib that referenced this issue Nov 28, 2022
Closes matplotlib#24530

This will produce warnings, but will compile.
raphaelquast pushed a commit to raphaelquast/matplotlib that referenced this issue Dec 5, 2022
Closes matplotlib#24530

This will produce warnings, but will compile.
melissawm pushed a commit to melissawm/matplotlib that referenced this issue Dec 19, 2022
Closes matplotlib#24530

This will produce warnings, but will compile.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants