From patchwork Mon Dec 19 16:39:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrei Borzenkov X-Patchwork-Id: 88498 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp1256270qgi; Mon, 19 Dec 2016 08:39:54 -0800 (PST) X-Received: by 10.237.48.139 with SMTP id 11mr15733322qtf.219.1482165594549; Mon, 19 Dec 2016 08:39:54 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id h46si9996256qtf.130.2016.12.19.08.39.53 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 19 Dec 2016 08:39:54 -0800 (PST) Received-SPF: pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=grub-devel-bounces+patch=linaro.org@gnu.org; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com Received: from localhost ([::1]:46581 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cJ0yd-0003Sh-Tq for patch@linaro.org; Mon, 19 Dec 2016 11:39:51 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59324) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cJ0yY-0003Sb-GS for grub-devel@gnu.org; Mon, 19 Dec 2016 11:39:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cJ0yU-0006yn-Jy for grub-devel@gnu.org; Mon, 19 Dec 2016 11:39:46 -0500 Received: from mail-lf0-x241.google.com ([2a00:1450:4010:c07::241]:36649) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cJ0yU-0006yY-BU for grub-devel@gnu.org; Mon, 19 Dec 2016 11:39:42 -0500 Received: by mail-lf0-x241.google.com with SMTP id o20so7980612lfg.3 for ; Mon, 19 Dec 2016 08:39:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to; bh=bfvdOQsCGuABdk55BV9d2hS5EaR1bFVee61haii3hx4=; b=gdg5bYq73PWiGvzB/94FL0ostv8qJN98KTZvO7pTIv5WEReh6kotlkvoNcABvlKln0 LnpIzVr49Q27JojFZO2v+wDXnbJ8SKp+pkF1le5QXEeUlS+Hj5LvVYcbFQ1qnedqhVP/ COqLIzcuGqvJFYdBlS1GGCCmgNy6cdJQijFzQUkCh1MNgkhbarzcI4KQv4RInZgaYR3X 2YuZRRSEVlnRJTDajzy1ZvUmHnEZd7JHYJNFImdqypbNRqrwPjZ36WhGPpPZeNyUmtpp H492Isgc/AMGHq9NmzLJc2ENAYzaeObXkyhYPbfd8sTBppfkxCedKqPLt3YjzAahlOQ9 iPUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to; bh=bfvdOQsCGuABdk55BV9d2hS5EaR1bFVee61haii3hx4=; b=RcctlYTfinFB8hh6Mectbh9Dww89cQ1vqxlMJ+xl4/7bnfg0gsiUUNtCfpuuM8rS4p 05fIs6KzsTT+eeM/h0D5m29cPY1dmMHL3KU3qcOgLZp94DTSQrD0D3nOV/i2H/WbF7Cf qhCDfcbXQwAfd5L/+ABw7PMNvKxDXAx0N8NwLeLtmiOpOCwKW6mR0MNJlwriMZmR85/r dC+HDlgXEfOwZusZxaIuD/rUfHrLGO6KZwsH9OBU3Iv++LeEzwEdP7lMp8GushZt9bw3 4iEF3fNBqnSOccEsj0jrqt/WElp+zD7QC5DuWg9v4vnamxgcpy3mg22EDz528dZmtdV1 xPbA== X-Gm-Message-State: AIkVDXJN/fWZAqCLbtvcwOv7j0WRd9rAnqQdFZsqTtJ2rwKR7qnj4bnd9c3FCgDKYbg4WQ== X-Received: by 10.46.7.26 with SMTP id 26mr8043893ljh.18.1482165580759; Mon, 19 Dec 2016 08:39:40 -0800 (PST) Received: from [192.168.1.44] (ppp109-252-90-110.pppoe.spdop.ru. [109.252.90.110]) by smtp.gmail.com with ESMTPSA id 185sm3901163lfa.3.2016.12.19.08.39.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Dec 2016 08:39:40 -0800 (PST) Subject: Re: [PATCH] include sys/sysmacros.h for getting major() definition To: Khem Raj , floppym@gentoo.org References: <1482090557-15453-1-git-send-email-raj.khem@gmail.com> <7403132d-12f4-a41f-7259-d2004c01350f@gmail.com> <9DE3275F-0D26-4757-A74B-9FA574376DBE@gmail.com> <8C5E42F1-65CC-4DD1-8558-6BBD9B2EEB70@gmail.com> From: Andrei Borzenkov Message-ID: <5399704f-3d0e-0151-a02f-bbb7c605159d@gmail.com> Date: Mon, 19 Dec 2016 19:39:39 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <8C5E42F1-65CC-4DD1-8558-6BBD9B2EEB70@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::241 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The development of GNU GRUB Cc: The development of GNU GRUB Errors-To: grub-devel-bounces+patch=linaro.org@gnu.org Sender: "Grub-devel" 19.12.2016 03:12, Khem Raj пишет: > >> On Dec 18, 2016, at 12:57 PM, Andrei Borzenkov wrote: >> >> 18.12.2016 23:44, Khem Raj пишет: >>> >>>> On Dec 18, 2016, at 12:41 PM, Andrei Borzenkov wrote: >>>> >>>> 18.12.2016 23:38, Khem Raj пишет: >>>>> >>>>> Thanks for your review. On further investigation the issue seems to be autoconf related >>>>> with commit >>>>> http://git.savannah.gnu.org/cgit/grub.git/commit/?id=7a5b301e3adb8e054288518a325135a1883c1c6c >>>>> >>>>> grub is using AC_HEADER_MAJOR to find this out, however the check is failing >>>> >>>> Please attach config.log. >>>> >>>> >> >> This should be fixed in autoconf commit >> e17a30e987d7ee695fb4294a82d987ec3dc9b974 which will be in 2.70. I do not >> know what plans there are to release it. Can you test if using current >> autoconf GIT fixes this? You will need to rebuild configure using >> updated autoconf. > > I backported that patch into 2.69 and this fixed the issue. This patch can be dropped since its not needed with 2.70+ > and with the above back port for older autoconf. > We cannot really force everyone to use bleeding edge that is not even released. Could you please test attached patch with plain autoconf 2.69 or below? _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel From: Andrei Borzenkov Subject: [PATCH] configure: fix check for sys/sysmacros.h under glibc 2.25+ glibc 2.25 still includes sys/sysmacros.h in sys/types.h but also emits deprecation warning. So test for sys/types.h succeeds in configure but later compilation fails because we use -Werror by default. While this is fixed in current autoconf GIT, we really cannot force everyone to use bleeding edge (that is not even released right now). So run test under -Werror as well to force proper detection. This should have no impact on autoconf 2.70+ as AC_HEADER_MAJOR in this version simply checks for header existence. Reported and tested by Khem Raj --- configure.ac | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/configure.ac b/configure.ac index dc56564..4e980c5 100644 --- a/configure.ac +++ b/configure.ac @@ -389,7 +389,14 @@ fi # Check for functions and headers. AC_CHECK_FUNCS(posix_memalign memalign getextmntent) AC_CHECK_HEADERS(sys/param.h sys/mount.h sys/mnttab.h limits.h) + +# glibc 2.25 still includes sys/sysmacros.h in sys/types.h but emits deprecation +# warning which causes compilation failure later with -Werror. So use -Werror here +# as well to force proper sys/sysmacros.h detection. +SAVED_CFLAGS="$CFLAGS" +CFLAGS="$HOST_CFLAGS -Werror" AC_HEADER_MAJOR +CFLAGS="$SAVED_CFLAGS" AC_CHECK_MEMBERS([struct statfs.f_fstypename],,,[$ac_includes_default #include -- tg: (ce95549..) u/glibc-2.25-header_major (depends on: master)