Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
5038 Discussions

Mismatch GCC version in Ubuntu 22.04 cause failing installation for Intel VTune

IonutNechita
Employee
602 Views

Mismatch GCC version in Ubuntu 22.04 cause failing installation for Intel VTune

 

Default GCC in Ubuntu 22.04 LTS is GCC-11.

But Kernel HWE in Ubuntu 22.04 is 6.5 now, and this is compiled with GCC-12.

I notice one behaviour with GCC mismatch. VTune report failing installation.

 

 

 

 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/561 MB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 241335 files and directories currently installed.)
Preparing to unpack .../intel-oneapi-vtune_2024.1.0-515_amd64.deb ...
Warning:  no socwatch driver was found loaded in the kernel.
Using C compiler = gcc
Using kernel build dir = /lib/modules/6.5.0-35-generic/build
No module symvers file found
Using common inc dir = /opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver/../common/include
"/lib/modules/6.5.0-35-generic/build/include/linux/cpufreq.h" exists!
Using file name sw_driver
Make args = KERNEL_SRC_DIR=/lib/modules/6.5.0-35-generic/build CPUFREQ_FIX_BACKPORTED=1 DO_DEBUG_BUILD=0 DO_PROFILING=0 COMMON_INC_DIR=/opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver/../common/include MODULE_SYMVERS_FILE= FILE_NAME=sw_driver
make -C /lib/modules/6.5.0-35-generic/build M=/opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver clean
make[1]: Entering directory '/usr/src/linux-headers-6.5.0-35-generic'
make[1]: Leaving directory '/usr/src/linux-headers-6.5.0-35-generic'
Warning:  no vtsspp driver was found loaded in the kernel.
  CLEAN   /opt/intel/oneapi/vtune/2024.1/sepdk/src/vtsspp

Warning:  the following driver(s) were not found loaded in the kernel:  sep5.

Warning:  no vtsspp driver was found loaded in the kernel.

Warning: skipping SOCWATCH driver unload, not built


Warning:  the following driver(s) were not found loaded in the kernel:  socperf3.


The PAX service is not loaded anymore.
No previously installed pax driver boot script was found.
Stop and disable sep5.service ...
Removed /etc/systemd/system/multi-user.target.wants/sep5.service.
done.
rm -f sep5*.ko
make[1]: Entering directory '/opt/intel/oneapi/vtune/2024.1/sepdk/src/pax'
rm -f *.o .*.o.cmd .*.o.d .*.ko.cmd .*.ko.unsigned.cmd *.gcno .cache.mk *.o.ur-safe .*.o.tmp *.mod .*.mod.cmd
rm -f pax.ko pax.ko.unsigned pax-x32_64-6.5.0-35-genericsmp.ko
rm -f Module.symvers Modules.symvers *.mod.c modules.order Module.markers .modules.order.cmd .Module.symvers.cmd
rm -rf .tmp_versions
rm -f pax*.ko
make[1]: Leaving directory '/opt/intel/oneapi/vtune/2024.1/sepdk/src/pax'
make[1]: Entering directory '/opt/intel/oneapi/vtune/2024.1/sepdk/src/socperf/src'
rm -f *.o .*.o.cmd .*.o.d .*.ko.cmd .*.ko.unsigned.cmd *.gcno .cache.mk *.o.ur-safe .*.o.tmp *.mod .*.mod.cmd
rm -f socperf3.ko socperf3.ko.unsigned
rm -f socperf3*x32_64-6.5.0-35-genericsmp.ko
rm -f Module.symvers Modules.symvers *.mod.c modules.order Module.markers .modules.order.cmd .Module.symvers.cmd
rm -rf .tmp_versions
rm -f socperf3*.ko
make[1]: Leaving directory '/opt/intel/oneapi/vtune/2024.1/sepdk/src/socperf/src'
Unpacking intel-oneapi-vtune (2024.1.0-515) over (2024.1.0-515) ...
Setting up intel-oneapi-vtune (2024.1.0-515) ...
C compiler version: 11.4.0
Make version: 4.3
Kernel version: 6.5.0-35-generic

Cleaning workspaces ...
Done

Building socperf driver ...
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  You are using:           gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
gcc: error: unrecognized command-line option ‘-ftrivial-auto-var-init=zero’
make[3]: *** [scripts/Makefile.build:251: /opt/intel/oneapi/vtune/2024.1/sepdk/src/socperf/src/socperfdrv.o] Error 1
make[3]: *** Waiting for unfinished jobs....
gcc: error: unrecognized command-line option ‘-ftrivial-auto-var-init=zero’
make[3]: *** [scripts/Makefile.build:251: /opt/intel/oneapi/vtune/2024.1/sepdk/src/socperf/src/control.o] Error 1
gcc: error: unrecognized command-line option ‘-ftrivial-auto-var-init=zero’
make[3]: *** [scripts/Makefile.build:251: /opt/intel/oneapi/vtune/2024.1/sepdk/src/socperf/src/utility.o] Error 1
gcc: error: unrecognized command-line option ‘-ftrivial-auto-var-init=zero’
make[3]: *** [scripts/Makefile.build:251: /opt/intel/oneapi/vtune/2024.1/sepdk/src/socperf/src/pmu_list.o] Error 1
make[2]: *** [Makefile:2039: /opt/intel/oneapi/vtune/2024.1/sepdk/src/socperf/src] Error 2
make[1]: *** [Makefile:145: default] Error 2
make: *** [Makefile:219: default] Error 2

