mesa: 32cb7d61a908c519641959158de0a44fd2c8a6e7 (master 11.3.0-devel) CXX rasterizer/memory/libswrAVX_la-ClearTile.lo In file included from rasterizer/memory/ClearTile.cpp:34:0: ./rasterizer/memory/Convert.h: In function ‘uint16_t Convert32To16Float(float)’: ./rasterizer/memory/Convert.h:170:9: error: ‘__builtin_isnan’ is not a member of ‘std’ if (std::isnan(val)) ^ ./rasterizer/memory/Convert.h:170:9: note: suggested alternative: <built-in>: note: ‘__builtin_isnan’
That's odd - "std:isnan" is C++11, and I don't see any macros in the mesa tree that would be messing it up. What compiler/platform are you building on?
I wonder if there's a #include <cmath> missing somewhere. Also, per https://cgit.freedesktop.org/mesa/mesa/commit/?id=649704f1f7c9e1d0990d34a76154b2eb656bee42 , it sounds that GLIBC prior to 2.23 does not have isnan in std namespace. That might be the problem. The easiest way to check GLIBC version is `ldd --version`
From the sounds of it, there's a #define isnan __builtin_isnan somewhere which is converting std::isnan into std::__builtin_isnan
I am building with GCC 5.3 on Ubuntu 16.10. $ gcc --version gcc (Ubuntu 5.3.1-16ubuntu2) 5.3.1 20160424 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ ldd --version ldd (Ubuntu GLIBC 2.23-0ubuntu3) 2.23 Copyright (C) 2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Roland McGrath and Ulrich Drepper.
commit 8d639138c712c5bbe0b9ea8adbc810b23a2e8d1b Author: Vinson Lee <vlee@freedesktop.org> Date: Mon May 9 16:02:12 2016 -0700 swr: [rasterizer] Include cmath for std::isnan and std::isinf. This patch fixes this build error. CXX rasterizer/memory/libswrAVX_la-ClearTile.lo In file included from rasterizer/memory/ClearTile.cpp:34:0: ./rasterizer/memory/Convert.h: In function ‘uint16_t Convert32To16Float(float)’: ./rasterizer/memory/Convert.h:170:9: error: ‘__builtin_isnan’ is not a member of ‘std’ if (std::isnan(val)) ^ ./rasterizer/memory/Convert.h:170:9: note: suggested alternative: <built-in>: note: ‘__builtin_isnan’ ./rasterizer/memory/Convert.h:176:14: error: ‘__builtin_isinf_sign’ is not a member of ‘std’ else if (std::isinf(val)) ^ ./rasterizer/memory/Convert.h:176:14: note: suggested alternative: <built-in>: note: ‘__builtin_isinf_sign’ Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95180 Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Tim Rowley <timothy.o.rowley@intel.com>
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.