[Mesa-dev] [PATCH] nv50/ra: `isinf()` is in namespace `std` since C++11

Vinson Lee vlee at freedesktop.org
Thu Mar 24 22:01:44 UTC 2016


On Thu, Mar 17, 2016 at 5:25 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
>
>
> On 03/18/2016 01:22 AM, Matt Turner wrote:
>>
>> On Thu, Mar 17, 2016 at 5:17 PM, Pierre Moreau <pierre.morrow at free.fr>
>> wrote:
>>>
>>> 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.
>>
>>
>> That seems bad, right?
>>
>> Enabling OpenSWR should affect how any other drivers are built. Why
>> does this happen?
>
>
> Yes it is.
> swr forces use of c++11.
>
> Please have a look at:
> https://cgit.freedesktop.org/mesa/mesa/commit/?id=d46feee697671a0815dc8dac4ffb70d1e9142bc2
>
> This is also related to swr, but Vinson probably doesn't have glibc 2.23.
>
>

I see this build error on Ubuntu 16.04 when building both swr and nouveau.

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


More information about the mesa-dev mailing list