sandialabs / Albany

Sandia National Laboratories' Albany multiphysics code
Other
282 stars 89 forks source link

Add Trilinos/Albany rpath to export_albany #1005

Open jewatkins opened 1 year ago

jewatkins commented 1 year ago

When I build MALI, I usually add this to avoid having to add albany/trilinos to my system library search path at runtime:

MPAS_EXTERNAL_LIBS="${ALBANY_LINK_LIBS} -Wl,-R${ALBANY_INSTALL}/lib64 -Wl,-R${TRILINOS_INSTALL}/lib64"

Does it make sense to just add it as part of export_albany.in?

@mperego @bartgol I'm not extremely familiar with how cmake generates this file anymore with all the changes so not sure how we would do it. I don't think this is urgent, more a QOL change.

bartgol commented 1 year ago

I thought we were linking all libraries via full system path, so there shouldn't be any need for adding path to the link line. Are you dating you get immediate references at Link time or ld run-time lead errors?

mperego commented 1 year ago

I think @jewatkins is talking about run-time errors. I'm in favor of adding that to the export_albany.in or anyway for a solution that does not require to explicitly export Trilinos and albnay libraries in the LD_LIBRARY_PATH.

jewatkins commented 1 year ago

right runtime errors

jewatkins commented 1 year ago

My understanding is that -rpath or -R adds the path to the executable (in this case, MALI) for the runtime linker.

bartgol commented 1 year ago

Ok. Adding to export_albany.in is fine then.