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

Spurious -I/usr/include/tirpc is added when autodetecting libtirpc in linker path #3740

Open
roystgnr opened this issue Dec 7, 2023 · 0 comments
Assignees

Comments

@roystgnr
Copy link
Member

roystgnr commented Dec 7, 2023

A Cardinal+OpenMC user ran into this, on a system where libtirpc is necessary for XDR support but where the headers are still installed in /usr/include/rpc/, not /usr/include/tirpc/rpc/. Our first attempt to detect XDR support fails (because we don't yet add -ltirpc and the linker has missing symbols), then our next attempt (where we add -I/usr/include/tirpc to the compiler flags and -ltirpc to the linker's) succeeds (because we aren't giving the compiler anything like -Wmissing-include-dirs -Werror), so our m4 concludes that those flags are needed and adds them both. Our libmesh-config script and our pkgconfig files then have that flag, and anything that screams about invalid include directories (like the compiler options above, or reportedly the cmake configuration for Cardinal with OpenMC, which dies with Imported target "PkgConfig::LIBMESH" includes non-existent path "/usr/include/tirpc") will fail.

This isn't urgent, since there's a workaround: --with-xdr-include=/usr/include goes straight to the "try to link with -ltirpc" configure path and succeeds without adding any invalid include directories. But this was annoying to debug so I figured I'd at least get the error message and the workaround googleable right away.

@roystgnr roystgnr self-assigned this Dec 7, 2023
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

No branches or pull requests

1 participant