mxe
mxe copied to clipboard
Fails to build package itk for target i686-w64-mingw32.static
Honestly I don't have a clue what's causing this:
../../../../../../../../ITK-5.0.1/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_bignum.cxx: In member function 'vnl_bignum::operator float() const':
../../../../../../../../ITK-5.0.1/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_bignum.cxx:716:37: error: 'numeric_limits' is not a member of 'std'
716 | if (this->is_infinity()) f = std::numeric_limits<float>::infinity();
| ^~~~~~~~~~~~~~
../../../../../../../../ITK-5.0.1/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_bignum.cxx:716:52: error: expected primary-expression before 'float'
716 | if (this->is_infinity()) f = std::numeric_limits<float>::infinity();
| ^~~~~
../../../../../../../../ITK-5.0.1/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_bignum.cxx: In member function 'vnl_bignum::operator double() const':
../../../../../../../../ITK-5.0.1/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_bignum.cxx:727:37: error: 'numeric_limits' is not a member of 'std'
727 | if (this->is_infinity()) d = std::numeric_limits<double>::infinity();
| ^~~~~~~~~~~~~~
../../../../../../../../ITK-5.0.1/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_bignum.cxx:727:52: error: expected primary-expression before 'double'
727 | if (this->is_infinity()) d = std::numeric_limits<double>::infinity();
| ^~~~~~
../../../../../../../../ITK-5.0.1/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_bignum.cxx: In member function 'vnl_bignum::operator long double() const':
../../../../../../../../ITK-5.0.1/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_bignum.cxx:738:37: error: 'numeric_limits' is not a member of 'std'
738 | if (this->is_infinity()) d = std::numeric_limit2s<long double>::infinity();
| ^~~~~~~~~~~~~~
../../../../../../../../ITK-5.0.1/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_bignum.cxx:738:52: error: expected primary-expression before 'long'
738 | if (this->is_infinity()) d = std::numeric_limits<long double>::infinity();
| ^~~~
At global scope:
cc1plus: note: unrecognized command-line option '-Wno-undefined-var-template' may have been intended to silence earlier diagnostics
make[4]: *** [Modules/ThirdParty/VNL/src/vxl/core/vnl/CMakeFiles/itkvnl.dir/build.make:305: Modules/ThirdParty/VNL/src/vxl/core/vnl/CMakeFiles/itkvnl.dir/vnl_bignum.cxx.obj] Error 1
Full terminal output and logfile: https://gist.github.com/jakint0sh/776d06d4e68fc11f6bb46cb1dcccfed1
My best guess would be that this is caused by the compiler using a later C++ standard than the code was meant to comply with, but -std=c++11 is specified for this particular file! So I'm clueless, and after looking at the file, tempted to say that it is improperly written, but what the heck do I know about this?
This ended up being a missing #include <limits> in vnl_bignum.cxx. See #3203 for the patch.