Bug 94907 - codegen/nv50_ir_ra.cpp:1330:29: error: ‘isinf’ was not declared in this scope
Summary: codegen/nv50_ir_ra.cpp:1330:29: error: ‘isinf’ was not declared in this scope
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-12 21:08 UTC by Vinson Lee
Modified: 2016-04-19 10:24 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Vinson Lee 2016-04-12 21:08:45 UTC
mesa: 7f0854724827bd34b9e64ab0c9cabc328e404c62 (master 11.3.0-devel)

Build error when building both nouveau and swr.

  CXX      codegen/nv50_ir_ra.lo
In file included from ./codegen/nv50_ir.h:34:0,
                 from codegen/nv50_ir_ra.cpp:23:
./codegen/nv50_ir_util.h:97:14: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
 typedef std::auto_ptr<Iterator> IteratorRef;
              ^
In file included from /usr/include/c++/5/memory:81:0,
                 from ./codegen/nv50_ir_util.h:29,
                 from ./codegen/nv50_ir.h:34,
                 from codegen/nv50_ir_ra.cpp:23:
/usr/include/c++/5/bits/unique_ptr.h:49:28: note: declared here
   template<typename> class auto_ptr;
                            ^
codegen/nv50_ir_ra.cpp: In member function ‘void nv50_ir::GCRA::simplify()’:
codegen/nv50_ir_ra.cpp:1330:29: error: ‘isinf’ was not declared in this scope
          if (isinf(bestScore)) {
                             ^
codegen/nv50_ir_ra.cpp:1330:29: note: suggested alternative:
In file included from /usr/include/c++/5/random:38:0,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from codegen/nv50_ir_ra.cpp:26:
/usr/include/c++/5/cmath:621:5: note:   ‘std::isinf’
     isinf(_Tp __x)
     ^
Comment 1 Ilia Mirkin 2016-04-12 21:12:55 UTC
Should be fixed by https://patchwork.freedesktop.org/patch/79115/
Comment 2 Jose Fonseca 2016-04-13 06:45:01 UTC
I pushed Pierre's initial (more cirurgical) patch, as the later (generic) caused me problems building llvm.
Comment 3 Vinson Lee 2016-04-15 07:01:20 UTC
commit f525db6358fbaa7b4296d2e6484e0b1ae703ac78
Author: Pierre Moreau <pierre.morrow@free.fr>
Date:   Fri Mar 18 01:17:31 2016 +0100

    nv50/ra: `isinf()` is in namespace `std` since C++11.
    
    This fixes a compile error while building Nouveau with C++11 enabled (and
    glibc >= 2.23). This happens if SWR is enabled, as it forces C++11.
    
    Signed-off-by: Pierre Moreau <pierre.morrow@free.fr>
    Signed-off-by: Jose Fonseca <jfonseca@vmware.com>
    
    https://bugs.freedesktop.org/show_bug.cgi?id=94907
Comment 4 Jose Fonseca 2016-04-19 10:24:59 UTC
For the record, this issue has now been fixed in a more generic fashion in commit 649704f1f7c9e1d0990d34a76154b2eb656bee42


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.