kfr icon indicating copy to clipboard operation
kfr copied to clipboard

Building DFT in GCC and MSVC

Open dancasarin opened this issue 5 years ago • 7 comments

For now, KFR DFT can be built only using Clang/Xcode.

Building with GCC 7 has been recently added while GCC 8 & 9 have bug described here: https://github.com/kfrlib/kfr/issues/56 that prevents from building correct code for optimized binaries.

MSVC does not work too, because of ICE, out of heap space etc.

All KFR code that does not use DFT works correctly with all these compilers.

dancasarin avatar Nov 26 '19 13:11 dancasarin

in dev branch, what is the dft status?

is it possible to compile with clang 4.0 and link the lib with gcc 6.3 to the main?

mipac avatar Dec 03 '19 17:12 mipac

It's possible to build KFR DFT with clang 6+ and use it with any compatible compiler (GCC 7+). Older versions may be supported too (and were supported in previous versions of KFR), you can test.

If you need DFT only and can use dynamic linking, you can build KFR C API (clang required). Then the resulting shared library can be used with any C compiler.

All changes required to build C API are already published in dev branch.

dancasarin avatar Dec 04 '19 21:12 dancasarin

I need to test Thank you very much for your answer

mipac avatar Dec 05 '19 09:12 mipac

Is this still an issue with the latest msvc 2019 16.6.3? If yes, wouldn’t it make sense to report it to MS?

reFX-Mike avatar Jul 14 '20 19:07 reFX-Mike

i've test on debian

  • compile dft lib with clang6+ and stdc++
  • compile my app with gcc 8 and link with dft

it works 👍

mipac avatar Aug 18 '20 09:08 mipac

Now that MSVC 2022 is out and available as 64-bit, can somebody try again if the DFT compiles successfully now?

reFX-Mike avatar Jan 14 '22 21:01 reFX-Mike

Now that MSVC 2022 is out and available as 64-bit, can somebody try again if the DFT compiles successfully now?

I tried with vs2022 17.5, the compilation was passed but the speed of the dft example was 5-10 times slower than clang. I modified the data size of that example to 65536 * 2.

LCVitality avatar May 14 '23 05:05 LCVitality