From 1282a5035803f7fd3fa76b9118349e66d3bf0dbe Mon Sep 17 00:00:00 2001 From: Barry Rountree Date: Wed, 21 Oct 2026 14:55:42 -0700 Subject: [PATCH] libmodules_fix: workaround for cray compilers The "long" tests were not compiled with `-rpath`, which led to errors about missing libmodules. This fix allows cray compilers to be used without putting the fortran library location in LD_LIBRARY_PATH. --- testsuite/Makefile.am | 8 ++++---- testsuite/Makefile.in | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am index 4e20fb8b..4c4a9a9d 100644 --- a/testsuite/Makefile.am +++ b/testsuite/Makefile.am @@ -311,7 +311,7 @@ origin_dir/origin_subdir: $(AM_V_GEN) mkdir -p origin_dir/origin_subdir origin_dir/origin_subdir/liborigintarget.so: origintarget.c origin_dir/origin_subdir - $(AM_V_CCLD)$(MPICC) -o $@ -fPIC -Wall $< -shared + $(AM_V_CCLD)$(MPICC) -o $@ -fPIC -Wall $< -shared -Wl,-rpath,/opt/cray/pe/cce/20.0.0/cce/x86_64/lib @touch $@ origin_dir/liboriginlib.so: originlib.c $(REGLIB_SRC) origin_dir/origin_subdir/liborigintarget.so @@ -498,13 +498,13 @@ libtagmalloc.so: $(srcdir)/tagmalloc.c $(AM_V_CCLD)$(CC) $(CFLAGS) -fno-builtin -o $@ -shared -fPIC $< long_needed_path_test: $(srcdir)/long_needed_path_test.c $(LONG_NEEDED_TARGET) - $(AM_V_CCLD)$(CC) $(CFLAGS) -o $@ $(srcdir)/long_needed_path_test.c $(LONG_NEEDED_LIBS) + $(AM_V_CCLD)$(CC) $(CFLAGS) -o $@ $(srcdir)/long_needed_path_test.c $(LONG_NEEDED_LIBS) -Wl,-rpath,/opt/cray/pe/cce/20.0.0/cce/x86_64/lib long_needed_app_malloc_test: $(srcdir)/long_needed_path_test.c $(srcdir)/tagmalloc.c $(LONG_NEEDED_TARGET) - $(AM_V_CCLD)$(CC) $(CFLAGS) -fno-builtin -fPIE -pie -o $@ $(srcdir)/long_needed_path_test.c $(srcdir)/tagmalloc.c $(LONG_NEEDED_LIBS) + $(AM_V_CCLD)$(CC) $(CFLAGS) -fno-builtin -fPIE -pie -o $@ $(srcdir)/long_needed_path_test.c $(srcdir)/tagmalloc.c $(LONG_NEEDED_LIBS) -Wl,-rpath,/opt/cray/pe/cce/20.0.0/cce/x86_64/lib long_needed_lib_malloc_test: $(srcdir)/long_needed_path_test.c libtagmalloc.so $(LONG_NEEDED_TARGET) - $(AM_V_CCLD)$(CC) $(CFLAGS) -o $@ $(srcdir)/long_needed_path_test.c $(TAGMALLOC_LIBS) $(LONG_NEEDED_LIBS) + $(AM_V_CCLD)$(CC) $(CFLAGS) -o $@ $(srcdir)/long_needed_path_test.c $(TAGMALLOC_LIBS) $(LONG_NEEDED_LIBS) -Wl,-rpath,/opt/cray/pe/cce/20.0.0/cce/x86_64/lib realpath_free_test: $(srcdir)/realpath_free_test.c $(srcdir)/tagmalloc.c $(AM_V_CCLD)$(CC) $(CFLAGS) -fno-builtin -o $@ $(srcdir)/realpath_free_test.c $(srcdir)/tagmalloc.c diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in index ff41207b..4aa591e4 100644 --- a/testsuite/Makefile.in +++ b/testsuite/Makefile.in @@ -1007,7 +1007,7 @@ origin_dir/origin_subdir: $(AM_V_GEN) mkdir -p origin_dir/origin_subdir origin_dir/origin_subdir/liborigintarget.so: origintarget.c origin_dir/origin_subdir - $(AM_V_CCLD)$(MPICC) -o $@ -fPIC -Wall $< -shared + $(AM_V_CCLD)$(MPICC) -o $@ -fPIC -Wall $< -shared -Wl,-rpath,/opt/cray/pe/cce/20.0.0/cce/x86_64/lib @touch $@ origin_dir/liboriginlib.so: originlib.c $(REGLIB_SRC) origin_dir/origin_subdir/liborigintarget.so @@ -1186,13 +1186,13 @@ libtagmalloc.so: $(srcdir)/tagmalloc.c $(AM_V_CCLD)$(CC) $(CFLAGS) -fno-builtin -o $@ -shared -fPIC $< long_needed_path_test: $(srcdir)/long_needed_path_test.c $(LONG_NEEDED_TARGET) - $(AM_V_CCLD)$(CC) $(CFLAGS) -o $@ $(srcdir)/long_needed_path_test.c $(LONG_NEEDED_LIBS) + $(AM_V_CCLD)$(CC) $(CFLAGS) -o $@ $(srcdir)/long_needed_path_test.c $(LONG_NEEDED_LIBS) -Wl,-rpath,/opt/cray/pe/cce/20.0.0/cce/x86_64/lib long_needed_app_malloc_test: $(srcdir)/long_needed_path_test.c $(srcdir)/tagmalloc.c $(LONG_NEEDED_TARGET) - $(AM_V_CCLD)$(CC) $(CFLAGS) -fno-builtin -fPIE -pie -o $@ $(srcdir)/long_needed_path_test.c $(srcdir)/tagmalloc.c $(LONG_NEEDED_LIBS) + $(AM_V_CCLD)$(CC) $(CFLAGS) -fno-builtin -fPIE -pie -o $@ $(srcdir)/long_needed_path_test.c $(srcdir)/tagmalloc.c $(LONG_NEEDED_LIBS) -Wl,-rpath,/opt/cray/pe/cce/20.0.0/cce/x86_64/lib long_needed_lib_malloc_test: $(srcdir)/long_needed_path_test.c libtagmalloc.so $(LONG_NEEDED_TARGET) - $(AM_V_CCLD)$(CC) $(CFLAGS) -o $@ $(srcdir)/long_needed_path_test.c $(TAGMALLOC_LIBS) $(LONG_NEEDED_LIBS) + $(AM_V_CCLD)$(CC) $(CFLAGS) -o $@ $(srcdir)/long_needed_path_test.c $(TAGMALLOC_LIBS) $(LONG_NEEDED_LIBS) -Wl,-rpath,/opt/cray/pe/cce/20.0.0/cce/x86_64/lib realpath_free_test: $(srcdir)/realpath_free_test.c $(srcdir)/tagmalloc.c $(AM_V_CCLD)$(CC) $(CFLAGS) -fno-builtin -o $@ $(srcdir)/realpath_free_test.c $(srcdir)/tagmalloc.c