Failed to build the drivers


Warning:  the following driver(s) were not found loaded in the kernel:  sep5.

Warning:  no vtsspp driver was found loaded in the kernel.

Warning: skipping SOCWATCH driver unload, not built


Warning:  the following driver(s) were not found loaded in the kernel:  socperf3.


The PAX service is not loaded anymore.
PYTHON is set to python3

ERROR: sep5 driver "sep5-x32_64-6.5.0-35-genericsmp.ko"
was not found in directory "." !

This means you may need to build sep5 driver from the provided
driver sources. Please see the driver README for instructions.

Note: Ensure that the driver is built for kernel version 6.5.0-35-generic

Configuring sep5 boot script with the following options:
    driver files = /opt/intel/oneapi/vtune/2024.1/sepdk/src/.
Creating systemd load script /usr/local/sbin/sep5-load.sh ...
done.
Creating systemd boot config file /lib/systemd/system/sep5.service ...
done.
Configuring autoload of sep5.service service ...
Created symlink /etc/systemd/system/multi-user.target.wants/sep5.service → /lib/systemd/system/sep5.service.
Job for sep5.service failed because the control process exited with error code.
See "systemctl status sep5.service" and "journalctl -xeu sep5.service" for details.
WARNING: systemctl start returned error 1 ...
done.

 

 

How is possible to install correctly VTune with GCC-12 as default version in Ubuntu?

Labels (1)
0 Kudos
1 Solution
yuzhang3_intel
Moderator
533 Views

Specify the gcc12 to build the sepdk driver again. 

 

yuzhang3@yuzhang3-10710:~/Downloads/sep/sepdk_2024.1/src$ ./build-driver

C compiler to use: [ /bin/gcc ]       /bin/gcc-12 

View solution in original post

0 Kudos
5 Replies
yuzhang3_intel
Moderator
564 Views

Could you try with gcc 12.x to build the driver?

 

warning: the compiler differs from the one used to build the kernel The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0 You are using: gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 gcc: error: unrecognized command-line option ‘-ftrivial-auto-var-init=zero’

0 Kudos
IonutNechita
Employee
563 Views
0 Kudos
yuzhang3_intel
Moderator
534 Views

Specify the gcc12 to build the sepdk driver again. 

 

yuzhang3@yuzhang3-10710:~/Downloads/sep/sepdk_2024.1/src$ ./build-driver

C compiler to use: [ /bin/gcc ]       /bin/gcc-12 

0 Kudos
IonutNechita
Employee
495 Views
0 Kudos
IonutNechita
Employee
485 Views

This is working correctly.

Thank you.

# :/opt/intel/oneapi/vtune/2024.1/sepdk/src# ./build-driver

C compiler to use: [ /bin/gcc ] /usr/bin/gcc-12
C compiler version: 12.3.0

Make command to use: [ /bin/make ] /usr/bin/make
Make version: 4.3

Kernel source directory: [ /lib/modules/6.5.0-35-generic/build ]
Kernel version: 6.5.0-35-generic

Cleaning workspaces ...
Done

Building socperf driver ...
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  You are using:           gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
Skipping BTF generation for /opt/intel/oneapi/vtune/2024.1/sepdk/src/socperf/src/socperf3.ko due to unavailability of vmlinux
Done

Building sep driver ...
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  You are using:           gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
/opt/intel/oneapi/vtune/2024.1/sepdk/src/sys64.o: warning: objtool: SYS_Get_GDT_Base+0x3: 'naked' return found in RETHUNK build
/opt/intel/oneapi/vtune/2024.1/sepdk/src/sys64.o: warning: objtool: SYS_IO_Delay+0x0: 'naked' return found in RETHUNK build
Skipping BTF generation for /opt/intel/oneapi/vtune/2024.1/sepdk/src/sep5.ko due to unavailability of vmlinux
Done

Building pax driver ...
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  You are using:           gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
Skipping BTF generation for /opt/intel/oneapi/vtune/2024.1/sepdk/src/pax/pax.ko due to unavailability of vmlinux
Done

Building vtsspp driver ...
make[1]: Entering directory '/opt/intel/oneapi/vtune/2024.1/sepdk/src/vtsspp'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  You are using:           gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
Skipping BTF generation for /opt/intel/oneapi/vtune/2024.1/sepdk/src/vtsspp/vtsspp.ko due to unavailability of vmlinux
make[1]: Leaving directory '/opt/intel/oneapi/vtune/2024.1/sepdk/src/vtsspp'
Done

