<?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: Building latest linux kernel fails in Intel® oneAPI DPC++/C++ Compiler</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Building-latest-linux-kernel-fails/m-p/1640462#M4168</link>
    <description>&lt;P&gt;i have found this restriction can be bypassed. Open scripts/Kconfig.include and replace checks with error to static:&lt;/P&gt;&lt;P&gt;cc-info := "Clang"&lt;BR /&gt;cc-name := "Clang"&lt;BR /&gt;cc-version := "18"&lt;/P&gt;&lt;P&gt;# Get the assembler name, version, and error out if it is not supported.&lt;BR /&gt;as-info := "LLVM Assembler"&lt;BR /&gt;as-name := "LLVM Assembler"&lt;BR /&gt;as-version := "18"&lt;/P&gt;&lt;P&gt;# Get the linker name, version, and error out if it is not supported.&lt;BR /&gt;ld-info := "LLVM ld"&lt;BR /&gt;ld-name := "LLVM ld"&lt;BR /&gt;ld-version := "18"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this emulates as if we now compiling with clang, while actual compiler is Intel C++.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In options need to set CC=icx, HOSTCC=icx and advisable HOSTCXX=icpx&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then need to add pragmas to disable warning about stack limits that (which grows into error later) by &lt;STRONG&gt;mofidying &lt;U&gt;&lt;EM&gt;arch/x86/kvm/hyperv.c&lt;/EM&gt;&lt;/U&gt;&lt;/STRONG&gt;. Add:&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wall"
#pragma clang diagnostic ignored "-Wextra"
#pragma clang diagnostic ignored "-Wpedantic"
#pragma clang diagnostic ignored "-Wframe-larger-than"&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Now kernel lets to be compiled, but on Modules linking it fails with following:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;MODPOST Module.symvers
ERROR: modpost: "_intel_fast_memset" [arch/x86/events/amd/amd-uncore.ko] undefined!
ERROR: modpost: "_intel_fast_memset" [arch/x86/kernel/cpu/mce/mce-inject.ko] undefined!
ERROR: modpost: "_intel_fast_memcpy" [arch/x86/kernel/cpu/mce/mce-inject.ko] undefined!
ERROR: modpost: "_intel_fast_memset" [arch/x86/crypto/twofish-x86_64-3way.ko] undefined!
ERROR: modpost: "_intel_fast_memset" [arch/x86/crypto/twofish-avx-x86_64.ko] undefined!
ERROR: modpost: "_intel_fast_memset" [arch/x86/crypto/serpent-sse2-x86_64.ko] undefined!
ERROR: modpost: "_intel_fast_memcpy" [arch/x86/crypto/serpent-sse2-x86_64.ko] undefined!
ERROR: modpost: "_intel_fast_memset" [arch/x86/crypto/serpent-avx-x86_64.ko] undefined!&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;I have no ideas what to do with this error&lt;/P&gt;</description>
    <pubDate>Thu, 31 Oct 2024 15:48:29 GMT</pubDate>
    <dc:creator>SInfolke</dc:creator>
    <dc:date>2024-10-31T15:48:29Z</dc:date>
    <item>
      <title>Building latest linux kernel fails</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Building-latest-linux-kernel-fails/m-p/1637649#M4144</link>
      <description>&lt;P&gt;I'm trying to build latest linux kernel with this compiler. I followed this&lt;A href="https://itsfoss.com/compile-linux-kernel/" target="_blank" rel="noopener"&gt; instruction&amp;nbsp;&lt;/A&gt;and executed with the following command:&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;LI-CODE lang="bash"&gt;CFLAGS="-xHost -fast -mtune=native -O2 -flto -w -s -fvisibility=hidden"

make CC=icx CFLAGS="$CFLAGS" LD=xild AR=xiar NM=llvm-nm STRIP=llvm-strip OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump READELF=llvm-readelf HOSTCC=icx HOSTCXX=icpx HOSTAR=xiar HOSTLD=xild LLVM=/opt/intel/oneapi/compiler/2024.2/bin/compiler
  SYNC    include/config/auto.conf.cmd
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/confdata.o
  HOSTCC  scripts/kconfig/expr.o
  LEX     scripts/kconfig/lexer.lex.c
  YACC    scripts/kconfig/parser.tab.[ch]
  HOSTCC  scripts/kconfig/lexer.lex.o
  HOSTCC  scripts/kconfig/menu.o
  HOSTCC  scripts/kconfig/parser.tab.o
  HOSTCC  scripts/kconfig/preprocess.o
  HOSTCC  scripts/kconfig/symbol.o
  HOSTCC  scripts/kconfig/util.o
  HOSTLD  scripts/kconfig/conf
