public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/101867] New: avr libc build error for libstdc++
@ 2021-08-11 20:24 unlvsur at live dot com
  2021-08-11 20:48 ` [Bug libstdc++/101867] " redi at gcc dot gnu.org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: unlvsur at live dot com @ 2021-08-11 20:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101867

            Bug ID: 101867
           Summary: avr libc build error for libstdc++
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: unlvsur at live dot com
  Target Milestone: ---

Created attachment 51292
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51292&action=edit
error message

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

* [Bug libstdc++/101867] avr libc build error for libstdc++
  2021-08-11 20:24 [Bug libstdc++/101867] New: avr libc build error for libstdc++ unlvsur at live dot com
@ 2021-08-11 20:48 ` redi at gcc dot gnu.org
  2021-08-11 20:51 ` unlvsur at live dot com
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: redi at gcc dot gnu.org @ 2021-08-11 20:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101867

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2021-08-11

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
How did you run configure?

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

* [Bug libstdc++/101867] avr libc build error for libstdc++
  2021-08-11 20:24 [Bug libstdc++/101867] New: avr libc build error for libstdc++ unlvsur at live dot com
  2021-08-11 20:48 ` [Bug libstdc++/101867] " redi at gcc dot gnu.org
@ 2021-08-11 20:51 ` unlvsur at live dot com
  2021-08-11 20:58 ` unlvsur at live dot com
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: unlvsur at live dot com @ 2021-08-11 20:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101867

