This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/60401] stdlib.h does not provide abs(long) overload
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 21 Jan 2016 12:15:52 +0000
- Subject: [Bug libstdc++/60401] stdlib.h does not provide abs(long) overload
- Auto-submitted: auto-generated
- References: <bug-60401-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60401
--- Comment #14 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Dominik Vogt from comment #13)
> -- snip --
> In file included from .../git/gcc/install/include/c++/6.0.0/math.h:36:0,
> from x.C:1:
> .../gcc/install/include/c++/6.0.0/cmath:614:11: error: â::isinfâ has not
> been declared
> using ::isinf;
> ^~~~~
If this line is being compiled it means libstdc++ was configured against the
old glibc headers (because _GLIBCXX_HAVE_OBSOLETE_ISINF_ISNAN is defined). The
error means you are successfully using the new glibc headers when compiling
your test, but they don't match the glibc headers used at configure-time.
So I believe the problem is that you need to reconfigure libstdc++ with the new
glibc headers, you can't just drop them in later and expect an already-built
libstdc++ to work with them. Libstdc++ depends on glibc, so if you update glibc
(or fake doing so by using --sysroot to point at a new glibc) then you need to
rebuild libstdc++ too.