Dear GSL developers,

I think there is an issue with the way Libs is declared in the GSL
pkgconfig file (gsl.pc) that results in downstream packages overlinking
against GSL's upstream dependencies.

I believe the following patch will correct this by using Libs.private to
indicate GSL's upstream dependencies in a way that downstream packages
aren't 'forced' to link against them also when using pkgconfig:

----------
diff --git a/gsl.pc.in b/gsl.pc.in
index 5e9ef218..f5705636 100644
--- a/gsl.pc.in
+++ b/gsl.pc.in
@@ -7,5 +7,6 @@ GSL_CBLAS_LIB=-lgslcblas
 Name: GSL
 Description: GNU Scientific Library
 Version: @VERSION@
-Libs: @GSL_LIBS@ ${GSL_CBLAS_LIB} @GSL_LIBM@ @LIBS@
+Libs: @GSL_LIBS@ ${GSL_CBLAS_LIB}
+Libs.private: @GSL_LIBS@ ${GSL_CBLAS_LIB} @GSL_LIBM@ @LIBS@
 Cflags: @GSL_CFLAGS@
----------

(this requires pkg-config >=0.18.0)

I'm not sure whether GSL_CBLAS_LIB is an upstream dependency, or something
that is actually provided by GSL, if the former then it should also be
moved into Libs.private.

If any of this is in error, or I have misunderstood how GSL actually works,
please accept my apologies.


Thanks
Duncan
-- 
Duncan Macleod
duncanmmacl...@gmail.com
Sêr Cymru Cofund Fellow
School of Physics and Astronomy
Cardiff University

Reply via email to