GNU bug report logs - #36214
Linking problem with AC_LIB_HAVE_LINKFLAGS

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: libtool; Reported by: Bruno Haible <bruno@HIDDEN>; dated Fri, 14 Jun 2019 20:51:02 UTC; Maintainer for libtool is bug-libtool@HIDDEN.

Message received at 36214 <at> debbugs.gnu.org:


Received: (at 36214) by debbugs.gnu.org; 16 Jun 2019 06:56:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 16 02:56:06 2019
Received: from localhost ([127.0.0.1]:39594 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hcP5C-0004vq-LL
	for submit <at> debbugs.gnu.org; Sun, 16 Jun 2019 02:56:06 -0400
Received: from rila.superhosting.bg ([91.196.125.212]:56607)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bugtrack@HIDDEN>) id 1hcP5A-0004vF-Nv
 for 36214 <at> debbugs.gnu.org; Sun, 16 Jun 2019 02:56:05 -0400
Received: from [78.128.48.21] (port=38754 helo=[192.168.0.10])
 by rila.superhosting.bg with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128)
 (Exim 4.92) (envelope-from <bugtrack@HIDDEN>)
 id 1hcP4z-00006G-8c; Sun, 16 Jun 2019 09:55:56 +0300
Subject: Re: bug#36214: Linking problem with AC_LIB_HAVE_LINKFLAGS
To: 36214 <at> debbugs.gnu.org, bug-libtool@HIDDEN
References: <07a0a7c5-2df8-e276-da61-9e9df041efb4@HIDDEN>
 <4941399.qENikJAyml@omega>
 <7af37e3e-beb3-577f-ab9b-0bf6d8ca6b38@HIDDEN>
 <1976054.RuX2S2ljAY@omega>
From: Roumen Petrov <bugtrack@HIDDEN>
Message-ID: <bdeda99d-ee76-3366-83df-4b76ffe58497@HIDDEN>
Date: Sun, 16 Jun 2019 09:55:53 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Firefox/52.0 SeaMonkey/2.49.4
MIME-Version: 1.0
In-Reply-To: <1976054.RuX2S2ljAY@omega>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-OutGoing-Spam-Status: No, score=-0.2
X-AntiAbuse: This header was added to track abuse,
 please include it with any abuse report
X-AntiAbuse: Primary Hostname - rila.superhosting.bg
X-AntiAbuse: Original Domain - debbugs.gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - roumenpetrov.info
X-Get-Message-Sender-Via: rila.superhosting.bg: authenticated_id:
 master78@HIDDEN
X-Authenticated-Sender: rila.superhosting.bg: master78@HIDDEN
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 36214
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Bruno Haible wrote:
> [SNIP]
> Yes, such a libgnuastro.la file would be incorrect.
>
> Here's the way to make sure libgnuastro.la contains the right dependencies:
>    * For libraries that are provided by the same package:
>      libgnuastro_la_LDFLAGS = ... ../gsl/libgsl.la ...
>
foo_LIBADD vs foo_LDFLAGS

In above sample correct is first.
LDFLAGS is for flags like -module -no-undefined and etc.

Roumen





Information forwarded to bug-libtool@HIDDEN:
bug#36214; Package libtool. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 16 Jun 2019 06:56:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 16 02:56:09 2019
Received: from localhost ([127.0.0.1]:39596 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hcP5E-0004vz-W3
	for submit <at> debbugs.gnu.org; Sun, 16 Jun 2019 02:56:09 -0400
Received: from lists.gnu.org ([209.51.188.17]:53034)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bugtrack@HIDDEN>) id 1hcP5A-0004vd-0Y
 for submit <at> debbugs.gnu.org; Sun, 16 Jun 2019 02:56:06 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:44034)
 by lists.gnu.org with esmtp (Exim 4.86_2)
 (envelope-from <bugtrack@HIDDEN>) id 1hcP58-0002a8-Vu
 for bug-libtool@HIDDEN; Sun, 16 Jun 2019 02:56:03 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW,
 URIBL_BLOCKED autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <bugtrack@HIDDEN>) id 1hcP58-0000AP-5O
 for bug-libtool@HIDDEN; Sun, 16 Jun 2019 02:56:02 -0400
