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

platform:GFORTRAN_OSX_MACPORTS gcc-10 compilation fix #213

Merged
merged 1 commit into from
Mar 10, 2021

Conversation

gsnoep
Copy link
Contributor

@gsnoep gsnoep commented Mar 9, 2021

When installing GACODE using the GFORTRAN_OSX_MACPORTS platform file and instructions I ran into a fatal compilation error:
PastedGraphic-1

After some digging I found this was likely due to the fact macports had automatically installed gcc-10, which has stricter handling of Fortran argument types.

After reading:

I added "-w -fallow-argument-mismatch" to the gfortran call in the platform file, which according to the documentation linked above turns any errors of mismatching between calls to external procedures and the procedure definitions into warnings, which are suppressed at the same time.

This fixed the issue for me. Since the gcc documentation strongly discourages using this option, perhaps in the future fixing the underlying issue of aligning with the stricter argument type requirements in the newer gcc might be necessary.

@jcandy
Copy link
Member

jcandy commented Mar 10, 2021

I think you have done the right thing to add the fix to F77 (so it applies only to the legacy code). If something is complied in GACODE with F77, it typically means we are dealing with pristine legacy code, and really should not change the sources.

Maybe a less dangerous flag can be swapped in at some point.

@jcandy jcandy merged commit 6ac6579 into master Mar 10, 2021
@smithsp smithsp deleted the GFORTRAN_OSX_MACPORTS branch March 10, 2021 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants