Обсуждение: Build broken since 9aaa062 because of missing isnan and isinf
Hi, As mentioned in $subject, build of regression tests is broken on Windows as follows: .\src\common.obj result-conversions-test.obj : error LNK2019: unresolved external symbol isinf referenced in function printdouble result-conversions-test.obj : error LNK2019: unresolved external symbol isnan referenced in function printdouble .\src\result-conversions-test.exe : fatal error LNK1120: 2 unresolved externals NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0 \VC\Bin\amd64\cl.EXE"' : return code '0x2' Stop. I think that we are going to need something like the patch attached to define explicitly isnan and isinf. Regards, -- Michael
Вложения
On 01/29/2015 06:27 AM, Michael Paquier wrote: > Hi, > > As mentioned in $subject, build of regression tests is broken on > Windows as follows: > .\src\common.obj > result-conversions-test.obj : error LNK2019: unresolved external > symbol isinf referenced in function printdouble > result-conversions-test.obj : error LNK2019: unresolved external > symbol isnan referenced in function printdouble > .\src\result-conversions-test.exe : fatal error LNK1120: 2 unresolved externals > NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0 > \VC\Bin\amd64\cl.EXE"' : return code '0x2' > Stop. > I think that we are going to need something like the patch attached to > define explicitly isnan and isinf. Oh, thanks, fixed. I vaguely remembered that Windows doesn't have those macros, but it actually worked on my Windows system. Maybe they've added them to the MSVC headers recently... - Heikki
On Thu, Jan 29, 2015 at 8:34 PM, Heikki Linnakangas <hlinnakangas@vmware.com> wrote: > Oh, thanks, fixed. I vaguely remembered that Windows doesn't have those > macros, but it actually worked on my Windows system. Maybe they've added > them to the MSVC headers recently... Yes, they have been added in MS 2013. I think that my patch is actually a bit wrong, we may want to use _MSC_VER < 1800 as well. -- Michael
On 01/29/2015 01:51 PM, Michael Paquier wrote: > On Thu, Jan 29, 2015 at 8:34 PM, Heikki Linnakangas > <hlinnakangas@vmware.com> wrote: >> Oh, thanks, fixed. I vaguely remembered that Windows doesn't have those >> macros, but it actually worked on my Windows system. Maybe they've added >> them to the MSVC headers recently... > Yes, they have been added in MS 2013. I think that my patch is > actually a bit wrong, we may want to use _MSC_VER < 1800 as well. Good point. I'm seeing a compiler warning on my system now, about redefining isnan and isinf. I rewrote the #ifdef as: #if defined(WIN32) && !defined(isnan) That seems to fix the warnings. - Heikki
Heikki Linnakangas <hlinnakangas@vmware.com> writes:
> On 01/29/2015 01:51 PM, Michael Paquier wrote:
>> Yes, they have been added in MS 2013. I think that my patch is
>> actually a bit wrong, we may want to use _MSC_VER < 1800 as well.
> Good point. I'm seeing a compiler warning on my system now, about
> redefining isnan and isinf. I rewrote the #ifdef as:
You might want to make it match the existing core coding in port/win32.h:
#if (_MSC_VER < 1800)
#define isinf(x) ((_fpclass(x) == _FPCLASS_PINF) || (_fpclass(x) == _FPCLASS_NINF))
#define isnan(x) _isnan(x)
#endif
That's been through the wars, unlike whatever you just came up with.
regards, tom lane