--- Comment #2 from cqwrteur <unlvsur at live dot com> ---
(In reply to Jonathan Wakely from comment #1)
> How did you run configure?

../gcc/configure --disable-nls --disable-werror --disable-libstdcxx-verbose
--enable-libstdc++ --disable-ssp --enable-languages=c,c++ --prefix=$PREFIX
--target=avr --disable-shared --with-newlib


But I guess since avr libc does not provide a full locale stub, libstdc++
cannot be built. 



no with-newlib:

checking for shl_load... configure: error: Link tests are not allowed after
GCC_NO_EXECUTABLES.

../gcc/configure --disable-nls --disable-werror --disable-libstdcxx-verbose
--enable-libstdc++ --disable-ssp --enable-languages=c,c++ --prefix=$PREFIX
--target=avr --disable-shared

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

* [Bug libstdc++/101867] avr libc build error for libstdc++
  2021-08-11 20:24 [Bug libstdc++/101867] New: avr libc build error for libstdc++ unlvsur at live dot com
  2021-08-11 20:48 ` [Bug libstdc++/101867] " redi at gcc dot gnu.org
  2021-08-11 20:51 ` unlvsur at live dot com
@ 2021-08-11 20:58 ` unlvsur at live dot com
  2021-08-11 21:00 ` unlvsur at live dot com
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: unlvsur at live dot com @ 2021-08-11 20:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101867

--- Comment #3 from cqwrteur <unlvsur at live dot com> ---
Created attachment 51293
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51293&action=edit
config file

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

* [Bug libstdc++/101867] avr libc build error for libstdc++
  2021-08-11 20:24 [Bug libstdc++/101867] New: avr libc build error for libstdc++ unlvsur at live dot com
                   ` (2 preceding siblings ...)
  2021-08-11 20:58 ` unlvsur at live dot com
@ 2021-08-11 21:00 ` unlvsur at live dot com
  2021-08-11 21:04 ` unlvsur at live dot com
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: unlvsur at live dot com @ 2021-08-11 21:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101867

--- Comment #4 from cqwrteur <unlvsur at live dot com> ---
Created attachment 51294
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51294&action=edit
end part of error messages

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

* [Bug libstdc++/101867] avr libc build error for libstdc++
  2021-08-11 20:24 [Bug libstdc++/101867] New: avr libc build error for libstdc++ unlvsur at live dot com
                   ` (3 preceding siblings ...)
  2021-08-11 21:00 ` unlvsur at live dot com
@ 2021-08-11 21:04 ` unlvsur at live dot com
  2021-08-11 21:53 ` unlvsur at live dot com
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: unlvsur at live dot com @ 2021-08-11 21:04 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101867

--- Comment #5 from cqwrteur <unlvsur at live dot com> ---
https://github.com/vancegroup-mirrors/avr-libc

you can try it by yourself with avr-libc

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

* [Bug libstdc++/101867] avr libc build error for libstdc++
  2021-08-11 20:24 [Bug libstdc++/101867] New: avr libc build error for libstdc++ unlvsur at live dot com
                   ` (4 preceding siblings ...)
  2021-08-11 21:04 ` unlvsur at live dot com
@ 2021-08-11 21:53 ` unlvsur at live dot com
  2021-08-11 22:09 ` redi at gcc dot gnu.org
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: unlvsur at live dot com @ 2021-08-11 21:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101867

--- Comment #6 from cqwrteur <unlvsur at live dot com> ---
Created attachment 51295
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51295&action=edit
errors with --with-avr

i just find --with-avr toggle in the libstdc++'s configure. but it has other
issues here.

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

* [Bug libstdc++/101867] avr libc build error for libstdc++
  2021-08-11 20:24 [Bug libstdc++/101867] New: avr libc build error for libstdc++ unlvsur at live dot com
                   ` (5 preceding siblings ...)
  2021-08-11 21:53 ` unlvsur at live dot com
@ 2021-08-11 22:09 ` redi at gcc dot gnu.org
  2021-08-11 22:11 ` unlvsur at live dot com
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: redi at gcc dot gnu.org @ 2021-08-11 22:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101867

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Right, you need to use --with-avr

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

* [Bug libstdc++/101867] avr libc build error for libstdc++
  2021-08-11 20:24 [Bug libstdc++/101867] New: avr libc build error for libstdc++ unlvsur at live dot com
                   ` (6 preceding siblings ...)
  2021-08-11 22:09 ` redi at gcc dot gnu.org
@ 2021-08-11 22:11 ` unlvsur at live dot com
  2021-08-11 22:16 ` unlvsur at live dot com
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: unlvsur at live dot com @ 2021-08-11 22:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101867

--- Comment #8 from cqwrteur <unlvsur at live dot com> ---
(In reply to Jonathan Wakely from comment #7)
> Right, you need to use --with-avr

--with-avrlibc
Yeah.

But it is not documented.

in the /src/c++11/system_error.cc

#ifdef __AVR__
      return std::error_condition(ev, std::system_category());
#else
      switch (ev)
      {

#endif

i feel this switch is pointless.

https://github.com/vancegroup-mirrors/avr-libc/blob/master/avr-libc/include/errno.h

If you look at the errno.h here, it is pretty bad.

I think this switch should just be removed.
../../../../../../../gcc/libstdc++-v3/src/c++11/random.cc:399:7: error:
'::close' has not been declared; did you mean 'fclose'?
  399 |     ::close(_M_fd);
      |       ^~~~~
      |       fclose
Also this close stuff.

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

* [Bug libstdc++/101867] avr libc build error for libstdc++
  2021-08-11 20:24 [Bug libstdc++/101867] New: avr libc build error for libstdc++ unlvsur at live dot com
                   ` (7 preceding siblings ...)
  2021-08-11 22:11 ` unlvsur at live dot com
@ 2021-08-11 22:16 ` unlvsur at live dot com
  2021-08-11 23:14 ` unlvsur at live dot com
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: unlvsur at live dot com @ 2021-08-11 22:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101867

--- Comment #9 from cqwrteur <unlvsur at live dot com> ---
(In reply to Jonathan Wakely from comment #7)
> Right, you need to use --with-avr

https://github.com/gcc-mirror/gcc/commit/75aee072696a711f3e5b3bd1ab1f2b10fef4c7dd#diff-304a8fc076ccc48dd33f53a740ca6860dac5fafedeaa2d51aa9a17f3947b74c8

How to use stdio_pure as implementation? Since avrlibc does not provide posix
fd.

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

* [Bug libstdc++/101867] avr libc build error for libstdc++
  2021-08-11 20:24 [Bug libstdc++/101867] New: avr libc build error for libstdc++ unlvsur at live dot com
                   ` (8 preceding siblings ...)
  2021-08-11 22:16 ` unlvsur at live dot com
@ 2021-08-11 23:14 ` unlvsur at live dot com
  2021-08-12 12:14 ` redi at gcc dot gnu.org
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: unlvsur at live dot com @ 2021-08-11 23:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101867

--- Comment #10 from cqwrteur <unlvsur at live dot com> ---
../../../../../../../gcc/libstdc++-v3/src/c++17/fs_ops.cc:767:15: error:
'getcwd' was not declared in this scope; did you mean
'std::filesystem::__gnu_posix::getcwd'?
  767 |           if (getcwd(buf.get(), size))
      |               ^~~~~~
      |               std::filesystem::__gnu_posix::getcwd

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

* [Bug libstdc++/101867] avr libc build error for libstdc++
  2021-08-11 20:24 [Bug libstdc++/101867] New: avr libc build error for libstdc++ unlvsur at live dot com
                   ` (9 preceding siblings ...)
  2021-08-11 23:14 ` unlvsur at live dot com
@ 2021-08-12 12:14 ` redi at gcc dot gnu.org
  2021-08-12 12:19 ` redi at gcc dot gnu.org
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: redi at gcc dot gnu.org @ 2021-08-12 12:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101867

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

--- Comment #11 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to cqwrteur from comment #9)
> How to use stdio_pure as implementation? Since avrlibc does not provide
> posix fd.

--enable-cstdio=stdio_pure

There is *lots* of work needed to build a hosted libstdc++ for AVR, this is a
known problem (and is why libstdc++ is usually not built for AVR).

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

* [Bug libstdc++/101867] avr libc build error for libstdc++
  2021-08-11 20:24 [Bug libstdc++/101867] New: avr libc build error for libstdc++ unlvsur at live dot com
                   ` (10 preceding siblings ...)
  2021-08-12 12:14 ` redi at gcc dot gnu.org
@ 2021-08-12 12:19 ` redi at gcc dot gnu.org
  2021-08-12 12:20 ` redi at gcc dot gnu.org
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: redi at gcc dot gnu.org @ 2021-08-12 12:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101867

--- Comment #12 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to cqwrteur from comment #8)
> But it is not documented.

It is: https://gcc.gnu.org/install/configure.html#avr

> 
> in the /src/c++11/system_error.cc
> 
> #ifdef __AVR__
>       return std::error_condition(ev, std::system_category());
> #else
>       switch (ev)
>       {
> 
> #endif
> 
> i feel this switch is pointless.

Why do you feel that?

Have you read [syserr.errcat.objects] p4?

How do you think your suggestion for __AVR__ conforms to that requirement?


> https://github.com/vancegroup-mirrors/avr-libc/blob/master/avr-libc/include/
> errno.h
> 
> If you look at the errno.h here, it is pretty bad.

I don't know what you're saying here.

> I think this switch should just be removed.

How would you implement the requirement then?

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

* [Bug libstdc++/101867] avr libc build error for libstdc++
  2021-08-11 20:24 [Bug libstdc++/101867] New: avr libc build error for libstdc++ unlvsur at live dot com
                   ` (11 preceding siblings ...)
  2021-08-12 12:19 ` redi at gcc dot gnu.org
@ 2021-08-12 12:20 ` redi at gcc dot gnu.org
  2021-08-12 16:52 ` unlvsur at live dot com
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: redi at gcc dot gnu.org @ 2021-08-12 12:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101867

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
           Keywords|                            |build

--- Comment #13 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Marking as enhancement, since this is not a supported target for libstdc++
today, so is not expected to build.

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

* [Bug libstdc++/101867] avr libc build error for libstdc++
  2021-08-11 20:24 [Bug libstdc++/101867] New: avr libc build error for libstdc++ unlvsur at live dot com
                   ` (12 preceding siblings ...)
  2021-08-12 12:20 ` redi at gcc dot gnu.org
@ 2021-08-12 16:52 ` unlvsur at live dot com
  2021-08-12 17:29 ` redi at gcc dot gnu.org
  2021-10-26 18:52 ` gjl at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: unlvsur at live dot com @ 2021-08-12 16:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101867

--- Comment #14 from cqwrteur <unlvsur at live dot com> ---
(In reply to Jonathan Wakely from comment #13)
> Marking as enhancement, since this is not a supported target for libstdc++
> today, so is not expected to build.

Whatever. i have successfully built that. It works very well tbh.

Thank you!

We need to resign none standard implementation of libstdc++ forks tbh.

https://github.com/modm-io/avr-libstdcpp/tree/master/include

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

* [Bug libstdc++/101867] avr libc build error for libstdc++
  2021-08-11 20:24 [Bug libstdc++/101867] New: avr libc build error for libstdc++ unlvsur at live dot com
                   ` (13 preceding siblings ...)
  2021-08-12 16:52 ` unlvsur at live dot com
@ 2021-08-12 17:29 ` redi at gcc dot gnu.org
  2021-10-26 18:52 ` gjl at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: redi at gcc dot gnu.org @ 2021-08-12 17:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101867

--- Comment #15 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to cqwrteur from comment #14)
> Whatever. i have successfully built that. It works very well tbh.

Excellent!

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

* [Bug libstdc++/101867] avr libc build error for libstdc++
  2021-08-11 20:24 [Bug libstdc++/101867] New: avr libc build error for libstdc++ unlvsur at live dot com
                   ` (14 preceding siblings ...)
  2021-08-12 17:29 ` redi at gcc dot gnu.org
@ 2021-10-26 18:52 ` gjl at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: gjl at gcc dot gnu.org @ 2021-10-26 18:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101867

--- Comment #16 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
--with-avrlibc is default, so setting it is void. C.f. install info.

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

end of thread, other threads:[~2021-10-26 18:52 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-11 20:24 [Bug libstdc++/101867] New: avr libc build error for libstdc++ unlvsur at live dot com
2021-08-11 20:48 ` [Bug libstdc++/101867] " redi at gcc dot gnu.org
2021-08-11 20:51 ` unlvsur at live dot com
2021-08-11 20:58 ` unlvsur at live dot com
2021-08-11 21:00 ` unlvsur at live dot com
2021-08-11 21:04 ` unlvsur at live dot com
2021-08-11 21:53 ` unlvsur at live dot com
2021-08-11 22:09 ` redi at gcc dot gnu.org
2021-08-11 22:11 ` unlvsur at live dot com
2021-08-11 22:16 ` unlvsur at live dot com
2021-08-11 23:14 ` unlvsur at live dot com
2021-08-12 12:14 ` redi at gcc dot gnu.org
2021-08-12 12:19 ` redi at gcc dot gnu.org
2021-08-12 12:20 ` redi at gcc dot gnu.org
2021-08-12 16:52 ` unlvsur at live dot com
2021-08-12 17:29 ` redi at gcc dot gnu.org
2021-10-26 18:52 ` gjl at gcc dot gnu.org

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).