GlobalArrays/ga

ga-config returns wrong ldflags

Closed this issue · 1 comments

Running /path/to/install/bin/ga-config --ldflags will return '-L/path/to/install/lib' regardless of the lib directory name. On many systems ga lib directory will have been named /path/to/install/lib64 due to the presence of config.site, or perhaps given explicitly at configure time.

I think the fix is something like:

 diff --git a/tools/ga-config.in b/tools/ga-config.in
 index b00077ef..0ce30ab4 100644
 --- a/tools/ga-config.in
 +++ b/tools/ga-config.in
 @@ -281,7 +281,7 @@ use_peigs="@enable_peigs@"
 use_elpa="@have_elpa@"
 use_elpa_2015="@have_elpa_2015@"
 use_elpa_2016="@have_elpa_2016@"
-ldflags="@SCALAPACK_LDFLAGS@ @LAPACK_LDFLAGS@ @BLAS_LDFLAGS@ @GA_MP_LDFLAGS@ @ARMCI_NETWORK_LDFLAGS@ -L@prefix@/lib"
+ldflags="@SCALAPACK_LDFLAGS@ @LAPACK_LDFLAGS@ @BLAS_LDFLAGS@ @GA_MP_LDFLAGS@ @ARMCI_NETWORK_LDFLAGS@ -L@libdir@"
  network_ldflags="@ARMCI_NETWORK_LDFLAGS@"
  libs="-lga @SCALAPACK_LIBS@ @LAPACK_LIBS@ @BLAS_LIBS@ $dep_libs"
  network_libs="@ARMCI_NETWORK_LIBS@"

although this seems to be generated from tools/ga-config.in.m4sh so maybe the fix should be there instead.

Also a few lines above cppflags definition should probably have -I@includedir@ instead of -I@prefix@/include.

Yes, the fix should be applied to ga-config.in.m4sh. There are comments at the top of the file showing how to regenerate ga-config.in from that file. autom4te -l m4sh ga-config.in.m4sh > ga-config.in.