icx: unknown assembler invoked
scripts/Kconfig.include:51: Sorry, this assembler is not supported.
make[3]: *** [scripts/kconfig/Makefile:85: syncconfig] Error 1
make[2]: *** [Makefile:681: syncconfig] Error 2
/home/ura/Downloads/linux-6.11.3/Makefile:759: include/config/auto.conf.cmd: No such file or directory
make[1]: *** [/home/ura/Downloads/linux-6.11.3/Makefile:782: include/config/auto.conf.cmd] Error 2
make: *** [Makefile:224: __sub-make] Error 2&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would i fix that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just realised it also fails to build if i simply run&amp;nbsp; "make LLVM=1" which likely suppose i either done some configurations incorrectly or there is a kernel build system bug.&lt;BR /&gt;I'm using linux mint version. By the instruction above i copied a configuration that already exists:&lt;BR /&gt;in the /boot dir there were some files like config-6.8.0-VER-generic, and were files with VER 38, 45, 47. I copied&amp;nbsp;config-6.8.0-47-generic as ".config" to the root dir of linux kernel and run:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; ./scripts/config --file .config --set-str LOCALVERSION "-pratham"
make olddefconfig&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;llvm compiler i use is one icx come with.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2024 17:02:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Building-latest-linux-kernel-fails/m-p/1637649#M4144</guid>
      <dc:creator>SInfolke</dc:creator>
      <dc:date>2024-10-16T17:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: Building latest linux kernel fails</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Building-latest-linux-kernel-fails/m-p/1637868#M4146</link>
      <description>&lt;P&gt;I've found that when using clang from llvm and clang packages installed by apt it builds well so it is still Intel C++ issue&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 18:18:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Building-latest-linux-kernel-fails/m-p/1637868#M4146</guid>
      <dc:creator>SInfolke</dc:creator>
      <dc:date>2024-10-17T18:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: Building latest linux kernel fails</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Building-latest-linux-kernel-fails/m-p/1640462#M4168</link>
      <description>&lt;P&gt;i have found this restriction can be bypassed. Open scripts/Kconfig.include and replace checks with error to static:&lt;/P&gt;&lt;P&gt;cc-info := "Clang"&lt;BR /&gt;cc-name := "Clang"&lt;BR /&gt;cc-version := "18"&lt;/P&gt;&lt;P&gt;# Get the assembler name, version, and error out if it is not supported.&lt;BR /&gt;as-info := "LLVM Assembler"&lt;BR /&gt;as-name := "LLVM Assembler"&lt;BR /&gt;as-version := "18"&lt;/P&gt;&lt;P&gt;# Get the linker name, version, and error out if it is not supported.&lt;BR /&gt;ld-info := "LLVM ld"&lt;BR /&gt;ld-name := "LLVM ld"&lt;BR /&gt;ld-version := "18"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this emulates as if we now compiling with clang, while actual compiler is Intel C++.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In options need to set CC=icx, HOSTCC=icx and advisable HOSTCXX=icpx&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then need to add pragmas to disable warning about stack limits that (which grows into error later) by &lt;STRONG&gt;mofidying &lt;U&gt;&lt;EM&gt;arch/x86/kvm/hyperv.c&lt;/EM&gt;&lt;/U&gt;&lt;/STRONG&gt;. Add:&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wall"
#pragma clang diagnostic ignored "-Wextra"
#pragma clang diagnostic ignored "-Wpedantic"
#pragma clang diagnostic ignored "-Wframe-larger-than"&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Now kernel lets to be compiled, but on Modules linking it fails with following:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;MODPOST Module.symvers
ERROR: modpost: "_intel_fast_memset" [arch/x86/events/amd/amd-uncore.ko] undefined!
ERROR: modpost: "_intel_fast_memset" [arch/x86/kernel/cpu/mce/mce-inject.ko] undefined!
ERROR: modpost: "_intel_fast_memcpy" [arch/x86/kernel/cpu/mce/mce-inject.ko] undefined!
ERROR: modpost: "_intel_fast_memset" [arch/x86/crypto/twofish-x86_64-3way.ko] undefined!
ERROR: modpost: "_intel_fast_memset" [arch/x86/crypto/twofish-avx-x86_64.ko] undefined!
ERROR: modpost: "_intel_fast_memset" [arch/x86/crypto/serpent-sse2-x86_64.ko] undefined!
ERROR: modpost: "_intel_fast_memcpy" [arch/x86/crypto/serpent-sse2-x86_64.ko] undefined!
ERROR: modpost: "_intel_fast_memset" [arch/x86/crypto/serpent-avx-x86_64.ko] undefined!&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;I have no ideas what to do with this error&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2024 15:48:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Building-latest-linux-kernel-fails/m-p/1640462#M4168</guid>
      <dc:creator>SInfolke</dc:creator>
      <dc:date>2024-10-31T15:48:29Z</dc:date>
    </item>
  </channel>
</rss>

