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

[BUGFIX] Support old gcc versions #3072

Merged
merged 8 commits into from
Feb 10, 2021
Merged

Conversation

cphyc
Copy link
Member

@cphyc cphyc commented Feb 10, 2021

Some files require some C++14 features which aren't supported on old versions of GCC. This PR tries to find the most suitable compiler flags to supports these features (though it does not capture all cases).

I tested this PR with GCC 4.7.4 (can now compile yt, could not before). With GCC 4.6.4 and older versions, the compilation fails as the support for C++14 is unsufficient to compile yt.

Fixes #3071.

Copy link
Member

@matthewturk matthewturk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great - thank you for doing this. I've run into this issue.

@opaco
Copy link
Contributor

opaco commented Feb 10, 2021

Following up our Slack conversation, this fix for gcc version ultimately doesn't solve the error that I get when I try to load yt in Python. Briefly, the error is
File "yt/utilities/lib/misc_utilities.pyx", line 1, in init yt.utilities.lib.misc_utilities # distutils: libraries = STD_LIBS
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject

Edit: This error is from #3050 and the fix is to update numpy to at least 1.20.0.

Copy link
Member

@neutrinoceros neutrinoceros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left a couple of minor suggestions

setupext.py Outdated Show resolved Hide resolved
setupext.py Outdated Show resolved Hide resolved
setupext.py Outdated Show resolved Hide resolved
setupext.py Outdated Show resolved Hide resolved
cphyc and others added 4 commits February 10, 2021 21:01
Co-authored-by: Clément Robert <cr52@protonmail.com>
Co-authored-by: Clément Robert <cr52@protonmail.com>
@neutrinoceros neutrinoceros merged commit 97e84e9 into yt-project:main Feb 10, 2021
@cphyc cphyc deleted the support-old-gcc branch October 19, 2021 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compiling yt with old gcc versions
4 participants