Open Hideman85 opened 4 years ago
try to put
#ifndef _XCR_XFEATURE_ENABLED_MASK
#define _XCR_XFEATURE_ENABLED_MASK 0
#endif
at the top of hastyNoise.cpp
When I do that it is even worst got lot of errors:
In file included from /usr/lib/gcc/x86_64-w64-mingw32/8.3-win32/include/x86intrin.h:74,
from /usr/share/mingw-w64/include/winnt.h:1554,
from /usr/share/mingw-w64/include/minwindef.h:163,
from /usr/share/mingw-w64/include/windef.h:8,
from /usr/share/mingw-w64/include/windows.h:69,
from /tmp/HastyNoise/HastyNoise/hastyNoise.cpp:39:
/usr/lib/gcc/x86_64-w64-mingw32/8.3-win32/include/xsaveintrin.h: In function ‘uint64_t HastyNoise::xgetbv(unsigned int)’:
/usr/lib/gcc/x86_64-w64-mingw32/8.3-win32/include/xsaveintrin.h:60:1: error: inlining failed in call to always_inline ‘long long int _xgetbv(unsigned int)’: target specific option mismatch
_xgetbv (unsigned int __A)
^~~~~~~
/tmp/HastyNoise/HastyNoise/hastyNoise.cpp:130:19: note: called from here
return _xgetbv(x);
/tmp/HastyNoise/HastyNoise/hastyNoise_internal.inl:83:51: error: expected initializer before ‘Lerp’
static typename SIMD<_SIMDType>::Float VECTORCALL Lerp(typename SIMD<_SIMDType>::Float a, typename SIMD<_SIMDType>::Float b, typename SIMD<_SIMDType>::Float t)
^~~~
/tmp/HastyNoise/HastyNoise/hastyNoise_internal.inl:92:51: error: expected initializer before ‘InterpQuintic’
static typename SIMD<_SIMDType>::Float VECTORCALL InterpQuintic(typename SIMD<_SIMDType>::Float t)
^~~~~~~~~~~~~
/tmp/HastyNoise/HastyNoise/hastyNoise_internal.inl:107:51: error: expected initializer before ‘CubicLerp’
static typename SIMD<_SIMDType>::Float VECTORCALL CubicLerp(typename SIMD<_SIMDType>::Float a, typename SIMD<_SIMDType>::Float b, typename SIMD<_SIMDType>::Float c, typename SIMD<_SIMDType>::Float d, typename SIMD<_SIMDType>::Float t)
^~~~~~~~~
In file included from /tmp/HastyNoise/HastyNoise/hastyNoise_none.cpp:8:
/tmp/HastyNoise/HastyNoise/hastyNoise_internal.inl:114:49: error: expected initializer before ‘Hash’
static typename SIMD<_SIMDType>::Int VECTORCALL Hash(typename SIMD<_SIMDType>::Int seed, typename SIMD<_SIMDType>::Int x, typename SIMD<_SIMDType>::Int y, typename SIMD<_SIMDType>::Int z)
^~~~
/tmp/HastyNoise/HastyNoise/hastyNoise_internal.inl:130:49: error: expected initializer before ‘HashHB’
static typename SIMD<_SIMDType>::Int VECTORCALL HashHB(typename SIMD<_SIMDType>::Int seed, typename SIMD<_SIMDType>::Int x, typename SIMD<_SIMDType>::Int y, typename SIMD<_SIMDType>::Int z)
^~~~~~
/tmp/HastyNoise/HastyNoise/hastyNoise_internal.inl:145:51: error: expected initializer before ‘ValCoord’
static typename SIMD<_SIMDType>::Float VECTORCALL ValCoord(typename SIMD<_SIMDType>::Int seed, typename SIMD<_SIMDType>::Int x, typename SIMD<_SIMDType>::Int y, typename SIMD<_SIMDType>::Int z)
^~~~~~~~
In file included from /tmp/HastyNoise/HastyNoise/hastyNoise_none.cpp:1:
/tmp/HastyNoise/HastyNoise/hastyNoise.h:248:20: error: expected ‘;’ at end of member declaration
#define VECTORCALL __vectorcall
^~~~~~~~~~~~
/tmp/HastyNoise/HastyNoise/hastyNoise_internal.inl:163:44: note: in expansion of macro ‘VECTORCALL’
static typename SIMD<_SIMDType>::Float VECTORCALL _(typename SIMD<_SIMDType>::Int seed, typename SIMD<_SIMDType>::Int xi, typename SIMD<_SIMDType>::Int yi, typename SIMD<_SIMDType>::Int zi, typename SIMD<_SIMDType>::Float x, typename SIMD<_SIMDType>::Float y, typename SIMD<_SIMDType>::Float z)
....
Yeah that just means there are more errors then the first ones. I never tried to compile it in mingw. Although you would assume gcc to be the same everywhere it really is not. May also be related to the gcc version. I do not have a mingw environment setup but if a get a chance this weekend I will take a look.
For a pre made MingW64 environment look at https://github.com/dockcross/dockcross and the image windows-static-x64
checked in some fixes to https://github.com/caseymcc/HastyNoise/tree/mingw, I need to verify everything still works on the rest of the platforms before I merge it.
Got this issue:
make
Scanning dependencies of target hastyNoise
[ 9%] Building CXX object CMakeFiles/hastyNoise.dir/HastyNoise/hastyNoise.cpp.obj
In file included from /usr/lib/gcc/x86_64-w64-mingw32/8.3-win32/include/x86intrin.h:74,
from /usr/share/mingw-w64/include/winnt.h:1554,
from /usr/share/mingw-w64/include/minwindef.h:163,
from /usr/share/mingw-w64/include/windef.h:8,
from /usr/share/mingw-w64/include/windows.h:69,
from HastyNoise/HastyNoise/hastyNoise.cpp:39:
/usr/lib/gcc/x86_64-w64-mingw32/8.3-win32/include/xsaveintrin.h: In function ‘uint64_t HastyNoise::xgetbv(unsigned int)’:
/usr/lib/gcc/x86_64-w64-mingw32/8.3-win32/include/xsaveintrin.h:60:1: error: inlining failed in call to always_inline ‘long long int _xgetbv(unsigned int)’: target specific option mismatch
_xgetbv (unsigned int __A)
^~~~~~~
HastyNoise/HastyNoise/hastyNoise.cpp:133:19: note: called from here
return _xgetbv(x);
~~~~~~~^~~
make[2]: *** [CMakeFiles/hastyNoise.dir/build.make:63: CMakeFiles/hastyNoise.dir/HastyNoise/hastyNoise.cpp.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:112: CMakeFiles/hastyNoise.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
dockcross image don't have filesystem so it should be installed.
are you compiling for 32bit?
Normally no and I didn't specified any kind of options for but this include x86intrin.h
let's me having a doubt.
This line is set in my toolchain file that must trigger 64bit compilation set(CMAKE_SYSTEM_PROCESSOR x86_64 CACHE STRING "System Processor")
Mingw does not support building AVX aligned code. This repo won't be able to fix the problem without compiler support.
Here are a few of many discussion links:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412
https://sourceforge.net/p/mingw-w64/mailman/message/34453497/
Toolchain file: