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 build failure with CMake #1285

Merged
merged 1 commit into from
Jul 27, 2023
Merged

Fix build failure with CMake #1285

merged 1 commit into from
Jul 27, 2023

Conversation

J-Lentz
Copy link
Contributor

@J-Lentz J-Lentz commented Jul 17, 2023

Description
fms/fms_stacksize.c has been added to fms_c_src_files in CMakeLists.txt.

Fixes #1284

How Has This Been Tested?
Github CI

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • New check tests, if applicable, are included
  • make distcheck passes

@thomas-robinson
Copy link
Member

@climbfuji can you test this?

@J-Lentz J-Lentz changed the title Fix build failure on MacOS Fix build failure with CMake Jul 26, 2023
@rem1776 rem1776 merged commit 0e4a675 into NOAA-GFDL:main Jul 27, 2023
27 checks passed
@climbfuji
Copy link
Contributor

Sorry @thomas-robinson I was on leave for the last three weeks. I'll test the new release 2023.02 next week on macOS!

@bensonr
Copy link
Contributor

bensonr commented Aug 16, 2023

@climbfuji - fyi, we do have someone in our group now testing things on their personal mac. Perhaps you know better than me, but I'm under the impression the brew-installed version of gcc may not be clang-based. I mention it only to ask if there are any specifics things you'd like us to configure as it pertains to testing on a mac.

@climbfuji
Copy link
Contributor

Thanks @bensonr! I added fms@2023.02 with a new variant that enables the legacy fms_io extension to spack-stack and built it successfully on my macOS. I was also able to compile the ufs-weather-model develop code with that version of FMS. I haven't run any tests yet, though, but will do so first with the ufs-weather-model standalone and then with the JEDI+FV3 / JEDI+UFS code (requires updates in JEDI).

As for macOS, we follow spack best practices and use the Native Apple clang compiler or the homebrew LLVM clang compiler together with the gfortran compiler from the homebrew gcc installation. This works quite well, but there are limitations (e.g. exception handling that requires the correct libraries being linked to the application).

The reason spack recommends using clang and not gcc is that many packages that are built by spack have some relation / require some macOS framework libraries (e.g. Python but also others), and this simply doesn't work with gcc.

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

Successfully merging this pull request may close these issues.

fms@2023.02-beta1 testing - undefined references to maximize_system_stacksize_limit and mpp_init
5 participants