* Build error with GCC13 + newlib 4.1.0 - error: 'float_t' undeclared
@ 2023-05-28 0:01 Chris Packham
2023-05-28 0:28 ` Joel Sherrill
0 siblings, 1 reply; 6+ messages in thread
From: Chris Packham @ 2023-05-28 0:01 UTC (permalink / raw)
To: newlib
Hello from CT-NG,
I user reported the following build error with newlib after GCC13.1
was added recently
src/newlib/newlib/libm/math/wf_log2.c:34:22: error: 'float_t'
undeclared (first use in this function); did you mean 'float'?
34 | return (logf(x) / (float_t) M_LN2);
| ^~~~~~~
| float
From what I've been able to follow so far this may have something to
do with how FLT_EVAL_METHOD is defined. It's not really mentioned in
the GCC docs as something that has changed but I wonder if it is
perhaps implied by a C standard the default of which probably has
changed.
Does this ring any bells for anyone?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Build error with GCC13 + newlib 4.1.0 - error: 'float_t' undeclared
2023-05-28 0:01 Build error with GCC13 + newlib 4.1.0 - error: 'float_t' undeclared Chris Packham
@ 2023-05-28 0:28 ` Joel Sherrill
2023-05-28 2:00 ` Chris Packham
0 siblings, 1 reply; 6+ messages in thread
From: Joel Sherrill @ 2023-05-28 0:28 UTC (permalink / raw)
To: Chris Packham; +Cc: Newlib
[-- Attachment #1: Type: text/plain, Size: 1012 bytes --]
On Sat, May 27, 2023, 7:02 PM Chris Packham <judge.packham@gmail.com> wrote:
> Hello from CT-NG,
>
> I user reported the following build error with newlib after GCC13.1
> was added recently
>
By any chance did the default version of C change in 13 versus what
worked.before?
FWIW It looks.like the bleeding edge RTEMS tool builds in our farm have
some issue with gdb. So I don't have a handy case to compare.
> src/newlib/newlib/libm/math/wf_log2.c:34:22: error: 'float_t'
> undeclared (first use in this function); did you mean 'float'?
> 34 | return (logf(x) / (float_t) M_LN2);
> | ^~~~~~~
> | float
>
> From what I've been able to follow so far this may have something to
> do with how FLT_EVAL_METHOD is defined. It's not really mentioned in
> the GCC docs as something that has changed but I wonder if it is
> perhaps implied by a C standard the default of which probably has
> changed.
>
> Does this ring any bells for anyone?
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Build error with GCC13 + newlib 4.1.0 - error: 'float_t' undeclared
2023-05-28 0:28 ` Joel Sherrill
@ 2023-05-28 2:00 ` Chris Packham
2023-05-28 2:23 ` Chris Packham
0 siblings, 1 reply; 6+ messages in thread
From: Chris Packham @ 2023-05-28 2:00 UTC (permalink / raw)
To: joel; +Cc: Newlib
On Sun, May 28, 2023 at 12:28 PM Joel Sherrill <joel@rtems.org> wrote:
>
>
>
> On Sat, May 27, 2023, 7:02 PM Chris Packham <judge.packham@gmail.com> wrote:
>>
>> Hello from CT-NG,
>>
>> I user reported the following build error with newlib after GCC13.1
>> was added recently
>
>
> By any chance did the default version of C change in 13 versus what worked.before?
>
> FWIW It looks.like the bleeding edge RTEMS tool builds in our farm have some issue with gdb. So I don't have a handy case to compare.
>
https://gcc.gnu.org/gcc-13/changes.html doesn't mention it explicitly
but I wouldn't be surprised if it has.
>>
>> src/newlib/newlib/libm/math/wf_log2.c:34:22: error: 'float_t'
>> undeclared (first use in this function); did you mean 'float'?
>> 34 | return (logf(x) / (float_t) M_LN2);
>> | ^~~~~~~
>> | float
>>
>> From what I've been able to follow so far this may have something to
>> do with how FLT_EVAL_METHOD is defined. It's not really mentioned in
>> the GCC docs as something that has changed but I wonder if it is
>> perhaps implied by a C standard the default of which probably has
>> changed.
>>
>> Does this ring any bells for anyone?
I'll also add that I've now double checked the same configuration
works with GCC 12.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Build error with GCC13 + newlib 4.1.0 - error: 'float_t' undeclared
2023-05-28 2:00 ` Chris Packham
@ 2023-05-28 2:23 ` Chris Packham
2023-05-28 5:07 ` Brian Inglis
0 siblings, 1 reply; 6+ messages in thread
From: Chris Packham @ 2023-05-28 2:23 UTC (permalink / raw)
To: joel; +Cc: Newlib
On Sun, May 28, 2023 at 2:00 PM Chris Packham <judge.packham@gmail.com> wrote:
>
> On Sun, May 28, 2023 at 12:28 PM Joel Sherrill <joel@rtems.org> wrote:
> >
> >
> >
> > On Sat, May 27, 2023, 7:02 PM Chris Packham <judge.packham@gmail.com> wrote:
> >>
> >> Hello from CT-NG,
> >>
> >> I user reported the following build error with newlib after GCC13.1
> >> was added recently
> >
> >
> > By any chance did the default version of C change in 13 versus what worked.before?
> >
> > FWIW It looks.like the bleeding edge RTEMS tool builds in our farm have some issue with gdb. So I don't have a handy case to compare.
> >
>
> https://gcc.gnu.org/gcc-13/changes.html doesn't mention it explicitly
> but I wouldn't be surprised if it has.
>
> >>
> >> src/newlib/newlib/libm/math/wf_log2.c:34:22: error: 'float_t'
> >> undeclared (first use in this function); did you mean 'float'?
> >> 34 | return (logf(x) / (float_t) M_LN2);
> >> | ^~~~~~~
> >> | float
> >>
> >> From what I've been able to follow so far this may have something to
> >> do with how FLT_EVAL_METHOD is defined. It's not really mentioned in
> >> the GCC docs as something that has changed but I wonder if it is
> >> perhaps implied by a C standard the default of which probably has
> >> changed.
> >>
> >> Does this ring any bells for anyone?
>
> I'll also add that I've now double checked the same configuration
> works with GCC 12.2
Looks like the following two upstream newlb changes might help
https://sourceware.org/git?p=newlib-cygwin.git;a=commit;h=91f99d323b39dc0c06c40038791db9861d4b76b9
https://sourceware.org/git?p=newlib-cygwin.git;a=commit;h=27f0913c17c216548b2f5eea79037ee90038f375
Which leads into another question. ct-ng currently has newlib-4.1.0.
Looking at https://sourceware.org/ftp/newlib/index.html are the 4.2.0
and 4.3.0 dated snapshots the actual release or are they release
candidates?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Build error with GCC13 + newlib 4.1.0 - error: 'float_t' undeclared
2023-05-28 2:23 ` Chris Packham
@ 2023-05-28 5:07 ` Brian Inglis
2023-05-28 6:11 ` Brian Inglis
0 siblings, 1 reply; 6+ messages in thread
From: Brian Inglis @ 2023-05-28 5:07 UTC (permalink / raw)
To: Newlib; +Cc: Chris Packham
On 2023-05-27 20:23, Chris Packham wrote:
> On Sun, May 28, 2023 at 2:00 PM Chris Packham <judge.packham@gmail.com> wrote:
>> On Sun, May 28, 2023 at 12:28 PM Joel Sherrill <joel@rtems.org> wrote:
>>> On Sat, May 27, 2023, 7:02 PM Chris Packham <judge.packham@gmail.com> wrote:
>>>> I user reported the following build error with newlib after GCC13.1
>>>> was added recently
>>> By any chance did the default version of C change in 13 versus what worked.before?
>>> FWIW It looks.like the bleeding edge RTEMS tool builds in our farm have
>>> some issue with gdb. So I don't have a handy case to compare.
>> https://gcc.gnu.org/gcc-13/changes.html doesn't mention it explicitly
>> but I wouldn't be surprised if it has.
>>>> src/newlib/newlib/libm/math/wf_log2.c:34:22: error: 'float_t'
>>>> undeclared (first use in this function); did you mean 'float'?
>>>> 34 | return (logf(x) / (float_t) M_LN2);
>>>> | ^~~~~~~
>>>> | float
>>>> From what I've been able to follow so far this may have something to
>>>> do with how FLT_EVAL_METHOD is defined. It's not really mentioned in
>>>> the GCC docs as something that has changed but I wonder if it is
>>>> perhaps implied by a C standard the default of which probably has
>>>> changed.
>>>> Does this ring any bells for anyone?
>> I'll also add that I've now double checked the same configuration
>> works with GCC 12.2
> Looks like the following two upstream newlb changes might help
>
> https://sourceware.org/git?p=newlib-cygwin.git;a=commit;h=91f99d323b39dc0c06c40038791db9861d4b76b9
> https://sourceware.org/git?p=newlib-cygwin.git;a=commit;h=27f0913c17c216548b2f5eea79037ee90038f375
Commit
https://sourceware.org/git/?p=newlib-cygwin.git;a=commitdiff;h=b060af2264c9cecd960d19cd9f223d6b66ff1acc
was in newlib-2_0_0 end of 2012.
C99+ is required to use, as are the low level definitions of FLT_EVAL_METHOD or
__FLT_EVAL_METHOD__:
$ touch null.c
$ gcc -dM -E null.c | grep 'FLT_EVAL\|VERSION_'
#define __FLT_EVAL_METHOD__ 0
#define __FLT_EVAL_METHOD_TS_18661_3__ 0
#define __VERSION__ "11.3.0"
#define __STDC_VERSION__ 201710L
> Which leads into another question. ct-ng currently has newlib-4.1.0.
> Looking at https://sourceware.org/ftp/newlib/index.html are the 4.2.0
> and 4.3.0 dated snapshots the actual release or are they release
> candidates?
Both newlib and Cygwin are rolling releases, occasionally tagged for reference.
Latest newlib annual snapshot is 4.3.0 early this year, instead of 4.2.0 tag was
20211231, 4.1.0 was end of 2020.
--
Take care. Thanks, Brian Inglis Calgary, Alberta, Canada
La perfection est atteinte Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut
-- Antoine de Saint-Exupéry
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Build error with GCC13 + newlib 4.1.0 - error: 'float_t' undeclared
2023-05-28 5:07 ` Brian Inglis
@ 2023-05-28 6:11 ` Brian Inglis
0 siblings, 0 replies; 6+ messages in thread
From: Brian Inglis @ 2023-05-28 6:11 UTC (permalink / raw)
To: Newlib; +Cc: Chris Packham
On 2023-05-27 23:07, Brian Inglis wrote:
> On 2023-05-27 20:23, Chris Packham wrote:
>> On Sun, May 28, 2023 at 2:00 PM Chris Packham <judge.packham@gmail.com> wrote:
>>> On Sun, May 28, 2023 at 12:28 PM Joel Sherrill <joel@rtems.org> wrote:
>>>> On Sat, May 27, 2023, 7:02 PM Chris Packham <judge.packham@gmail.com> wrote:
>>>>> I user reported the following build error with newlib after GCC13.1
>>>>> was added recently
>>>> By any chance did the default version of C change in 13 versus what
>>>> worked.before?
>>>> FWIW It looks.like the bleeding edge RTEMS tool builds in our farm have
>>>> some issue with gdb. So I don't have a handy case to compare.
>>> https://gcc.gnu.org/gcc-13/changes.html doesn't mention it explicitly
>>> but I wouldn't be surprised if it has.
A few details have changed in the manual - search the man, info, PDF, PS, or
html for FLT_EVAL_METHOD.
>>>>> src/newlib/newlib/libm/math/wf_log2.c:34:22: error: 'float_t'
>>>>> undeclared (first use in this function); did you mean 'float'?
>>>>> 34 | return (logf(x) / (float_t) M_LN2);
>>>>> | ^~~~~~~
>>>>> | float
>>>>> From what I've been able to follow so far this may have something to
>>>>> do with how FLT_EVAL_METHOD is defined. It's not really mentioned in
>>>>> the GCC docs as something that has changed but I wonder if it is
>>>>> perhaps implied by a C standard the default of which probably has
>>>>> changed.
>>>>> Does this ring any bells for anyone?
>
>>> I'll also add that I've now double checked the same configuration
>>> works with GCC 12.2
>
>> Looks like the following two upstream newlb changes might help
>>
>> https://sourceware.org/git?p=newlib-cygwin.git;a=commit;h=91f99d323b39dc0c06c40038791db9861d4b76b9
>> https://sourceware.org/git?p=newlib-cygwin.git;a=commit;h=27f0913c17c216548b2f5eea79037ee90038f375
>
> Commit
> https://sourceware.org/git/?p=newlib-cygwin.git;a=commitdiff;h=b060af2264c9cecd960d19cd9f223d6b66ff1acc was in newlib-2_0_0 end of 2012.
>
> C99+ is required to use, as are the low level definitions of FLT_EVAL_METHOD or
> __FLT_EVAL_METHOD__:
>
> $ touch null.c
> $ gcc -dM -E null.c | grep 'FLT_EVAL\|VERSION_'
> #define __FLT_EVAL_METHOD__ 0
> #define __FLT_EVAL_METHOD_TS_18661_3__ 0
> #define __VERSION__ "11.3.0"
> #define __STDC_VERSION__ 201710L
--
Take care. Thanks, Brian Inglis Calgary, Alberta, Canada
La perfection est atteinte Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut
-- Antoine de Saint-Exupéry
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-05-28 6:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-28 0:01 Build error with GCC13 + newlib 4.1.0 - error: 'float_t' undeclared Chris Packham
2023-05-28 0:28 ` Joel Sherrill
2023-05-28 2:00 ` Chris Packham
2023-05-28 2:23 ` Chris Packham
2023-05-28 5:07 ` Brian Inglis
2023-05-28 6:11 ` Brian Inglis
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).