<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: FLT_RADIX not defined when including MKL dirs. in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FLT-RADIX-not-defined-when-including-MKL-dirs/m-p/1523003#M35103</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for posting in Intel Communities.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When we tried the sample reproducer code provided by you with the Intel C++(ICPX) compiler, we were able to get the expected results without any errors. Please find the below screenshot and the command to run the code:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VarshaS_Intel_0-1694537725573.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/45568iBA0992E49D31B8E5/image-size/medium?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="VarshaS_Intel_0-1694537725573.png" alt="VarshaS_Intel_0-1694537725573.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Compiling: icpx code.cpp -qmkl
Running: ./a.out&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;Is that an expected behaviour of `intel-mkl` ?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Could you please let us know what kind of errors you are facing with Intel MKL?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please try and let us know if you are still facing any issues?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Varsha&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Sep 2023 04:21:57 GMT</pubDate>
    <dc:creator>VarshaS_Intel</dc:creator>
    <dc:date>2023-09-20T04:21:57Z</dc:date>
    <item>
      <title>FLT_RADIX not defined when including MKL dirs.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FLT-RADIX-not-defined-when-including-MKL-dirs/m-p/1522487#M35090</link>
      <description>&lt;P&gt;The&amp;nbsp; following program:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;#include &amp;lt;float.h&amp;gt;
#include &amp;lt;iostream&amp;gt;

int main(){
std::cout &amp;lt;&amp;lt; FLT_RADIX &amp;lt;&amp;lt; std::endl;
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;compiles and run fine with&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="none"&gt;$ c++ -o main main.cpp &amp;amp;&amp;amp; ./main
2&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but it does not compile anymore with&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="none"&gt;$ c++ -o main main.cpp -I/opt/intel/oneapi/compiler/latest/linux/compiler/include
main.cpp: In function ‘int main()’:
main.cpp:5:16: error: ‘FLT_RADIX’ was not declared in this scope
5 | std::cout &amp;lt;&amp;lt; FLT_RADIX &amp;lt;&amp;lt; std::endl;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is that an expected behaviour of `intel-mkl` ?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 12:51:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FLT-RADIX-not-defined-when-including-MKL-dirs/m-p/1522487#M35090</guid>
      <dc:creator>iago-lito</dc:creator>
      <dc:date>2023-09-11T12:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: FLT_RADIX not defined when including MKL dirs.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FLT-RADIX-not-defined-when-including-MKL-dirs/m-p/1523003#M35103</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for posting in Intel Communities.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When we tried the sample reproducer code provided by you with the Intel C++(ICPX) compiler, we were able to get the expected results without any errors. Please find the below screenshot and the command to run the code:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VarshaS_Intel_0-1694537725573.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/45568iBA0992E49D31B8E5/image-size/medium?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="VarshaS_Intel_0-1694537725573.png" alt="VarshaS_Intel_0-1694537725573.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Compiling: icpx code.cpp -qmkl
Running: ./a.out&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;Is that an expected behaviour of `intel-mkl` ?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Could you please let us know what kind of errors you are facing with Intel MKL?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please try and let us know if you are still facing any issues?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Varsha&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 04:21:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FLT-RADIX-not-defined-when-including-MKL-dirs/m-p/1523003#M35103</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-09-20T04:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: FLT_RADIX not defined when including MKL dirs.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FLT-RADIX-not-defined-when-including-MKL-dirs/m-p/1523280#M35110</link>
      <description>&lt;P&gt;Hello and thank you for support. The error disappears indeed with `icpx` compiler. Does it mean that MKL headers are not compatible with `gcc` or `clang`?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 07:58:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FLT-RADIX-not-defined-when-including-MKL-dirs/m-p/1523280#M35110</guid>
      <dc:creator>iago-lito</dc:creator>
      <dc:date>2023-09-13T07:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: FLT_RADIX not defined when including MKL dirs.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FLT-RADIX-not-defined-when-including-MKL-dirs/m-p/1523448#M35117</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;Does it mean that MKL headers are not compatible with `gcc` or `clang`?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;From the sample reproducer code, we could not see any MKL headers or code to include Intel MKL.&lt;/P&gt;
&lt;P&gt;But, Intel oneMKL is compatible with gcc and clang compilers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For proper compiling and linking of your code with several compilers and third-party libraries, and provides different interfaces to the functionality with Intel MKL, please refer to the&amp;nbsp;&lt;A href="https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-link-line-advisor.html#gs.53ynat" target="_blank" rel="noopener"&gt;Intel Link Line Advisor&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Varsha&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 17:42:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FLT-RADIX-not-defined-when-including-MKL-dirs/m-p/1523448#M35117</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-09-13T17:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: FLT_RADIX not defined when including MKL dirs.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FLT-RADIX-not-defined-when-including-MKL-dirs/m-p/1523650#M35119</link>
      <description>&lt;P&gt;Oh, indeed, the MKL header does not actually appear in my example. I have boiled it down from the following situation, where adding MKL to my CMake project made compilaition fail:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;main.cpp&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;#include &amp;lt;float.h&amp;gt;
#include &amp;lt;iostream&amp;gt;

int main() { std::cout &amp;lt;&amp;lt; FLT_RADIX &amp;lt;&amp;lt; std::endl; };&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;CMakeLists.txt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;cmake_minimum_required(VERSION 3.20..3.22)

project(MklTest LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)

add_executable(main main.cpp)

#-------------------------------------------------------------------------------
# Works if I remove this snippet.
find_package(PkgConfig REQUIRED)
pkg_search_module(MKL mkl-dynamic-lp64-iomp)
target_include_directories(main PRIVATE ${MKL_INCLUDE_DIRS})
#-------------------------------------------------------------------------------

target_link_libraries(main PRIVATE toml++) &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;FWIU, the the generated variable MKL_INCLUDE_DIRS expands to several paths, including the actual MKL headers and the `compiler/include` header that makes compilation fails with the "undeclared FLT_RADIX" error if the `CCX` environment variable is set to either a GCC or a CLANG compiler, but not if set to ICPX.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Considering that you do expect MKL to be compatible with other compilers and libraries.. then maybe the problem actually lies within the CMake heuristic supposed to find MKL modules?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At this point, maybe I should provide more information about my system and a step by step procedure to help you reproduce. Sorry for not having done this earlier:&lt;/P&gt;&lt;LI-CODE lang="none"&gt;$ neofetch
                   -`                    iago-lito@copak
                  .o+`                   ---------------
                 `ooo/                   OS: Arch Linux x86_64
                `+oooo:                  Host: Precision 3460
               `+oooooo:                 Kernel: 6.5.2-arch1-1
               -+oooooo+:                Uptime: 1 day, 15 hours, 38 mins
             `/:-:++oooo+:               Packages: 1339 (pacman)
            `/++++/+++++++:              Shell: zsh 5.9
           `/++++++++++++++:             Resolution: 2560x1440
          `/+++ooooooooooooo/`           DE: GNOME 44.4
         ./ooosssso++osssssso+`          WM: Mutter
        .oossssso-````/ossssss+`         WM Theme: Adwaita
       -osssssso.      :ssssssso.        Theme: Adwaita [GTK2/3]
      :osssssss/        osssso+++.       Icons: Adwaita [GTK2/3]
     /ossssssss/        +ssssooo/-       Terminal: alacritty
   `/ossssso+/:-        -:/+osssso+-     CPU: 12th Gen Intel i7-12700 (20) @ 4.800GHz
  `+sso+:-`                 `.-/+oso:    GPU: NVIDIA T400 4GB
 `++:.                           `-/+/   GPU: Intel AlderLake-S GT1
 .`                                 `/   Memory: 9816MiB / 31787MiB

$ pacman -Qi intel-oneapi-mkl
Name            : intel-oneapi-mkl
Version         : 2023.2.0_49495-2
Description     : Intel oneAPI Math Kernel Library
Architecture    : x86_64
URL             : https://software.intel.com/content/www/us/en/develop/tools/oneapi.html
Licenses        : custom
Groups          : None
Provides        : intel-mkl  intel-mkl-static
Depends On      : intel-oneapi-compiler-dpcpp-cpp-runtime  intel-oneapi-tbb  intel-oneapi-common
Optional Deps   : None
Required By     : python-pytorch-cuda
Optional For    : None
Conflicts With  : intel-mkl  intel-mkl-static  intel-oneapi-basekit
Replaces        : intel-mkl  intel-mkl-static
Installed Size  : 3.16 GiB
Packager        : Torsten Keßler &amp;lt;tpkessler@archlinux.org&amp;gt;
Build Date      : Sat 02 Sep 2023 04:22:23 PM CEST
Install Date    : Mon 04 Sep 2023 05:44:01 PM CEST
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature&lt;/LI-CODE&gt;&lt;P&gt;Prepare folder with the two files above:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;.
├── CMakeLists.txt
└── main.cpp&lt;/LI-CODE&gt;&lt;P&gt;Fail build with:&lt;/P&gt;&lt;LI-CODE lang="none"&gt;$ cmake .
-- The CXX compiler identification is GNU 13.2.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.1")
-- Checking for one of the modules 'mkl-dynamic-lp64-iomp'
-- Configuring done (0.3s)
-- Generating done (0.0s)
-- Build files have been written to: .

$ make
[ 50%] Building CXX object CMakeFiles/main.dir/main.cpp.o
./tp/main.cpp: In function ‘int main()’:
./tp/main.cpp:4:27: error: ‘FLT_RADIX’ was not declared in this scope
    4 | int main() { std::cout &amp;lt;&amp;lt; FLT_RADIX &amp;lt;&amp;lt; std::endl; };
      |                           ^~~~~~~~~
make[2]: *** [CMakeFiles/main.dir/build.make:76: CMakeFiles/main.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/main.dir/all] Error 2
make: *** [Makefile:91: all] Error 2&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a docker recipe to (hopefully) reproduce on another distro/OS:&lt;/P&gt;&lt;P&gt;Dockerfile&lt;/P&gt;&lt;LI-CODE lang="none"&gt;# syntax=docker/dockerfile:1.3-labs
FROM archlinux

RUN &amp;lt;&amp;lt;EOF
    pacman -Syu --noconfirm
    pacman -Sy --noconfirm  base-devel cmake intel-oneapi-mkl
    mkdir /test
EOF

WORKDIR /test

COPY ./main.cpp .
COPY ./CMakeLists.txt .

RUN cmake .

ENTRYPOINT ["make"] &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Build image with:&lt;/P&gt;&lt;LI-CODE lang="none"&gt;$ docker buildx build -t mkltest .&lt;/LI-CODE&gt;&lt;P&gt;Run and fail compilation with:&lt;/P&gt;&lt;LI-CODE lang="none"&gt;$ docker run --rm -it mkltest
[ 50%] Building CXX object CMakeFiles/main.dir/main.cpp.o
/test/main.cpp: In function ‘int main()’:
/test/main.cpp:4:27: error: ‘FLT_RADIX’ was not declared in this scope
    4 | int main() { std::cout &amp;lt;&amp;lt; FLT_RADIX &amp;lt;&amp;lt; std::endl; };
      |                           ^~~~~~~~~
make[2]: *** [CMakeFiles/main.dir/build.make:76: CMakeFiles/main.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/main.dir/all] Error 2
make: *** [Makefile:91: all] Error 2&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you reproduce?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 08:12:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FLT-RADIX-not-defined-when-including-MKL-dirs/m-p/1523650#M35119</guid>
      <dc:creator>iago-lito</dc:creator>
      <dc:date>2023-09-14T08:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: FLT_RADIX not defined when including MKL dirs.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FLT-RADIX-not-defined-when-including-MKL-dirs/m-p/1526237#M35161</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for providing all the details and reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When we tried to run the CMakeLists provided by you, we were able to get errors but we have included the MKL directories properly. Could you please try the below-attached CMakeLists.txt using the sample reproducer code provided by you with GCC compiler as well as Intel LLVM compiler?&lt;/P&gt;
&lt;P&gt;Please find the below screenshots for more details:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VarshaS_Intel_1-1695306380759.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/46008i8F6E5115133AFB55/image-size/medium?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="VarshaS_Intel_1-1695306380759.png" alt="VarshaS_Intel_1-1695306380759.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Using GNU Compiler&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VarshaS_Intel_3-1695306546949.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/46010i48437CA19887CDF8/image-size/medium?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="VarshaS_Intel_3-1695306546949.png" alt="VarshaS_Intel_3-1695306546949.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Using Intel LLVM Compiler&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Could you please try and let us know if you are still facing any issues?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Varsha&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 14:32:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FLT-RADIX-not-defined-when-including-MKL-dirs/m-p/1526237#M35161</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-09-21T14:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: FLT_RADIX not defined when including MKL dirs.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FLT-RADIX-not-defined-when-including-MKL-dirs/m-p/1527263#M35173</link>
      <description>&lt;P&gt;Thank you for support again. The CMakeLists.txt you provide does fix the build process. From what I understand, the problem stemed from `find_package(MKL CONFIG REQUIRED)` and `pkg_search_module(MKL mkl-dynamic-lp64-iomp)` not properly loaded from environment variable `MKLROOT` because they actually expect `MKL_ROOT` to be defined instead, is that correct?&lt;/P&gt;&lt;P&gt;I would rather expect `find_package(MLK CONFIG REQUIRED)` to work out of the box. Maybe this should be considered a bug in `FindMKL.cmake`? Or a failure of the pacman package intel-oneapi-mkl to meet the environment expected by `cmake` and `MKL` to work together?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, I am confused because the project I'm working on does not use&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;find_package(MKL CONFIG REQUIRED)&lt;/LI-CODE&gt;&lt;P&gt;as you suggest in your `CMakeLists.txt`, but&lt;/P&gt;&lt;LI-CODE lang="none"&gt;find_package(PkgConfig REQUIRED)
pkg_search_module(MKL mkl-dynamic-lp64-iomp)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;instead, which still leads to the the same failure. What difference does it make?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2023 10:10:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FLT-RADIX-not-defined-when-including-MKL-dirs/m-p/1527263#M35173</guid>
      <dc:creator>iago-lito</dc:creator>
      <dc:date>2023-09-25T10:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: FLT_RADIX not defined when including MKL dirs.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FLT-RADIX-not-defined-when-including-MKL-dirs/m-p/1530338#M35244</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;The CMakeLists.txt you provide does fix the build process.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Glad to know that you are able to run and build it without any issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When we do initialize the Intel MKL environment it will set the MKLROOT path.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;echo $MKLROOT
/opt/intel/oneapi/mkl/2023.2.0&lt;/LI-CODE&gt;
&lt;P&gt;We have changed the CMakeLists file and it is working as expected. Please find the attached file for details and screenshot:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VarshaS_Intel_0-1696438563665.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/46407i7B051374B4DF36B9/image-size/medium?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="VarshaS_Intel_0-1696438563665.png" alt="VarshaS_Intel_0-1696438563665.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, could you please find the below link for more details and usage of CMake:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.intel.com/content/www/us/en/docs/onemkl/developer-guide-linux/2023-2/cmake-config-for-onemkl.html" target="_blank" rel="noopener"&gt;https://www.intel.com/content/www/us/en/docs/onemkl/developer-guide-linux/2023-2/cmake-config-for-onemkl.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Varsha&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 16:58:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FLT-RADIX-not-defined-when-including-MKL-dirs/m-p/1530338#M35244</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-10-04T16:58:54Z</dc:date>
    </item>
    <item>
      <title>Re:FLT_RADIX not defined when including MKL dirs.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FLT-RADIX-not-defined-when-including-MKL-dirs/m-p/1532562#M35282</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We have not heard back from you. Could you please let us know if you need any other details?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Varsha&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Oct 2023 08:32:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FLT-RADIX-not-defined-when-including-MKL-dirs/m-p/1532562#M35282</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-10-11T08:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: FLT_RADIX not defined when including MKL dirs.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FLT-RADIX-not-defined-when-including-MKL-dirs/m-p/1532961#M35288</link>
      <description>&lt;P&gt;Hi, well, although the example toy project does compile with the CMakeLists.txt files that you suggest, a few questions remain unanswered:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) The project I have been given uses&lt;/P&gt;&lt;LI-CODE lang="none"&gt;find_package(PkgConfig REQUIRED)
pkg_search_module(MKL mkl-dynamic-lp64-iomp)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;instead of&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;find_package(MKL CONFIG REQUIRED)&lt;/LI-CODE&gt;&lt;P&gt;Why ? What difference does it make? I still haven't been able to make it compile while keeping the original `pkg_search_module` line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) The line&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;find_package(MKL CONFIG REQUIRED)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;does not even work out-of-the box, and we need to tweak it into&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;find_package(MKL CONFIG REQUIRED PATHS $ENV{MKLROOT})&lt;/LI-CODE&gt;&lt;P&gt;to make it work. The reason is that it expects `MKL_ROOT` to be defined but the environment only defines `MKLROOT`. Is this expected behaviour? Or is this a bug in `FindMKL.cmake` ? Or is this a bug in my distribution / environment?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2023 07:54:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FLT-RADIX-not-defined-when-including-MKL-dirs/m-p/1532961#M35288</guid>
      <dc:creator>iago-lito</dc:creator>
      <dc:date>2023-10-12T07:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: FLT_RADIX not defined when including MKL dirs.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FLT-RADIX-not-defined-when-including-MKL-dirs/m-p/1535836#M35342</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt; I still haven't been able to make it compile while keeping the original `pkg_search_module` line.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;You can use both the PkgConfig and the MKL Config but we need to specify the exact MKLROOT environment.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please try adding the below lines of code and let us know if you are still facing any issues?&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;cmake_minimum_required(VERSION 3.20..3.22)

project(MklTest LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)

add_executable(main main.cpp)

#-------------------------------------------------------------------------------
find_package(PkgConfig REQUIRED)
pkg_search_module(MKL mkl-dynamic-lp64-iomp PATHS $ENV{MKLROOT})
target_include_directories(main PRIVATE PATHS $ENV{MKLROOT})
#-------------------------------------------------------------------------------

#target_link_libraries(main PRIVATE toml++)
&lt;/LI-CODE&gt;
&lt;P&gt;Please refer to the below link for more details on pkg-config:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.intel.com/content/www/us/en/developer/articles/technical/intel-math-kernel-library-intel-mkl-and-pkg-config-tool.html" target="_blank" rel="noopener"&gt;https://www.intel.com/content/www/us/en/developer/articles/technical/intel-math-kernel-library-intel-mkl-and-pkg-config-tool.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;The reason is that it expects `MKL_ROOT` to be defined but the environment only defines `MKLROOT`.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;No, it is not a bug and by default, MKLROOT was defined by the setvars.sh environment. MKL_ROOT may be required for non-standard install locations. Could you please refer to the CMakeLists for more details:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.intel.com/content/www/us/en/docs/onemkl/developer-guide-linux/2023-2/cmake-config-for-onemkl.html" target="_blank"&gt;https://www.intel.com/content/www/us/en/docs/onemkl/developer-guide-linux/2023-2/cmake-config-for-onemkl.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and Regards,&lt;/P&gt;
&lt;P&gt;Varsha&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 12:55:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FLT-RADIX-not-defined-when-including-MKL-dirs/m-p/1535836#M35342</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-10-20T12:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: FLT_RADIX not defined when including MKL dirs.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FLT-RADIX-not-defined-when-including-MKL-dirs/m-p/1537063#M35358</link>
      <description>&lt;P&gt;Hello, and thank you for the explanations and the docs. I'll look into the non-standard installations to track the reason for the mismatched varname, but I guess this gets out of scope for this forum then &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt; Thank you for your patience, and best regards,&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 07:04:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FLT-RADIX-not-defined-when-including-MKL-dirs/m-p/1537063#M35358</guid>
      <dc:creator>iago-lito</dc:creator>
      <dc:date>2023-10-25T07:04:47Z</dc:date>
    </item>
    <item>
      <title>Re:FLT_RADIX not defined when including MKL dirs.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FLT-RADIX-not-defined-when-including-MKL-dirs/m-p/1537999#M35374</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Sure,  Thanks for accepting our solution. It’s great to know that the issue has been resolved, in case you run into any other issues please feel free to create a new thread.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Have a Good Day!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Varsha&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 27 Oct 2023 14:44:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FLT-RADIX-not-defined-when-including-MKL-dirs/m-p/1537999#M35374</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-10-27T14:44:17Z</dc:date>
    </item>
  </channel>
</rss>

