bug-ddrescue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-ddrescue] Cannot compile with uClibc-ng


From: Rosen Penev
Subject: Re: [Bug-ddrescue] Cannot compile with uClibc-ng
Date: Mon, 22 Jul 2019 16:52:23 -0700

On Mon, Jul 22, 2019 at 1:58 PM Antonio Diaz Diaz <address@hidden> wrote:
>
> Rosen Penev wrote:
> >>>> IMO this is a bug in uClibc-ng
> >>> Even so, it might still make sense to work around it.
> >>
> >> I don't see how this can be done. Using plain 'fgetc' instead of
> >> 'std::fgetc' will fail with conforming libc implementations.
> > I don't really do C++, but this is one of the ways a similar issue was
> > fixed:
> > https://github.com/facebook/folly/commit/b2cecfb5ced32cac372cfe6c5ac1935365b5dd60
>
> That fix is for std::remainder, which is C++11 and therefore not present
> in previous versions of the standard. I made a similar fix for
> std::snprintf, which was introduced in C99 and was therefore absent from
> C++98.
>
> The case of std::fgetc is different. 'fgetc' is in C since the dawn of
> time and therefore std::fgetc must be provided by any compliant C++
> library. IMO this bug should not be worked around, but fixed in uClibc-ng.
Interesting...

So the setup was uClibc-ng as the libc and uClibc++ as the libc++. If
I swap out uClibc++ for libstdcpp, it works.

OTOH, if I swap out uClibc-ng for musl or something, it also works.

No idea which problem should be fixed. Looking at
https://git.busybox.net/uClibc++/tree/include/cstdio?id=6ff572f21e2ce654d0c49dca3c64c49625fd266a#n34
, I don't see a problem.

Looking at 
https://gcc.gnu.org/onlinedocs/gcc-4.6.3/libstdc++/api/a00832_source.html
, it seems libstdcpp uses #undef on all the functions before including
them.
>
> Best regards,
> Antonio.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]