Skip to content

Conversation

@abzrg
Copy link
Contributor

@abzrg abzrg commented Apr 5, 2025

Hi,

This is a PR based on this discussion. The main goal is to update :/Makefile so that the adapter can be built on macOS as well.

In short, the adaptor couldn't link against yaml-cpp, because the compilation was done using gcc, g++ and -lstdc++. Changing these to clang, clang++, and -lc++ fixed that.

Other compilation issues encountered included:

  • (C) Implicit declaration of functions
  • (C) Incompatible pointer types
  • (Fortran) -fallow-argument-mismatch

@precice-bot
Copy link

This pull request has been mentioned on preCICE Forum on Discourse. There might be relevant details there:

https://precice.discourse.group/t/simulation-is-stuck-during-setup-calculix-adapter/2423/1

@IshaanDesai
Copy link
Member

@abzrg apologies for not looking into this PR sooner. We recently removed yaml-cpp as a dependency. Can you please update your feature branch with respect to the develop branch? I will then review it.

abzrg added 8 commits July 8, 2025 19:56
Also removed `-lstdc++` from `LIBS`
`clang` causes compilation errors if these flags are not enabled:

`CFLAGS += -Wno-implicit-function-declaration`

  Suppresses warnings about using functions without declaring them
  first

`CFLAGS += -Wno-incompatible-pointer-types`

  Suppresses warnings when assigning or passing pointers between
  incompatible types (e.g., assigning a char ** to a void **)
- `$(INCLUDES)` is already included in `$(CFLAGS)`
- `$(LIBS)` only generate linker warnings
@abzrg abzrg force-pushed the feature-update-makefile branch from d0533a1 to 36149f9 Compare July 8, 2025 16:34
@abzrg
Copy link
Contributor Author

abzrg commented Jul 8, 2025

Thank you @IshaanDesai for letting me know. I rebased my changes on the latest changes of develop.

@abzrg abzrg force-pushed the feature-update-makefile branch from 86ec606 to 1a58657 Compare July 9, 2025 11:59
@IshaanDesai IshaanDesai requested a review from fsimonis July 16, 2025 20:35
@IshaanDesai IshaanDesai assigned MakisH and unassigned abzrg Jul 17, 2025
@fsimonis fsimonis self-requested a review July 25, 2025 11:22
@MakisH MakisH changed the title Feature: update makefile Makefile improvements: compiler paths and version-aware flags Jul 28, 2025
Copy link
Member

@MakisH MakisH left a comment

Choose a reason for hiding this comment

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

Thank you for the update! This is a very useful contribution, independent of the original reason (yaml-cpp was removed in #143).

I like the version-aware -fallow-argument-mismatch, which saves the whole hard-coding. We should also update the documentation and the respective CI scripts to remove that (I will do).

@MakisH MakisH merged commit c6f2b8c into precice:develop Jul 28, 2025
3 checks passed
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.

5 participants