From patchwork Mon Oct 17 19:13:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Theodore Ts'o X-Patchwork-Id: 9485853 X-Mozilla-Keys: nonjunk Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on sandeen.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, RP_MATCHES_RCVD, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 X-Spam-HP: BAYES_00=-1.9, DKIM_SIGNED=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RP_MATCHES_RCVD=-0.1,T_DKIM_INVALID=0.01 X-Original-To: sandeen@sandeen.net Delivered-To: sandeen@sandeen.net Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by sandeen.net (Postfix) with ESMTP id E68243255 for ; Mon, 17 Oct 2016 14:12:59 -0500 (CDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965025AbcJQTNx (ORCPT ); Mon, 17 Oct 2016 15:13:53 -0400 Received: from imap.thunk.org ([74.207.234.97]:41160 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964997AbcJQTNv (ORCPT ); Mon, 17 Oct 2016 15:13:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=thunk.org; s=ef5046eb; h=Message-Id:Date:Subject:Cc:To:From; bh=hKHxKynW3O/6mbAhfMNIHfxE+1+qXUWy/OObtmPQMe4=; b=D3SQqFEhoAbRZAHFi58Fe9EkL06GPe08WJiHTawGB8j4Yc06KyfHwZ42ytE506MYyWlCiV5gSRPnXioyOFPsAiU2IoDt5AsFKGPqFFh0ZDeSrHQ1Vu6+l4VANAIIcYXRDlsHsbMTvHL5FDxVDjjxwej/jcMyjl4LjkR4kq3APMI=; Received: from root (helo=callcc.thunk.org) by imap.thunk.org with local-esmtp (Exim 4.84_2) (envelope-from ) id 1bwDLq-0003TH-NL; Mon, 17 Oct 2016 19:13:34 +0000 Received: by callcc.thunk.org (Postfix, from userid 15806) id 0AA36C00718; Mon, 17 Oct 2016 15:13:28 -0400 (EDT) From: Theodore Ts'o To: linux-xfs@vger.kernel.org Cc: Dmitry Monakhov , Theodore Ts'o Subject: [PATCH] mkfs.xfs: fix static-lib build Date: Mon, 17 Oct 2016 15:13:27 -0400 Message-Id: <20161017191327.16838-1-tytso@mit.edu> X-Mailer: git-send-email 2.9.3 X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Dmitry Monakhov Order is important for static libraries, libblkid depends on libuuid. We have to pass libuuid after libblkid, otherwise it fails like this: #make mkfs.xfs [LD] mkfs.xfs /bin/bash ../libtool --quiet --tag=CC --mode=link gcc -o mkfs.xfs -static -L/devel/xfstests-bld.git/bld/lib -static-libtool-libs maxtrres.o proto.o xfs_mkfs.o ../libxfs/libxfs.la ../libxcmd/libxcmd.la -luuid -lrt -lpthread -lblkid /devel/xfstests-bld.git/bld/lib/libblkid.a(probe.o): In function `set_uuid': /devel/xfstests-bld.git/e2fsprogs-libs/lib/blkid/probe.c:132: undefined reference to `uuid_is_null' /devel/xfstests-bld.git/e2fsprogs-libs/lib/blkid/probe.c:133: undefined reference to `uuid_unparse' /devel/xfstests-bld.git/bld/lib/libblkid.a(probe.o): In function `get_ext2_info': /devel/xfstests-bld.git/e2fsprogs-libs/lib/blkid/probe.c:156: undefined reference to `uuid_is_null' collect2: error: ld returned 1 exit status ../include/buildrules:45: recipe for target 'mkfs.xfs' failed make: *** [mkfs.xfs] Error 1 Signed-off-by: Dmitry Monakhov Signed-off-by: Theodore Ts'o --- mkfs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkfs/Makefile b/mkfs/Makefile index 170e3c1..c13b903 100644 --- a/mkfs/Makefile +++ b/mkfs/Makefile @@ -10,7 +10,7 @@ LTCOMMAND = mkfs.xfs HFILES = CFILES = maxtrres.c proto.c xfs_mkfs.c -LLDLIBS += $(LIBXFS) $(LIBXCMD) $(LIBUUID) $(LIBRT) $(LIBPTHREAD) $(LIBBLKID) +LLDLIBS += $(LIBXFS) $(LIBXCMD) $(LIBRT) $(LIBPTHREAD) $(LIBBLKID) $(LIBUUID) LTDEPENDENCIES += $(LIBXFS) $(LIBXCMD) LLDFLAGS = -static-libtool-libs