Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Seiderer <ps.report@gmx.net>
To: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Romain Naour <romain.naour@gmail.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/glibc: fix fsconfig_command redeclaration bug
Date: Tue, 4 Oct 2022 21:41:17 +0200	[thread overview]
Message-ID: <20221004214117.32c7ef31@gmx.net> (raw)
In-Reply-To: <20221004085922.3c755666@gmx.net>

Hello *,

On Tue, 4 Oct 2022 08:59:22 +0200, Peter Seiderer <ps.report@gmx.net> wrote:

> Hello *,
> 
> On Sun, 2 Oct 2022 09:40:28 +0200, "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> 
> [...]  
> > 
> > Yes, we really need to understand why it is broken in the first place,
> > to evaluate whether your patch is correct, or whether we should change
> > the way we do things in Buildroot. Hint: I think we do something in
> > Buildroot that is wrong (or has become wrong as time passed), but we
> > could not pinpoint it yet...
> >   
> > > >To be noted, and as Thomas noticed, OpenEmbeded is also using a glibc
> > > >2.36 commit, and even one older than ours, but they do not seem to have
> > > >issues.    
> > >   
> 
> With buildroot raspberrypi4_64_defconfig:
> 
>   In file included from .../host/aarch64-buildroot-linux-gnu/sysroot/usr/include/linux/fs.h:19,
>                    from ../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:75:
>   .../host/aarch64-buildroot-linux-gnu/sysroot/usr/include/linux/mount.h:92:6: error: multiple definition of ‘enum fsconfig_command’
>      92 | enum fsconfig_command {
>         |      ^~~~~~~~~~~~~~~~
>   In file included from ../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:62:
> .../build/host-gcc-final-11.3.0/build/gcc/include-fixed/sys/mount.h:249:6: note: previous definition here
>     249 | enum fsconfig_command
>         |      ^~~~~~~~~~~~~~~~
> 
> 
> Note the 'include-fixed' path, so diff the original vs. the fixed:
> 
> 	$ diff -u .../sysroot/usr/include/sys/mount.h /home/seiderer/Work/Buildroot/build_rpi4_64_glibc_001/build/host-gcc-final-11.3.0/build/gcc/include-fixed/sys/mount.h | cat
> --- .../sysroot/usr/include/sys/mount.h	2022-10-03 16:17:15.934642586 +0200
> +++ .../build/host-gcc-final-11.3.0/build/gcc/include-fixed/sys/mount.h	2022-10-03 16:20:35.862882930 +0200
> @@ -1,3 +1,12 @@
> +/*  DO NOT EDIT THIS FILE.
> +
> +    It has been auto-edited by fixincludes from:
> +
> +	".../sysroot/usr/include/sys/mount.h"
> +
> +    This had to be done to correct non-standard usages in the
> +    original, manufacturer supplied header file.  */
> +
>  /* Header file for mounting/unmount Linux filesystems.
>     Copyright (C) 1996-2022 Free Software Foundation, Inc.
>     This file is part of the GNU C Library.
> @@ -28,7 +37,7 @@
>  #include <sys/ioctl.h>
>  
>  #ifdef __has_include
> -# if __has_include ("linux/mount.h")
> +# if __has_include ("__linux__/mount.h")
>  #  include "linux/mount.h"
>  # endif
>  #endif
> 
> After changing back the line
> 
> 	# if __has_include ("__linux__/mount.h")
> 
> to
> 
> 	# if __has_include ("linux/mount.h")
> 
> the build succeeds...
> 
> Seems gcc fixincl does not handle the '# if __has_include' pattern the right way...
> 
> Same for all other '__has_include' usages:
> 
> 	$ grep -R __has_include build/host-gcc-final-11.3.0/build/gcc/include-fixed/
> build/host-gcc-final-11.3.0/build/gcc/include-fixed/bits/unistd_ext.h:#ifdef __has_include
> build/host-gcc-final-11.3.0/build/gcc/include-fixed/bits/unistd_ext.h:# if __has_include ("__linux__/close_range.h")
> build/host-gcc-final-11.3.0/build/gcc/include-fixed/bits/statx.h:   __has_include argument (GCC PR 80005).  */
> build/host-gcc-final-11.3.0/build/gcc/include-fixed/bits/statx.h:#ifdef __has_include
> build/host-gcc-final-11.3.0/build/gcc/include-fixed/bits/statx.h:# if __has_include ("__linux__/stat.h")
> build/host-gcc-final-11.3.0/build/gcc/include-fixed/sys/mount.h:#ifdef __has_include
> build/host-gcc-final-11.3.0/build/gcc/include-fixed/sys/mount.h:# if __has_include ("__linux__/mount.h")
> build/host-gcc-final-11.3.0/build/gcc/include-fixed/sys/rseq.h:#ifdef __has_include
> build/host-gcc-final-11.3.0/build/gcc/include-fixed/sys/rseq.h:# if __has_include ("__linux__/rseq.h")

And the corresponding gcc bug entry ([1]) and master branch patch ([2], [3])...

Regards,
Peter

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91085
[2] https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=6bf383c37e6131a8e247e8a0997d55d65c830b6d
[3] https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=6bf383c37e6131a8e247e8a0997d55d65c830b6d


> 
> 
> Regards,
> Peter
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2022-10-04 19:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-01  2:05 [Buildroot] [PATCH 1/1] package/glibc: fix fsconfig_command redeclaration bug Athaariq Ardhiansyah
2022-10-01 15:56 ` Yann E. MORIN
     [not found]   ` <84f6447a658a7c5c46852dc84fe5cb1a@athaariq.my.id>
2022-10-02  3:33     ` buildroot
2022-10-02  7:40       ` Yann E. MORIN
2022-10-04  6:59         ` Peter Seiderer
2022-10-04 19:41           ` Peter Seiderer [this message]
2022-10-05  2:08         ` buildroot

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=20221004214117.32c7ef31@gmx.net \
    --to=ps.report@gmx.net \
    --cc=buildroot@buildroot.org \
    --cc=romain.naour@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=yann.morin.1998@free.fr \
    /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