bug-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gsl] Libs declarations in gsl.pc (pkgconfig)


From: Peter Johansson
Subject: Re: [Bug-gsl] Libs declarations in gsl.pc (pkgconfig)
Date: Sun, 14 Apr 2019 11:31:15 +1000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

Hi Duncan,

I'm not a maintainer, but I think putting GSL_CBLAS_LIB in private will break many things. The user needs to link against cblas library and by design GSL is not linking in any cblas lib when libgsl is built. The idea is to give the use the freedom to choose and this freedom comes with the cost that one cannot rely on implicit linking.

The other changes make sense to me, but not up to me to decide (obviously).


Cheers,

Peter



On 3/26/2019 9:13 PM, Duncan Macleod wrote:
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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]