Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1873455ybv; Thu, 6 Feb 2020 11:21:34 -0800 (PST) X-Google-Smtp-Source: APXvYqzsp3VvEbFSFR2rjM+fZxbxwsU4RNvWgpeEZSectMYFafhDbZHk/6Qv37yP5n+1y+h7xCRb X-Received: by 2002:a05:6830:22ee:: with SMTP id t14mr30813301otc.236.1581016894572; Thu, 06 Feb 2020 11:21:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581016894; cv=none; d=google.com; s=arc-20160816; b=eYbDfX2HZYxRCmvFzLD+bl720TyDoNhjKj+zjlehoEguQYANe9VRlidftXFBPFzHtm osEC3q2+MkgColCd0sQa1R7fmiOUv0YdoRehwwKsKiN8zZTcoIBbIZ8nSHXfnrd5v9Qd 0RbUXxXozdXkyH7QUgrwFTBCGC1B+pwu6bDaKrxBBkSLO3nbYKC3aXFStaAEcApTkWQO kYTwl2MTPOEOUJZM9xM7rUDV5mSKfWlZ+6b8wNpbPIiRw5M16jZRJN4ayx+DBYuF2x6U nR1x+jOY/a5PQkIYLmA9IJqRA9qvgnPPXuIYMH8F1llNhN2Kij++Yk64bJvNuhjpy26X VUnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=jSjZIFf8bov0cUpKlluvDppg7BypaTcf6SuSYJRnXGQ=; b=p6+cvPxZJ7uNKazfiCeN3RnKoSa7rMym9e9eYbpAYuFsYcgT+BPr9bMp7s9UPY+Ksp iWO9jNrJJHGVlxWXK4zg+JcOjv/AKwFRYhFiZTdhVEzOrMEKT+iY3Zs3w+3WN3J6OznF sEFp5iI9eZuy51SRE5Jve5hZ7pWyQurEwS9Jons/eYhC5ka0cTNp4vrpWSNaVY/imf0F OAAbDt+7SOik0xc0obifgoQGA8YxKZtKCEzEBU3k4PeGJRZ7rbGUxH8rtfVqFpgmV+Qy s9W9QV72n+XbGO6pZCfu1bjW5/C5RneNly6vvMP/RyT4OUofEDaeIgWJ71pRrhPlDfv2 9Wog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=b2xFuC7d; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w9si306974otl.138.2020.02.06.11.21.24; Thu, 06 Feb 2020 11:21:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=b2xFuC7d; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728001AbgBFTUV (ORCPT + 99 others); Thu, 6 Feb 2020 14:20:21 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:41885 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728085AbgBFTUU (ORCPT ); Thu, 6 Feb 2020 14:20:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581016819; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jSjZIFf8bov0cUpKlluvDppg7BypaTcf6SuSYJRnXGQ=; b=b2xFuC7dV8vcuCNORDC167Kpo1ntOnb0EPpkE3s5xef3K6T5NNOoSclQ951P7sL0c8zVLL XIIlVIPQXmXQsIVK6pnf42Cc1tPiB0xyl8iBxt8pqhF3hc11bW4m6F77fX8jTvf3n2EOB5 Fmy7oE3ZYsj0SxNToEbxhqiCJz0dguI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-216-_zh_Ai_XN_Wl6H21OtAeWA-1; Thu, 06 Feb 2020 14:20:13 -0500 X-MC-Unique: _zh_Ai_XN_Wl6H21OtAeWA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id ABB9F18B9FC1; Thu, 6 Feb 2020 19:20:12 +0000 (UTC) Received: from work (ovpn-205-99.brq.redhat.com [10.40.205.99]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C283019C7F; Thu, 6 Feb 2020 19:20:11 +0000 (UTC) Date: Thu, 6 Feb 2020 20:20:07 +0100 From: Lukas Czerner To: Eric Sandeen Cc: linux-ext4@vger.kernel.org, tytso@mit.edu Subject: Re: [PATCH] tst_libext2fs: Avoid multiple definition of global variables Message-ID: <20200206192007.l7fv4ljxhhmvdmvx@work> References: <20200130132122.21150-1-lczerner@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, Feb 06, 2020 at 11:52:17AM -0600, Eric Sandeen wrote: > On 1/30/20 7:21 AM, Lukas Czerner wrote: > > gcc version 10 changed the default from -fcommon to -fno-common and as a > > result e2fsprogs unit tests fail because tst_libext2fs.c end up with a > > build error. > > > > This is because it defines two global variables debug_prog_name and > > extra_cmds that are already defined in debugfs/debugfs.c. With -fcommon > > linker was able to resolve those into the same object, however with > > -fno-common it's no longer able to do it and we end up with > > multiple definition errors. > > > > Fix the problem by creating an extern declaration of said variables in > > debugfs.h and just setting them in tst_libext2fs.c without additional > > declaration. > > > > Signed-off-by: Lukas Czerner > > This looks fine to me. > > Reviewed-by: Eric Sandeen > > Is there any need to fix the one in lib/ext2fs/extent.c ? It's only there > under #ifdef DEBUG though. Yeah, but if we ever want to use DEBUG macro it would fail with -fno-common. Uff, I guess I have to fix this one as well. Thanks Eric, -Lukas > > Thanks, > -Eric >