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

Remove linking warning from gfortran + clang #29010

Draft
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

GiudGiud
Copy link
Contributor

@GiudGiud GiudGiud commented Nov 5, 2024

closes #29009

The fix looks a little weird, but it's needed on my machine because the output from linking is somewhat garbled
Feel free to try out your proposed solutions locally

@GiudGiud GiudGiud self-assigned this Nov 5, 2024
@@ -424,7 +424,7 @@ $(hit_LIB): $(hit_objects)
$(moose_LIB): $(moose_objects) $(pcre_LIB) $(gtest_LIB) $(hit_LIB) $(pyhit_LIB)
@echo "Linking Library "$@"..."
@$(libmesh_LIBTOOL) --tag=CXX $(LIBTOOLFLAGS) --mode=link --quiet \
$(libmesh_CXX) $(CXXFLAGS) $(libmesh_CXXFLAGS) -o $@ $(moose_objects) $(pcre_LIB) $(png_LIB) $(libmesh_LDFLAGS) $(libmesh_LIBS) $(EXTERNAL_FLAGS) -rpath $(FRAMEWORK_DIR)
$(libmesh_CXX) $(CXXFLAGS) $(libmesh_CXXFLAGS) -o $@ $(moose_objects) $(pcre_LIB) $(png_LIB) $(libmesh_LDFLAGS) $(libmesh_LIBS) $(EXTERNAL_FLAGS) -rpath $(FRAMEWORK_DIR) 2>&1 | grep -v "ld: warning: could not create compact unwind for" | grep -v "could not create compact unwind for"
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to put this inside a if darwin?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we d need to duplicate that line though? maybe sending that line through a function to do this cleaning up

@YaqiWang
Copy link
Contributor

YaqiWang commented Nov 5, 2024

Still seeing some of this warnings possibly because I am compiling Griffin?

@GiudGiud
Copy link
Contributor Author

GiudGiud commented Nov 5, 2024

yes you d need to use this "grep" in app.mk too.

@dschwen
Copy link
Member

dschwen commented Nov 6, 2024

This fix looks pretty horrible. Does

LDFLAGS="-Wl,-no_compact_unwind"

not work?

@loganharbour
Copy link
Member

Yeah, we definitely don't want to pipe all stderr to stdout. Those need to remain separate

@GiudGiud
Copy link
Contributor Author

GiudGiud commented Nov 6, 2024

see this post
https://www.scivision.dev/cmake-compact-unwind-ld-warning/

Disables exception handling from what I understood

@GiudGiud
Copy link
Contributor Author

GiudGiud commented Nov 6, 2024

So we cant grep on stderr (which I why I redirected) but maybe there is another way to filter it. I ll take a look

@dschwen
Copy link
Member

dschwen commented Nov 6, 2024

see this post https://www.scivision.dev/cmake-compact-unwind-ld-warning/

Disables exception handling from what I understood

But it doesn't work anyways when the warning is issued! Might as well disable it then on that architecture...

@GiudGiud
Copy link
Contributor Author

GiudGiud commented Nov 6, 2024

it does not work for the routines that it reports a warning for.
I imagine it works for every other one

if you pass the flag, it will disable it for everything

@dschwen
Copy link
Member

dschwen commented Nov 6, 2024

From the looks of the names in the warnings those seem to be fortran functions. Could we add the flag selectively?

@GiudGiud
Copy link
Contributor Author

GiudGiud commented Nov 6, 2024

lemme try

@GiudGiud
Copy link
Contributor Author

GiudGiud commented Nov 6, 2024

There isnt a separate command for linking code from fortran source though?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants