quill icon indicating copy to clipboard operation
quill copied to clipboard

fatal error: intrin.h: No such file or directory - TDM-GCC-32

Open MasonAngelio opened this issue 5 months ago • 2 comments

Describe the bug When compiling quill using TDM-GCC-32, I get the following errors:

D:\Apps\TDM-GCC-32\bin\c++.exe -DFMT_HEADER_ONLY=1 -DNOMINMAX -DNTDDI_VERSION=0x05010300 -DQUILL_DISABLE_NON_PREFIXED_MACROS -DQUILL_NO_THREAD_NAME_SUPPORT -DSTRICT -DUNICODE -DWIN32_LEAN_AND_MEAN -DWINVER=0x0501 -D_WIN32_WINNT=0x0501 -DCMAKE_INTDIR=\"Debug\" -I"D:/CLion Projects/Proj/build/lib/cryptopp" -I"D:/CLion Projects/Proj/lib/fmt/include" -I"D:/CLion Projects/Proj/lib/quill/include" -I"D:/CLion Projects/Proj/lib/tclap/include" -I"D:/CLion Projects/Proj/lib/tl-expected/include" -I"D:/CLion Projects/Proj/build/lib/cryptopp/cryptopp" -m32 -g -std=gnu++17 -fdiagnostics-color=always -MD -MT CMakeFiles/Proj.dir/Debug/src/logger.cpp.obj -MF CMakeFiles\Proj.dir\Debug\src\logger.cpp.obj.d -o CMakeFiles/Proj.dir/Debug/src/logger.cpp.obj -c "D:/CLion Projects/Proj/src/logger.cpp"
In file included from D:/CLion Projects/Proj/lib/quill/include/quill/Logger.h:18,
                 from D:/CLion Projects/Proj/src/logger.h:4,
                 from D:/CLion Projects/Proj/src/logger.cpp:1:
D:/CLion Projects/Proj/lib/quill/include/quill/core/Rdtsc.h:18:14: fatal error: intrin.h: No such file or directory
   18 |     #include <intrin.h>
      |              ^~~~~~~~~~
compilation terminated.
[2/19] Building CXX object CMakeFiles/Proj.dir/Debug/src/algorithms.cpp.obj
FAILED: [code=1] CMakeFiles/Proj.dir/Debug/src/algorithms.cpp.obj 
D:\Apps\TDM-GCC-32\bin\c++.exe -DFMT_HEADER_ONLY=1 -DNOMINMAX -DNTDDI_VERSION=0x05010300 -DQUILL_DISABLE_NON_PREFIXED_MACROS -DQUILL_NO_THREAD_NAME_SUPPORT -DSTRICT -DUNICODE -DWIN32_LEAN_AND_MEAN -DWINVER=0x0501 -D_WIN32_WINNT=0x0501 -DCMAKE_INTDIR=\"Debug\" -I"D:/CLion Projects/Proj/build/lib/cryptopp" -I"D:/CLion Projects/Proj/lib/fmt/include" -I"D:/CLion Projects/Proj/lib/quill/include" -I"D:/CLion Projects/Proj/lib/tclap/include" -I"D:/CLion Projects/Proj/lib/tl-expected/include" -I"D:/CLion Projects/Proj/build/lib/cryptopp/cryptopp" -m32 -g -std=gnu++17 -fdiagnostics-color=always -MD -MT CMakeFiles/Proj.dir/Debug/src/algorithms.cpp.obj -MF CMakeFiles\Proj.dir\Debug\src\algorithms.cpp.obj.d -o CMakeFiles/Proj.dir/Debug/src/algorithms.cpp.obj -c "D:/CLion Projects/Proj/src/algorithms.cpp"
In file included from D:/CLion Projects/Proj/lib/quill/include/quill/Logger.h:18,
                 from D:/CLion Projects/Proj/src/logger.h:4,
                 from D:/CLion Projects/Proj/src/system_info.h:7,
                 from D:/CLion Projects/Proj/src/algorithms.h:4,
                 from D:/CLion Projects/Proj/src/algorithms.cpp:1:
D:/CLion Projects/Proj/lib/quill/include/quill/core/Rdtsc.h:18:14: fatal error: intrin.h: No such file or directory
   18 |     #include <intrin.h>
      |              ^~~~~~~~~~
compilation terminated.
[3/19] Building CXX object CMakeFiles/Proj.dir/Debug/src/driver.cpp.obj
FAILED: [code=1] CMakeFiles/Proj.dir/Debug/src/driver.cpp.obj 
D:\Apps\TDM-GCC-32\bin\c++.exe -DFMT_HEADER_ONLY=1 -DNOMINMAX -DNTDDI_VERSION=0x05010300 -DQUILL_DISABLE_NON_PREFIXED_MACROS -DQUILL_NO_THREAD_NAME_SUPPORT -DSTRICT -DUNICODE -DWIN32_LEAN_AND_MEAN -DWINVER=0x0501 -D_WIN32_WINNT=0x0501 -DCMAKE_INTDIR=\"Debug\" -I"D:/CLion Projects/Proj/build/lib/cryptopp" -I"D:/CLion Projects/Proj/lib/fmt/include" -I"D:/CLion Projects/Proj/lib/quill/include" -I"D:/CLion Projects/Proj/lib/tclap/include" -I"D:/CLion Projects/Proj/lib/tl-expected/include" -I"D:/CLion Projects/Proj/build/lib/cryptopp/cryptopp" -m32 -g -std=gnu++17 -fdiagnostics-color=always -MD -MT CMakeFiles/Proj.dir/Debug/src/driver.cpp.obj -MF CMakeFiles\Proj.dir\Debug\src\driver.cpp.obj.d -o CMakeFiles/Proj.dir/Debug/src/driver.cpp.obj -c "D:/CLion Projects/Proj/src/driver.cpp"
In file included from D:/CLion Projects/Proj/lib/quill/include/quill/Logger.h:18,
                 from D:/CLion Projects/Proj/src/logger.h:4,
                 from D:/CLion Projects/Proj/src/system_info.h:7,
                 from D:/CLion Projects/Proj/src/driver.h:9,
                 from D:/CLion Projects/Proj/src/driver.cpp:3:
D:/CLion Projects/Proj/lib/quill/include/quill/core/Rdtsc.h:18:14: fatal error: intrin.h: No such file or directory
   18 |     #include <intrin.h>
      |              ^~~~~~~~~~
compilation terminated.
[4/19] Building CXX object CMakeFiles/Proj.dir/Debug/src/api.cpp.obj
[5/19] Building CXX object CMakeFiles/Proj.dir/Debug/src/enums.cpp.obj
FAILED: [code=1] CMakeFiles/Proj.dir/Debug/src/enums.cpp.obj 
D:\Apps\TDM-GCC-32\bin\c++.exe -DFMT_HEADER_ONLY=1 -DNOMINMAX -DNTDDI_VERSION=0x05010300 -DQUILL_DISABLE_NON_PREFIXED_MACROS -DQUILL_NO_THREAD_NAME_SUPPORT -DSTRICT -DUNICODE -DWIN32_LEAN_AND_MEAN -DWINVER=0x0501 -D_WIN32_WINNT=0x0501 -DCMAKE_INTDIR=\"Debug\" -I"D:/CLion Projects/Proj/build/lib/cryptopp" -I"D:/CLion Projects/Proj/lib/fmt/include" -I"D:/CLion Projects/Proj/lib/quill/include" -I"D:/CLion Projects/Proj/lib/tclap/include" -I"D:/CLion Projects/Proj/lib/tl-expected/include" -I"D:/CLion Projects/Proj/build/lib/cryptopp/cryptopp" -m32 -g -std=gnu++17 -fdiagnostics-color=always -MD -MT CMakeFiles/Proj.dir/Debug/src/enums.cpp.obj -MF CMakeFiles\Proj.dir\Debug\src\enums.cpp.obj.d -o CMakeFiles/Proj.dir/Debug/src/enums.cpp.obj -c "D:/CLion Projects/Proj/src/enums.cpp"
In file included from D:/CLion Projects/Proj/lib/quill/include/quill/Logger.h:18,
                 from D:/CLion Projects/Proj/src/logger.h:4,
                 from D:/CLion Projects/Proj/src/system_info.h:7,
                 from D:/CLion Projects/Proj/src/enums.h:2,
                 from D:/CLion Projects/Proj/src/enums.cpp:3:
