[xlqc][omp] fix: discover GSL paths via gsl-config - #305
Conversation
|
With no gsl-config on PATH, both variables expand to empty strings and GSL_INC=[] xlqc-omp/main.cpp includes <gsl/gsl_math.h> and friends, and the -lgsl -lgslcblas flags disappear along with the paths, so the user now sees a missing-header or undefined-reference error with no hint that GSL is the problem. The old placeholder at least printed /path/to/gsl/include in the error. A fallback would keep both properties, for example assigning with ?= and defaulting to -lgsl -lgslcblas when gsl-config isn't found, or dropping 2>/dev/null so the shell error surfaces. The stated precedent doesn't hold up. The PR body says this matches "how e.g. mriQ-omp resolves external libraries," but mriQ-omp/Makefile has no external library at all: its LDFLAGS is empty and its only include is -I../mriQ-cuda. No Makefile in the repo currently uses gsl-config; the closest existing pattern is |
GSL_INC and GSL_LIB were hardcoded placeholders ("/path/to/gsl/...").
Use gsl-config to discover the installed GSL at build time.
Assisted-by: Claude Opus 4.6
…ride Address review: with 2>/dev/null the previous version expanded to empty strings when gsl-config was absent, producing a confusing missing-header error with no hint that GSL was the problem. Now: - Remove 2>/dev/null so the shell error surfaces. - Use ?= so callers can override GSL_INC/GSL_LIB directly. - Error out explicitly when GSL_LIB is empty. Assisted-by: Claude Opus 4.6
45f26a8 to
c6643cf
Compare
|
Thanks for the feedback, the variables can now be overridden. |
GSL_INC and GSL_LIB were hardcoded placeholders ("/path/to/gsl/...").
Use gsl-config to discover the installed GSL at build time.
Assisted-by: Claude Opus 4.6