Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5334020ybv; Tue, 11 Feb 2020 13:43:40 -0800 (PST) X-Google-Smtp-Source: APXvYqx3+rJYkIqxYa+xX1Bu8guJeLTuHrQQ+Odih7aej1oVY+iZSwW9kox5wDaa96nw3ikp1o1n X-Received: by 2002:a9d:6f82:: with SMTP id h2mr6785940otq.69.1581457420714; Tue, 11 Feb 2020 13:43:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581457420; cv=none; d=google.com; s=arc-20160816; b=Vwc7Od9x38g8c6ysTfyp2+F9UduPln72L85QqVd9e30ZJbiQFQx8guOOKP6WvNyYEr sPmplRAPREnTOOIHpiNTAdfX14xtA5qsMXXeYNhwXxgBJKWTjqxX2iPOvpHeVqJdnGvK VPvM1/lI1iJjYeOEoWHpCqPoQ7m7bucVSVXA1YsXfyH+8FSZbv2G0EvvviCCXtWw6y2k 0tYIL5/wIyPP7Ge5ZxnWNW5mtOo2k4fbuG0kbr/uBrMi+4S7+6D88DvTtHXGCXospW3h PHY7W5m2gO2T8UQA0aATlfQdxtFBX7aCSSA2L2vGSdz1fyxRD9pnD3TMFcTRkan2MopZ EPog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:references:cc:to:from:subject:dkim-signature; bh=ACQocJcgpVb/FIe32fwrtamffCgXxNG9bC+VN8b56IM=; b=AkI0j3KMUPeFIVGBb3FYyn+adzXt9PGobbOm1NW4p4TEBe3I+b6jQLVPorw8rlSnQr VHtuU5YJ+EeVnXBF63hfKEKP/xB51B0+bW08GIcW8mqIm6EsvXer0dgu2S1sL8ZX74Jm 2PQq2hPZeDq0NHcd9F5HP3lVZkBlXAHOnIIErSUmRHUrC3Pvr1MUA9PiWwRcLccjg8f3 OK3+ReJ5UT2VksKbTF4mRdmUREtT5nq/WksNevxyI5/357HI4amtNdXCghS/JqQ2y6kL GUPC0Ywkk7af1ZcVkTzjLbn/YF8dN07UuVmR+7zSxJ3VeNyUrnxggSbJ7YTkZQFRffqA wniA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EtGMDkd+; 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 k20si2026767oiw.273.2020.02.11.13.43.29; Tue, 11 Feb 2020 13:43:40 -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=EtGMDkd+; 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 S1729821AbgBKVIk (ORCPT + 99 others); Tue, 11 Feb 2020 16:08:40 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:27829 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729031AbgBKVIk (ORCPT ); Tue, 11 Feb 2020 16:08:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581455318; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=ACQocJcgpVb/FIe32fwrtamffCgXxNG9bC+VN8b56IM=; b=EtGMDkd+rEkGGBDfIF5XoJOiwsEdOTu1clpXjT99hWSfgyuV1YOE16TGA4ADHPJddPWlZn PFBkMYhp0agTn22OKjVUtghdo3TxUYFKj02dOwN05YZRcxPh3gtT0CvgLu//Z/Iqw6fS40 pRsrZISrmHg1yLXa32sdalwafWV59Js= 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-392-c8m2Z6pJPZK8Dqa4Fhj56A-1; Tue, 11 Feb 2020 16:08:36 -0500 X-MC-Unique: c8m2Z6pJPZK8Dqa4Fhj56A-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B614A800D41; Tue, 11 Feb 2020 21:08:35 +0000 (UTC) Received: from [IPv6:::1] (ovpn04.gateway.prod.ext.phx2.redhat.com [10.5.9.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 52F0F5C10F; Tue, 11 Feb 2020 21:08:35 +0000 (UTC) Subject: Re: [PATCH v2] tst_libext2fs: Avoid multiple definition of global variables From: Eric Sandeen To: Lukas Czerner , linux-ext4@vger.kernel.org Cc: tytso@mit.edu References: <20200130132122.21150-1-lczerner@redhat.com> <20200210152459.19903-1-lczerner@redhat.com> Autocrypt: addr=sandeen@redhat.com; prefer-encrypt=mutual; keydata= mQINBE6x99QBEADMR+yNFBc1Y5avoUhzI/sdR9ANwznsNpiCtZlaO4pIWvqQJCjBzp96cpCs nQZV32nqJBYnDpBDITBqTa/EF+IrHx8gKq8TaSBLHUq2ju2gJJLfBoL7V3807PQcI18YzkF+ WL05ODFQ2cemDhx5uLghHEeOxuGj+1AI+kh/FCzMedHc6k87Yu2ZuaWF+Gh1W2ix6hikRJmQ vj5BEeAx7xKkyBhzdbNIbbjV/i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Pv yEF4ZycQwBdkqrtuQgrO9zToYWaQxtf+ACXoOI0a/RQ0Bf7kViH65wIllLICnewD738sqPGd N51fRrKBcDquSlfRjQW83/11+bjv4sartYCoE7JhNTcTr/5nvZtmgb9wbsA0vFw+iiUs6tTj eioWcPxDBw3nrLhV8WPf+MMXYxffG7i/Y6OCVWMwRgdMLE/eanF6wYe6o6K38VH6YXQw/0kZ +PrH5uP/0kwG0JbVtj9o94x08ZMm9eMa05VhuUZmtKNdGfn75S7LfoK+RyuO7OJIMb4kR7Eb FzNbA3ias5BaExPknJv7XwI74JbEl8dpheIsRbt0jUDKcviOOfhbQxKJelYNTD5+wE4+TpqH XQLj5HUlzt3JSwqSwx+++FFfWFMheG2HzkfXrvTpud5NrJkGGVn+ErXy6pNf6zSicb+bUXe9 i92UTina2zWaaLEwXspqM338TlFC2JICu8pNt+wHpPCjgy2Ei4u5/4zSYjiA+X1I+V99YJhU +FpT2jzfLUoVsP/6WHWmM/tsS79i50G/PsXYzKOHj/0ZQCKOsJM14NMMCC8gkONe4tek Message-ID: <76c6906f-a248-0087-0508-74a3c74405c2@redhat.com> Date: Tue, 11 Feb 2020 15:08:34 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On 2/11/20 2:22 PM, Eric Sandeen wrote: > On 2/10/20 9:24 AM, Lukas Czerner wrote: >> gcc version 10 changed the default from -fcommon to -fno-common and as a >> result e2fsprogs make check 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 using SKIP_GLOBDEFS macro to skip the variables >> definition in debugfs.c. Note that debug_prog_name is also defined in >> lib/ext2fs/extent.c when DEBUG macro is used, but this does not work even >> with older gcc versions and is never used regardless so I am not going to >> bother with it. >> >> Signed-off-by: Lukas Czerner >> --- >> v2: Previous fix wasn't really working properly > > What was not working properly? > > It seemed reasonable to me. The new mechanism looks like it would work, > but the first patch seemed more obvious, so I'd like to know what the problem > was. I built e2fsprogs & ran make check from git on Fedora Rawhide w/ your first patch, and it all seemed to work fine so I'll just stand by for more info. :) -Eric