D:/CLion Projects/Proj/lib/quill/include/quill/core/Rdtsc.h:18:14: fatal error: intrin.h: No such file or directory
   18 |     #include <intrin.h>
      |              ^~~~~~~~~~
compilation terminated.
[6/19] Building CXX object CMakeFiles/Proj.dir/Debug/src/fmifs.cpp.obj
[7/19] Building CXX object CMakeFiles/Proj.dir/Debug/src/driver_io.cpp.obj
FAILED: [code=1] CMakeFiles/Proj.dir/Debug/src/driver_io.cpp.obj 
D:\Apps\TDM-GCC-32\bin\c++.exe -DFMT_HEADER_ONLY=1 -DNOMINMAX -DNTDDI_VERSION=0x05010300 -DQUILL_DISABLE_NON_PREFIXED_MACROS -DQUILL_NO_THREAD_NAME_SUPPORT -DSTRICT -DUNICODE -DWIN32_LEAN_AND_MEAN -DWINVER=0x0501 -D_WIN32_WINNT=0x0501 -DCMAKE_INTDIR=\"Debug\" -I"D:/CLion Projects/Proj/build/lib/cryptopp" -I"D:/CLion Projects/Proj/lib/fmt/include" -I"D:/CLion Projects/Proj/lib/quill/include" -I"D:/CLion Projects/Proj/lib/tclap/include" -I"D:/CLion Projects/Proj/lib/tl-expected/include" -I"D:/CLion Projects/Proj/build/lib/cryptopp/cryptopp" -m32 -g -std=gnu++17 -fdiagnostics-color=always -MD -MT CMakeFiles/Proj.dir/Debug/src/driver_io.cpp.obj -MF CMakeFiles\Proj.dir\Debug\src\driver_io.cpp.obj.d -o CMakeFiles/Proj.dir/Debug/src/driver_io.cpp.obj -c "D:/CLion Projects/Proj/src/driver_io.cpp"
In file included from D:/CLion Projects/Proj/lib/quill/include/quill/Logger.h:18,
                 from D:/CLion Projects/Proj/src/logger.h:4,
                 from D:/CLion Projects/Proj/src/system_info.h:7,
                 from D:/CLion Projects/Proj/src/driver.h:9,
                 from D:/CLion Projects/Proj/src/driver_io.h:6,
                 from D:/CLion Projects/Proj/src/driver_io.cpp:1:
D:/CLion Projects/Proj/lib/quill/include/quill/core/Rdtsc.h:18:14: fatal error: intrin.h: No such file or directory
   18 |     #include <intrin.h>
      |              ^~~~~~~~~~

To Reproduce Install TDM-GCC-32 clone quill use as a lib compile code

Expected Behaviour No errors

Environment Details

  • Library Version: master branch
  • Operating System: Windows 11
  • Compiler: TDM-GCC 10

Additional context Add any other context about the problem here.

MasonAngelio avatar Jul 19 '25 09:07 MasonAngelio

Hey, thanks for reporting this.

I’ve fixed the issue in Rdtsc.h, but there are still other compiler errors showing up. TDM-GCC is quite outdated and not currently supported. It also doesn’t define any unique preprocessor macros to detect it, which makes it hard to write clean compiler-specific workarounds.

For example, CLion’s bundled MinGW works fine on Windows, but TDM is missing declarations for some standard functions. That makes proper support a bit tricky.

I’m not sure I’ll be able to spend time fixing this myself, but PRs are always welcome if you or someone else wants to take a look!

odygrd avatar Jul 19 '25 13:07 odygrd

TDM-GCC-32 has x86intrin.h and imintrin.h, might help with some of these

MasonAngelio avatar Jul 20 '25 09:07 MasonAngelio