From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id B808E1F461 for ; Sun, 19 May 2019 21:37:45 +0000 (UTC) Received: from localhost ([127.0.0.1]:54036 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSTUy-000473-5m for normalperson@yhbt.net; Sun, 19 May 2019 17:37:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58714) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hST7P-0000HW-8X for bug-gnulib@gnu.org; Sun, 19 May 2019 17:13:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hST7O-0004aJ-6t for bug-gnulib@gnu.org; Sun, 19 May 2019 17:13:19 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:42505) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hST7N-0004Zs-TL for bug-gnulib@gnu.org; Sun, 19 May 2019 17:13:18 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 5A2B421C47; Sun, 19 May 2019 17:13:17 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sun, 19 May 2019 17:13:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akhlaghi.org; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=U OO5k/odmhekg8qSXD2g9ooJ3dFkPd0lIY1rVanWcbs=; b=OuBYuYFKqv7dIHWDF 36hj8nUMtDR3Soj3UnItrJ6NA6E4shcF9jG2DazYwPdWRetXt/kaYKptN8feIdoM SfpfrqLD0VDJurlQmKsTTWGkb28NZnkY9Q0HguTbjOIn5VJ+YF4IxkOlj0KfejGZ vEgyjP3hrs7xCLGNVYxVqUcSvHpDy7RR/zC3hpTeS1DMmTMmRnjyLZabgFuhO7+J fnV21f7gnjhmJTnforBVvU6wA3Q74Mvv4QsS/am36xvOFsB/U0RwLtPcdHTvLWNP MivQciUzkD4HTXL+0u8h2CJMXZW5hkMOkvG8AcngRTl+Nu+dM30sSglNocsnIQyv Du5Aw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=UOO5k/odmhekg8qSXD2g9ooJ3dFkPd0lIY1rVanWc bs=; b=4Gl372QikZxEF2JNlO2T/GO/ZPthvCHllOacmh+NxftAox7sYmC/ixkBH azDtzw8LxGUEQTBppKBVM3B9m5w91G3qJjo0XNEUtnp5ZtXut+k/wljCPNJnhzKS XXYnbVmW6xnw9KvrI9DX1f2v/Sq+FQEtRzsi4nzbF/8QvJul/gD2s2i50Xh75991 i2emJsZ8svXbROTGt9NejkIKrfa6BvteyaXNcHeabKGFYRVVrBf+t2JVVhwBKtSb MouBJorl5gpC/s2XyE9m5BCSoE8uLf7MMLCtoc5krQ+RSOlMCkGwc9ALoBnmNMcs 56pxQ8qKkBbNRgt/SXexUJjbHXRTQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddruddtiedgudeivdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpefoohhh rghmmhgrugcutehkhhhlrghghhhiuceomhhohhgrmhhmrggusegrkhhhlhgrghhhihdroh hrgheqnecuffhomhgrihhnpehgnhhurdhorhhgnecukfhppedufeelrdegjedruddtkedr vdegleenucfrrghrrghmpehmrghilhhfrhhomhepmhhohhgrmhhmrggusegrkhhhlhgrgh hhihdrohhrghenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from [192.168.1.134] (unknown [139.47.108.249]) by mail.messagingengine.com (Postfix) with ESMTPA id EA66880060; Sun, 19 May 2019 17:13:15 -0400 (EDT) Subject: Re: getgroups.c failes to compile To: Bruno Haible References: <851aa96e-c6e9-e368-385c-460b8264b151@akhlaghi.org> <2712988.umiRIUVLac@omega> <15279857.vTerWvMteT@omega> From: Mohammad Akhlaghi Message-ID: Date: Sun, 19 May 2019 22:15:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <15279857.vTerWvMteT@omega> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.25 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: bug-gnulib@gnu.org Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" On 5/19/19 12:14 AM, Bruno Haible wrote: > Here's the relevant documentation: > https://www.gnu.org/software/gnulib/manual/html_node/Searching-for-Libraries.html#Locating-Libraries Thanks, I am busy testing `AC_LIB_LINKFLAGS' now. The fact that it modifies CPPFLAGS and adds `rpath' when necessary is great. However, from the outputs of `make', I noticed that it doesn't use `LTLIB' (which contains the `-L' option for the library's directory). As a result on a system with two versions of a library, compilation passes with the proper version of the library header (when using the correct `-I' with the updated `CPPFLAGS'). However, during linking, it links with the wrong version and we get a crash with a linking error. How can I get the `-L' part of `LTLIB' into LDFLAGS? I am thinking of adding a loop manually in `configure.ac' to do this for all the libraries I need, but before that, I am confused why `LTLIB' isn't being used by libtool as suggested in the Gnulib manual: "The macros also set a variable LTLIB, that should be used when linking with libtool." Thanks a lot, Mohammad