Building socwatch driver ...
Building drivers for Linux target
-n switch is deprecated. Now it does not have any effect.
/lib/modules/6.5.0-35-generic/build will be used as the kernel build directory
Removing previously built driver and scripts from /opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/drivers
-c /usr/bin/gcc-12 -l -k /lib/modules/6.5.0-35-generic/build will be used to build the SoCWatch driver
-c /usr/bin/gcc-12 -l -k /lib/modules/6.5.0-35-generic/build
************ Building socwatch2_15-x32_64-6.5.0-35-genericsmp.ko driver ************
Using C compiler = /usr/bin/gcc-12
Using kernel build dir = /lib/modules/6.5.0-35-generic/build
No module symvers file found
Using common inc dir = /opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver/../common/include
"/lib/modules/6.5.0-35-generic/build/include/linux/cpufreq.h" exists!
Using file name sw_driver
Make args = KERNEL_SRC_DIR=/lib/modules/6.5.0-35-generic/build CPUFREQ_FIX_BACKPORTED=1 DO_DEBUG_BUILD=0 DO_PROFILING=0 COMMON_INC_DIR=/opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver/../common/include MODULE_SYMVERS_FILE= FILE_NAME=sw_driver
make[1]: Entering directory '/opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver'
make -C /lib/modules/6.5.0-35-generic/build M=/opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver clean
make[2]: Entering directory '/usr/src/linux-headers-6.5.0-35-generic'
make[2]: Leaving directory '/usr/src/linux-headers-6.5.0-35-generic'
make[1]: Leaving directory '/opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver'
Using C compiler = /usr/bin/gcc-12
Using kernel build dir = /lib/modules/6.5.0-35-generic/build
No module symvers file found
Using common inc dir = /opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver/../common/include
"/lib/modules/6.5.0-35-generic/build/include/linux/cpufreq.h" exists!
Using file name sw_driver
Make args = KERNEL_SRC_DIR=/lib/modules/6.5.0-35-generic/build CPUFREQ_FIX_BACKPORTED=1 DO_DEBUG_BUILD=0 DO_PROFILING=0 COMMON_INC_DIR=/opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver/../common/include MODULE_SYMVERS_FILE= FILE_NAME=sw_driver
make[1]: Entering directory '/opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver'
make -C /lib/modules/6.5.0-35-generic/build M=/opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver clean
make[2]: Entering directory '/usr/src/linux-headers-6.5.0-35-generic'
make[2]: Leaving directory '/usr/src/linux-headers-6.5.0-35-generic'
************************************************************
KERNEL_SRC_DIR=/lib/modules/6.5.0-35-generic/build
CPUFREQ_FIX_BACKPORTED=1
MODULE_SYMVERS_FILE=
DO_DRIVER_PROFILING=0
INCDIR_1=/opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver/../common/include
************************************************************
make -C /lib/modules/6.5.0-35-generic/build M=/opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver modules PWD=/opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver
make[2]: Entering directory '/usr/src/linux-headers-6.5.0-35-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  You are using:           gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  CC [M]  /opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver/./src/sw_driver.o
  CC [M]  /opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver/./src/sw_hardware_io.o
  CC [M]  /opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver/./src/sw_output_buffer.o
  CC [M]  /opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver/./src/sw_tracepoint_handlers.o
  CC [M]  /opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver/./src/sw_collector.o
  CC [M]  /opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver/./src/sw_mem.o
  CC [M]  /opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver/./src/sw_internal.o
  CC [M]  /opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver/./src/sw_file_ops.o
  CC [M]  /opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver/./src/sw_ops_provider.o
  CC [M]  /opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver/./src/sw_trace_notifier_provider.o
  CC [M]  /opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver/./src/sw_reader.o
  CC [M]  /opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver/./src/sw_telem.o
  CC [M]  /opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver/./src/sw_pmt.o
  CC [M]  /opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver/./src/sw_counter_list.o
  CC [M]  /opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver/./src/sw_pci.o
  LD [M]  /opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver/socwatch2_15.o
  MODPOST /opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver/Module.symvers
  CC [M]  /opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver/socwatch2_15.mod.o
  LD [M]  /opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver/socwatch2_15.ko
  BTF [M] /opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver/socwatch2_15.ko
Skipping BTF generation for /opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver/socwatch2_15.ko due to unavailability of vmlinux
make[2]: Leaving directory '/usr/src/linux-headers-6.5.0-35-generic'
make[1]: Leaving directory '/opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/socwatch_driver'
************ Built drivers are copied to /opt/intel/oneapi/vtune/2024.1/sepdk/src/socwatch/drivers directory ************
Done

Done building the drivers
0 Kudos
Reply