buildroot.busybox.net archive mirror
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: Fabrice Fontaine <fontaine.fabrice@gmail.com>, buildroot@buildroot.org
Cc: Matt Weber <matthew.weber@collins.com>
Subject: Re: [Buildroot] [PATCH 1/1] package/lighttpd: run autoreconf
Date: Mon, 22 Nov 2021 21:42:39 +0100	[thread overview]
Message-ID: <e4c35292-8807-37f1-086c-95d9b274df44@mind.be> (raw)
In-Reply-To: <20211118210623.1598934-1-fontaine.fabrice@gmail.com>



On 18/11/2021 22:06, Fabrice Fontaine wrote:
> For an unknown reason, the build fails since bump to version 1.4.60 in
> commit d62b7f54f00291a50274409fb5510527fd725ffe on:
> 
> array.c:140:2: error: 'for' loop initial declarations are only allowed in C99 mode
>    for (uint32_t i = 0; i < sz; ++i) {
>    ^
> 
> Running autoreconf fixes the build.
> 
> Fixes:
>   - http://autobuild.buildroot.org/results/0349d8fed35b0766796dd9ba3b8de6ff8bd68fe7
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

  After reading this thread and the upstream bug report, I did a bunch more 
analysis and drilled it down to the real issue. See the bug report and the 
updated commit message:

     Since upstream commit bb1d35dc1767 [1] (which is part of the bump to
     version 1.4.60), configure.ac no longer checks for a specific C
     standard. It will therefore use the "default" standard. With autoconf
     2.69 (which is what is used to generate the configure script in the
     tarball), the default standard is C89, which requires no option to be
     passed to the compiler. However, that means that older compilers, e.g.
     GCC 4.8, will indeed use C89 and not C99. This leads to the following
     error.

     array.c:140:2: error: 'for' loop initial declarations are only allowed in 
C99 mode
       for (uint32_t i = 0; i < sz; ++i) {
       ^

     In autoconf 2.71 (which is used by Buildroot), the default standard has
     changed: it is now C11 if available, C99 failing that, and finally fall
     back to C89. Since GCC 4.8 (and later) support C11, that's what will be
     selected, so C99 is allowed as well. Thus, running autoreconf fixes the
     build.

     The issue was reported upstream [2].

     Fixes:
      - 
http://autobuild.buildroot.org/results/0349d8fed35b0766796dd9ba3b8de6ff8bd68fe7

     [1] 
https://redmine.lighttpd.net/projects/lighttpd/repository/14/revisions/bb1d35dc17671bc308e25651b4f5fa0c3008cc69
     [2] https://redmine.lighttpd.net/issues/3116


  Applied to master, thanks.

  Regards,
  Arnout

> ---
>   package/lighttpd/lighttpd.mk | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/package/lighttpd/lighttpd.mk b/package/lighttpd/lighttpd.mk
> index 9c18a6038e..c39a5db20f 100644
> --- a/package/lighttpd/lighttpd.mk
> +++ b/package/lighttpd/lighttpd.mk
> @@ -12,6 +12,8 @@ LIGHTTPD_LICENSE = BSD-3-Clause
>   LIGHTTPD_LICENSE_FILES = COPYING
>   LIGHTTPD_CPE_ID_VENDOR = lighttpd
>   LIGHTTPD_DEPENDENCIES = host-pkgconf
> +# Issue in configure script provided in tarball
> +LIGHTTPD_AUTORECONF = YES
>   LIGHTTPD_CONF_OPTS = \
>   	--without-wolfssl \
>   	--libdir=/usr/lib/lighttpd \
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2021-11-22 20:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-18 21:06 [Buildroot] [PATCH 1/1] package/lighttpd: run autoreconf Fabrice Fontaine
2021-11-19 23:32 ` Peter Seiderer
2021-11-20  9:23   ` Fabrice Fontaine
2021-11-20 19:53     ` Peter Seiderer
2021-11-20 20:15       ` Fabrice Fontaine
2021-11-20 20:23         ` Peter Seiderer
2021-11-20 20:39           ` Fabrice Fontaine
2021-11-21 21:32             ` Peter Seiderer
2021-11-22 20:42 ` Arnout Vandecappelle [this message]
2021-11-23 18:33   ` Peter Seiderer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e4c35292-8807-37f1-086c-95d9b274df44@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@buildroot.org \
    --cc=fontaine.fabrice@gmail.com \
    --cc=matthew.weber@collins.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).