Received: by 2002:a05:6359:322:b0:b3:69d0:12d8 with SMTP id ef34csp59005rwb; Wed, 10 Aug 2022 14:49:32 -0700 (PDT) X-Google-Smtp-Source: AA6agR7zAGqEELM2qxEc7wLvtERXCXSmGd5LoEL2rbo+AYEaR1pNhVp1s038rI/SxMPdjS6qhhqr X-Received: by 2002:a63:220d:0:b0:41a:a604:8540 with SMTP id i13-20020a63220d000000b0041aa6048540mr24436351pgi.390.1660168172138; Wed, 10 Aug 2022 14:49:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660168172; cv=none; d=google.com; s=arc-20160816; b=o5MP5/ihN9Q/KBN1p0/MxIcMhWAoRle7DcGKCQ380amYlmgLgnhZFMKWW6H/a9Yxdh 3QFhbYWB7ypbDS2Cus7cocDP8YHS8O7lzhROfhYKEZglnmAtcX4XsuMLbI4mJ6NgChvR y9GnbWvrk6WVHehJe5M/GVMhFt1DScpEaKEGK7zGZbWfT/U/Mzo4vigwob6hDGwz5HPr JesK0dNnCVq4Xq3vMJ01scV5K+e6DxGm2/65DI6bEpvUda0zis/NVk7hIVSDTCnk0mCh qFe2DvMXH7223ct2f6+PD8IuQfK6ZsLa7W9YAPgDmFKzOPBK4GRtk5rdhi1MM51I9fTW vlhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=EJ9XZzRelKrO8a2qBYHSLX7jf8iZrWtJU5Of7VCBQ0E=; b=MCI9MuOQunCmxZG5hcQg+dZCYYPW7JIsi+dzf6u6QiZ//eQnXTtcgP5Br0uKkIpAyJ uKAMlrbo1yAJYDbuXTj8wf0tthjdIr6f04PJa/VRvCQW3QTMgdNO64uyj/NH32Pj2dSb Dy5YjEYwt7gGX0RXB/0XkmZGiYGfTRKDVwo7TyKdkl2jhfksmpUIsTxjjW1ET5f+w/rv 7JMHW6MTozrI0hrc8aTYuYd07St/n/F7p3eU0lG78Tdis6nas2rGW1rjXBKy7qwz8tjY vPso/K2fInb5p9JRD8wmg9eJw+RjCwAewZtVYzO0BIDCYSDhSJSz2JKWel4W8s+sdqkW Zq7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aruba.it header.s=a1 header.b=jgCP+R3s; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d190-20020a621dc7000000b0052550da6c0bsi3301823pfd.29.2022.08.10.14.49.17; Wed, 10 Aug 2022 14:49:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@aruba.it header.s=a1 header.b=jgCP+R3s; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231533AbiHJVqE (ORCPT + 99 others); Wed, 10 Aug 2022 17:46:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231508AbiHJVqD (ORCPT ); Wed, 10 Aug 2022 17:46:03 -0400 Received: from smtpcmd01-ws.aruba.it (smtpcmd01-ws.aruba.it [62.149.158.241]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 561A450185 for ; Wed, 10 Aug 2022 14:45:57 -0700 (PDT) Received: from localhost.localdomain ([86.32.63.136]) by Aruba Outgoing Smtp with ESMTPSA id LtWVonv9or8wyLtWWoBOdr; Wed, 10 Aug 2022 23:45:56 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aruba.it; s=a1; t=1660167956; bh=UAoNYouwoS+1+8VIqxJalEPvbD9bakxlPHxlUdkDve0=; h=From:To:Subject:Date:MIME-Version; b=jgCP+R3s1XKbifA4Bs6B6N75dYhot5Ebqg45D8bYZZOqG5oN3p34pRzMUAgmOtosy GYIizS9Y4yN1nevgAmHZ3u3wZPlX9YXqm2E6N1mKn3f3HCNsOUIldD9XHZy+CYX6TH XFxuuUMeCnks24L+AQWXoY+hy1iQH2NIeniXJexAU9oPb7wy3MLkAAjPMZIJWJt6Sa 8AMcaeCCTOsQ3wbrQtZSUBbKyF3I26sxuFK+V8hNCTvnWKKn3oZiLw1auMTngPOCSv qy7refLb6xsqbrvl0rpf5dIAcvxV9H6lRSe0L4xGQ6G+jOfl6d8qQBqfRO7u2sClsD QYrv1/SzfJvTw== From: Giulio Benetti To: linux-nfs@vger.kernel.org Cc: Giulio Benetti Subject: [PATCH v3] nfsrahead: fix linking while static linking Date: Wed, 10 Aug 2022 23:45:54 +0200 Message-Id: <20220810214554.107094-1-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220809223308.1421081-1-giulio.benetti@benettiengineering.com> References: <20220809223308.1421081-1-giulio.benetti@benettiengineering.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfMVFUVYZ0/KjKbP/g72z2BJcG4NtHsn2/LCkviEoNDFgu4e1waj+nJAstJkO8HvBa3Snm6qz3tcWwSbUd79J9uH+F+3FN/DhznaCkPLvROvQTq7jdHBy 0Q47HvEzN4fWcZesIRAYAiXRQrPh7siJD0TuT2Kz/+ax9xdxwweaDJ0LPqVz3YFlLo0adXCM10mRjNTIn9lRJj5X3KCmiDwxbewP47YPj+0lvUAGTdR9oLYs NZygUXJQdx9JWgVgrEmwfDfHUC8ybiZMjCPEENUk0PpGAt9IZmzWFPiYLVaJyB4Z X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org -lmount must preceed -lblkid and to obtain this let's add in configure.ac: PKG_CHECK_MODULES([LIBMOUNT], [mount]) and in tools/nfsrahead/Makefile.am let's substitute explicit `-lmount` with: $(LIBMOUNT_LIBS) This way all the required libraries will be present and in the right order when static linking. Signed-off-by: Giulio Benetti --- V1->V2: * modify pkg-conf to pkg-config V2->V3: * use the correct way for using pkg-config with Autotools --- configure.ac | 3 +++ tools/nfsrahead/Makefile.am | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index f1c46c5c..ff85200b 100644 --- a/configure.ac +++ b/configure.ac @@ -273,6 +273,9 @@ AC_LIBCAP dnl Check for -lxml2 AC_LIBXML2 +dnl Check for -lmount +PKG_CHECK_MODULES([LIBMOUNT], [mount]) + # Check whether user wants TCP wrappers support AC_TCP_WRAPPERS diff --git a/tools/nfsrahead/Makefile.am b/tools/nfsrahead/Makefile.am index 845ea0d5..7e08233a 100644 --- a/tools/nfsrahead/Makefile.am +++ b/tools/nfsrahead/Makefile.am @@ -1,6 +1,6 @@ libexec_PROGRAMS = nfsrahead nfsrahead_SOURCES = main.c -nfsrahead_LDFLAGS= -lmount +nfsrahead_LDFLAGS= $(LIBMOUNT_LIBS) nfsrahead_LDADD = ../../support/nfs/libnfsconf.la man5_MANS = nfsrahead.man -- 2.34.1