public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Build errors for older versions
@ 2024-04-25 11:19 Stefan Schulze Frielinghaus
  2024-04-25 15:54 ` Andrew Pinski
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Schulze Frielinghaus @ 2024-04-25 11:19 UTC (permalink / raw)
  To: gcc

Hi all,

while bisecting I recently ran into build errors like

In file included from /devel/gcc/libgcc/../gcc/tsystem.h:101,
                 from /devel/gcc/libgcc/libgcov.h:42,
                 from /devel/gcc/libgcc/libgcov-interface.c:26:
/usr/include/stdlib.h:931:6: error: wrong number of arguments specified for 'malloc' attribute
  931 |      __attr_dealloc_free __wur;
      |      ^~~~~~~~~~~~~~~~~~~
/usr/include/stdlib.h:931:6: note: expected between 0 and 0, found 2

My host system is Fedora 39 on x86_64 while trying to build
r11-3896-g61a43de58cb6de.  The error does not appear if I'm using e.g.
Fedora 34.  Is this known and if so does there exist a workaround such
that building older versions on a recent OS works?

Cheers,
Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Build errors for older versions
  2024-04-25 11:19 Build errors for older versions Stefan Schulze Frielinghaus
@ 2024-04-25 15:54 ` Andrew Pinski
  2024-04-25 16:00   ` H.J. Lu
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Pinski @ 2024-04-25 15:54 UTC (permalink / raw)
  To: Stefan Schulze Frielinghaus; +Cc: gcc, GNU C Library

On Thu, Apr 25, 2024 at 4:21 AM Stefan Schulze Frielinghaus via Gcc
<gcc@gcc.gnu.org> wrote:
>
> Hi all,
>
> while bisecting I recently ran into build errors like
>
> In file included from /devel/gcc/libgcc/../gcc/tsystem.h:101,
>                  from /devel/gcc/libgcc/libgcov.h:42,
>                  from /devel/gcc/libgcc/libgcov-interface.c:26:
> /usr/include/stdlib.h:931:6: error: wrong number of arguments specified for 'malloc' attribute
>   931 |      __attr_dealloc_free __wur;
>       |      ^~~~~~~~~~~~~~~~~~~
> /usr/include/stdlib.h:931:6: note: expected between 0 and 0, found 2
>
> My host system is Fedora 39 on x86_64 while trying to build
> r11-3896-g61a43de58cb6de.  The error does not appear if I'm using e.g.
> Fedora 34.  Is this known and if so does there exist a workaround such
> that building older versions on a recent OS works?

Basically glibc's check for GCC version is only designed for released
versions of GCC. So bisecting GCC means sometimes that check will
break.
I have not fully looked into it but maybe glibc folks can provide a
workaround to disable the version check to assume a much older version
of GCC here.

Thanks,
Andrew Pinski

>
> Cheers,
> Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Build errors for older versions
  2024-04-25 15:54 ` Andrew Pinski
@ 2024-04-25 16:00   ` H.J. Lu
  0 siblings, 0 replies; 3+ messages in thread
From: H.J. Lu @ 2024-04-25 16:00 UTC (permalink / raw)
  To: Andrew Pinski; +Cc: Stefan Schulze Frielinghaus, gcc, GNU C Library

On Thu, Apr 25, 2024 at 8:55 AM Andrew Pinski <pinskia@gmail.com> wrote:
>
> On Thu, Apr 25, 2024 at 4:21 AM Stefan Schulze Frielinghaus via Gcc
> <gcc@gcc.gnu.org> wrote:
> >
> > Hi all,
> >
> > while bisecting I recently ran into build errors like
> >
> > In file included from /devel/gcc/libgcc/../gcc/tsystem.h:101,
> >                  from /devel/gcc/libgcc/libgcov.h:42,
> >                  from /devel/gcc/libgcc/libgcov-interface.c:26:
> > /usr/include/stdlib.h:931:6: error: wrong number of arguments specified for 'malloc' attribute
> >   931 |      __attr_dealloc_free __wur;
> >       |      ^~~~~~~~~~~~~~~~~~~
> > /usr/include/stdlib.h:931:6: note: expected between 0 and 0, found 2
> >
> > My host system is Fedora 39 on x86_64 while trying to build
> > r11-3896-g61a43de58cb6de.  The error does not appear if I'm using e.g.
> > Fedora 34.  Is this known and if so does there exist a workaround such
> > that building older versions on a recent OS works?
>
> Basically glibc's check for GCC version is only designed for released
> versions of GCC. So bisecting GCC means sometimes that check will
> break.
> I have not fully looked into it but maybe glibc folks can provide a
> workaround to disable the version check to assume a much older version
> of GCC here.
>
> Thanks,
> Andrew Pinski

I keep the older versions of GCC around for this case:

[hjl@gnu-cfl-3 usr]$ ls -d /usr/gcc*
/usr/gcc-10.2.1-32bit  /usr/gcc-12.3.1-32bit  /usr/gcc-14.0.1-x32
/usr/gcc-10.2.1-mx32   /usr/gcc-12.3.1-mx32   /usr/gcc-6.4.1-x32
/usr/gcc-10.2.1-x32    /usr/gcc-12.3.1-x32    /usr/gcc-7.4.1-x32
/usr/gcc-11.2.1-32bit  /usr/gcc-13.2.1-32bit  /usr/gcc-8.4.1-x32
/usr/gcc-11.2.1-mx32   /usr/gcc-13.2.1-mx32   /usr/gcc-9.3.1-x32
/usr/gcc-11.2.1-x32    /usr/gcc-13.2.1-x32
[hjl@gnu-cfl-3 usr]$

-- 
H.J.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-25 16:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-25 11:19 Build errors for older versions Stefan Schulze Frielinghaus
2024-04-25 15:54 ` Andrew Pinski
2024-04-25 16:00   ` H.J. Lu

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 read-only IMAP folder(s) and NNTP newsgroup(s).