Received: from rila.superhosting.bg ([91.196.125.212]:50807)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <bugtrack@HIDDEN>)
 id 1hcP57-00007w-To
 for bug-libtool@HIDDEN; Sun, 16 Jun 2019 02:56:02 -0400
Received: from [78.128.48.21] (port=38754 helo=[192.168.0.10])
 by rila.superhosting.bg with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128)
 (Exim 4.92) (envelope-from <bugtrack@HIDDEN>)
 id 1hcP4z-00006G-8c; Sun, 16 Jun 2019 09:55:56 +0300
Subject: Re: bug#36214: Linking problem with AC_LIB_HAVE_LINKFLAGS
To: 36214 <at> debbugs.gnu.org, bug-libtool@HIDDEN
References: <07a0a7c5-2df8-e276-da61-9e9df041efb4@HIDDEN>
 <4941399.qENikJAyml@omega>
 <7af37e3e-beb3-577f-ab9b-0bf6d8ca6b38@HIDDEN>
 <1976054.RuX2S2ljAY@omega>
From: Roumen Petrov <bugtrack@HIDDEN>
Message-ID: <bdeda99d-ee76-3366-83df-4b76ffe58497@HIDDEN>
Date: Sun, 16 Jun 2019 09:55:53 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Firefox/52.0 SeaMonkey/2.49.4
MIME-Version: 1.0
In-Reply-To: <1976054.RuX2S2ljAY@omega>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-OutGoing-Spam-Status: No, score=-0.2
X-AntiAbuse: This header was added to track abuse,
 please include it with any abuse report
X-AntiAbuse: Primary Hostname - rila.superhosting.bg
X-AntiAbuse: Original Domain - gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - roumenpetrov.info
X-Get-Message-Sender-Via: rila.superhosting.bg: authenticated_id:
 master78@HIDDEN
X-Authenticated-Sender: rila.superhosting.bg: master78@HIDDEN
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 91.196.125.212
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Bruno Haible wrote:
> [SNIP]
> Yes, such a libgnuastro.la file would be incorrect.
>
> Here's the way to make sure libgnuastro.la contains the right dependencies:
>    * For libraries that are provided by the same package:
>      libgnuastro_la_LDFLAGS = ... ../gsl/libgsl.la ...
>
foo_LIBADD vs foo_LDFLAGS

In above sample correct is first.
LDFLAGS is for flags like -module -no-undefined and etc.

Roumen





Information forwarded to bug-libtool@HIDDEN:
bug#36214; Package libtool. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 14 Jun 2019 20:50:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 14 16:50:40 2019
Received: from localhost ([127.0.0.1]:37907 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hbt9k-0000q6-73
	for submit <at> debbugs.gnu.org; Fri, 14 Jun 2019 16:50:40 -0400
Received: from lists.gnu.org ([209.51.188.17]:57544)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bruno@HIDDEN>) id 1hbt9i-0000pz-QJ
 for submit <at> debbugs.gnu.org; Fri, 14 Jun 2019 16:50:39 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:34654)
 by lists.gnu.org with esmtp (Exim 4.86_2)
 (envelope-from <bruno@HIDDEN>) id 1hbt9g-0005hE-O6
 for bug-libtool@HIDDEN; Fri, 14 Jun 2019 16:50:38 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED
 autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <bruno@HIDDEN>) id 1hbt9e-0006DC-R9
 for bug-libtool@HIDDEN; Fri, 14 Jun 2019 16:50:36 -0400
Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::11]:36321)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <bruno@HIDDEN>) id 1hbt9c-00060B-Pd
 for bug-libtool@HIDDEN; Fri, 14 Jun 2019 16:50:33 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1560545423;
 s=strato-dkim-0002; d=clisp.org;
 h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:
 X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender;
 bh=gAqey23FGNGVXh6A356IZOGnGRrxnNfljp4as79F8R0=;
 b=MFZaWNpg3kjCzzbOxydXla++zr9mE43TEMfkiTyimZMvWY+79GHJmASM7UjQvyVbo+
 pbLVk2CThVX4dY1Z+a0j8j5gZcqzawhv3JPhmFWcEWrEBbIyog4TSyFtYV69A2xF6u7M
 +IY/8pU45EF2aS3yvI0LD9aV3GXroBYF6+q0MWuSDfcUKTIVF1112kmoaIsCtARBxdOT
 N1HvwFZAYRHsu6a3Sg7AWJE3UtFkwKtSqHtvhLZjKYPuY5Re3xizCaR5BcvgEIm/E1CR
 PqtQNUcPOO2Mbr9NUEzIG/6O0GUlIUf+M6iLdK+BjCioe9VgzwxTzDPKJnYf5kfGCbf6
 +T/w==
