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

Fix compilation on windows for some time zones, add lquadmath #972

Merged
merged 4 commits into from
Aug 3, 2023

Conversation

rtownson
Copy link
Collaborator

@rtownson rtownson commented Mar 7, 2023

  1. Fix a bug where applications would fail to compile on windows in locations where the time zone was a long string. This was due to the COMPILE_TIME flag that included some text about the time zone. To fix the issue, the time zone was removed from the variable and output.

  2. Fix an issue where lquadmath was not included with lgfortran, and the compiler would fail on some systems.

  3. Fix a compiler error that occurred when the user had installed git, but then installed EGSnrc using the zip file. Users would see an error about GIT_HASH not being defined in this case.

  4. Fix a minor warning that was printed about it not being a git repository.

@ftessier please check that the lquadmath changes don't cause any issues on OS X. I recommend that we cherry pick these fixes into v2023.

@rtownson rtownson self-assigned this Mar 7, 2023
@rtownson rtownson requested a review from a team as a code owner March 7, 2023 17:41
@ftessier
Copy link
Member

ftessier commented Mar 7, 2023

Testing on macOS Big Sur 11.7.4 20G1120 on 2017 macbook (Dual-Core Intel Core i5). @mchamberland would you be willing to test compilation on M1 and M2 if you can spare a few cycles?

@mchamberland
Copy link
Contributor

@ftesser Will test when I have a few minutes.

@ftessier
Copy link
Member

ftessier commented Mar 7, 2023

Testing on macOS Big Sur 11.7.4 20G1120 on 2017 macbook (Dual-Core Intel Core i5).

Compilation test completed succesfully.

I agree to add this to the master branch, without a version tag, since there is no substantial change. Oh, I can see semantic versioning rearing its head from here... 😄

@mchamberland
Copy link
Contributor

@ftessier Compiles fine on M2 MacBook Air, with Ventura 13.2.1 and GCC 12.2 from Homebrew.

@rtownson
Copy link
Collaborator Author

rtownson commented Mar 7, 2023

On Windows the lquadmath changes won't be applied until we recompile the configuration GUI and post it with the release. In the mean time, users can just add -lquadmath to their specs/egspp_win3264.spec file, e.g.:

fortran_libs = -lgfortran -lquadmath

You only need to do this if you can't compile applications and get an error about quadmath.

@rtownson
Copy link
Collaborator Author

Please review this soon, it's impacting a number of users trying to install the latest release of EGSnrc.

@ftessier
Copy link
Member

ftessier commented Jun 2, 2023

Thanks, I will merge this one asap.

@ftessier
Copy link
Member

ftessier commented Jun 8, 2023

I am merging this on develop. For cherry-picking to master, I propose to issue release 2023a, for perfect clarity and unequivocal citation.

@rtownson
Copy link
Collaborator Author

rtownson commented Jun 20, 2023

Since we hadn't merged this in yet, I added a couple other fixes to windows compilation (original post updated). It seems that on windows, many users were installing git but then still using the zip file to install EGSnrc, which was causing issues.

@ftessier ftessier added this to the Release 2023a milestone Jul 6, 2023
@ftessier ftessier added the bug label Jul 6, 2023
rtownson and others added 4 commits August 3, 2023 08:54
Fix a bug that occurred when the time zone was a long string on windows.
This caused compilation of applications to fail on windows, complaining
about the COMPILE_TIME definition, because the string was too long. Now,
the time zone is not printed for windows.
Remove the timezone from the beamnrc.spec file when the COMPILE_TIME is
printed, to avoid a line overflow for longer timezones.
Fix a compilation error on windows that occurred when the user had
installed git, but did not clone EGSnrc using git. This resulted in a
compiler error complaining about GIT_HASH. Also fix some warnings about
the directory not being a git repository.
@ftessier ftessier merged commit afee58e into develop Aug 3, 2023
@ftessier ftessier deleted the fix-win-compile branch August 3, 2023 19:19
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.

5 participants