Skip to content

Silence duplicate -rpath linker warnings on macOS#32869

Open
lindsayad wants to merge 1 commit intoidaholab:nextfrom
lindsayad:really-silence-linker-warnings
Open

Silence duplicate -rpath linker warnings on macOS#32869
lindsayad wants to merge 1 commit intoidaholab:nextfrom
lindsayad:really-silence-linker-warnings

Conversation

@lindsayad
Copy link
Copy Markdown
Member

The prior approach (removed from build.mk) deduplicated libmesh_LIBS and libmesh_LDFLAGS, but duplicate -rpath entries can also arrive from libtool itself or other link inputs (LDFLAGS, curr_additional_libs), so removing duplicates from only those two variables did not fully suppress the warning.

Replace it with a source-agnostic approach: wrap linker invocations in bash -c to enable process substitution, then extend SILENCE_SOME_WARNINGS to also filter duplicate -rpath lines from stderr.

Refs #31412

@moosebuild
Copy link
Copy Markdown
Contributor

Job Test, step Results summary on 19714e5 wanted to post the following:

Framework test summary

Compared against 10e0ca6 in job civet.inl.gov/job/3797958.

No change

Modules test summary

Compared against 10e0ca6 in job civet.inl.gov/job/3797958.

No change

@moosebuild
Copy link
Copy Markdown
Contributor

Job Documentation, step Docs: sync website on 19714e5 wanted to post the following:

View the site here

This comment will be updated on new commits.

@moosebuild
Copy link
Copy Markdown
Contributor

Job Coverage, step Generate coverage on 19714e5 wanted to post the following:

Framework coverage

Coverage did not change

Modules coverage

Coverage did not change

Full coverage reports

Reports

This comment will be updated on new commits.

@lindsayad lindsayad marked this pull request as ready for review May 4, 2026 23:10
Comment thread framework/build.mk
# dependency (libmesh, timpi, petsc) that share an installation prefix, producing
# duplicate -rpath entries that macOS ld warns about.
libmesh_LIBS := $(shell printf '%s\n' $(libmesh_LIBS) | awk '!seen[$$0]++' | tr '\n' ' ')
libmesh_LDFLAGS := $(shell printf '%s\n' $(libmesh_LDFLAGS) | awk '!seen[$$0]++' | tr '\n' ' ')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I d keep that. it does not silence the warning but it limits the number of duplicates to read through when debugging the build

The prior approach (removed from build.mk) deduplicated libmesh_LIBS
and libmesh_LDFLAGS, but duplicate -rpath entries can also arrive from
libtool itself or other link inputs (LDFLAGS, curr_additional_libs),
so removing duplicates from only those two variables did not fully
suppress the warning.

Replace it with a source-agnostic approach: wrap linker invocations in
bash -c to enable process substitution, then extend SILENCE_SOME_WARNINGS
to also filter 'duplicate -rpath' lines from stderr.

Refs idaholab#31412

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lindsayad lindsayad force-pushed the really-silence-linker-warnings branch from 19714e5 to 91a1211 Compare May 6, 2026 20:10
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.

3 participants