X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOGaf0y5RW"
X-RZG-CLASS-ID: mo00
Received: from bruno.haible.de by smtp.strato.de (RZmta 44.23 DYNA|AUTH)
 with ESMTPSA id 603f20v5EKoJB1c
 (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH
 bits, eq. 15360 bits RSA)) (Client did not present a certificate);
 Fri, 14 Jun 2019 22:50:19 +0200 (CEST)
From: Bruno Haible <bruno@HIDDEN>
To: Mohammad Akhlaghi <mohammad@HIDDEN>
Subject: Re: Linking problem with AC_LIB_HAVE_LINKFLAGS
Date: Fri, 14 Jun 2019 22:50:19 +0200
Message-ID: <1976054.RuX2S2ljAY@omega>
User-Agent: KMail/5.1.3 (Linux/4.4.0-145-generic; KDE/5.18.0; x86_64; ; )
In-Reply-To: <7af37e3e-beb3-577f-ab9b-0bf6d8ca6b38@HIDDEN>
References: <07a0a7c5-2df8-e276-da61-9e9df041efb4@HIDDEN>
 <4941399.qENikJAyml@omega>
 <7af37e3e-beb3-577f-ab9b-0bf6d8ca6b38@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2a01:238:20a:202:5300::11
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
Cc: bug-libtool@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

[CCing bug-libtool]

Mohammad Akhlaghi wrote:
> Upon further inspection, I noticed that because `AC_LIB_HAVE_LINKFLAGS' 
> actually returns the absolute address of the shared libraries, there is 
> also no reference to the GSL library (often linked with `-lgsl 
> -lgslcblas') in the `dependency_libs' variable of the created and 
> installed `libgnuastro.la'.
> 
> The fact that there is no reference to GSL (as a mandatory dependency of 
> libgnuastro) in `libgnuastro.la' is not good, because calls to libtool 
> that use the `.la' files will not know they should link with GSL.

Yes, such a libgnuastro.la file would be incorrect.

Here's the way to make sure libgnuastro.la contains the right dependencies:
  * For libraries that are provided by the same package:
    libgnuastro_la_LDFLAGS = ... ../gsl/libgsl.la ...
  * For libraries that are provided by other packages:
    libgnuastro_la_LDFLAGS = ... -lgsl ...
    Here, if you used AC_LIB_HAVE_LINKFLAGS([gsl], ...), you would use
    libgnuastro_la_LDFLAGS = ... @LTLIBGSL@ ...

To make sure your libgnuastro_la_LDFLAGS are complete, it's a good idea to
add   -lc -no-undefined  at the end:
    libgnuastro_la_LDFLAGS = ... -lc -no-undefined

> Do you know any library that uses `AC_LIB_HAVE_LINKFLAGS'? So far, I 
> have only seen Wget which uses it. I am really curious to see what I am 
> doing wrong, or how they solve all these problems it causes.

There are unit tests in gnulib/tests/havelib/rpathy/ and
gnulib/tests/havelib/rpathz. Also, the following packages use it:
  - gettext, uses $(LTLIBUNISTRING) @LTLIBICONV@ @LTLIBTHREAD@.
  - guile, uses $(LTLIBUNISTRING) $(LTLIBICONV) $(LTLIBINTL) $(LTLIBGMP) $(LTLIBLTDL).
  - gawk, uses $(LTLIBINTL).
  - texinfo, uses $(LTLIBICONV).
  - libffcall, uses $(LTLIBTHREAD).
  - recutils, uses $(LTLIBGCRYPT) $(LTLIBINTL) $(LTLIBREADLINE) $(LTLIBTHREAD).
  - gdbm, uses @LTLIBINTL@.
  - taler, uses $(LTLIBINTL).
  - and surely more.

Bruno





Acknowledgement sent to Bruno Haible <bruno@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-libtool@HIDDEN. Full text available.
Report forwarded to bug-libtool@HIDDEN:
bug#36214; Package libtool. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.