3

I am using Ubuntu 22.04 LTS and I just ran an

apt upgrade

This is the corresponding entry in /var/log/apt/history.log:

Install: gcc-12:amd64 (12.1.0-2ubuntu1~22.04, automatic), libtsan2:amd64 (12.1.0-2ubuntu1~22.04, automatic), libasan8:amd64 (12.1.0-2ubuntu1~22.04, automatic), cpp-12:amd64 (12.1.0-2ubuntu1~22.04, automatic), libgcc-12-dev: amd64 (12.1.0-2ubuntu1~22.04, automatic)
Upgrade: libkwinglutils13:amd64 (4:5.24.6-0ubuntu0.1, 4:5.24.7-0ubuntu0.1), kinfocenter:amd64 (4:5.24.6-0ubuntu0.1, 4:5.24.7-0ubuntu0.1), freerdp2-x11:amd64 (2.6.1+dfsg1-3ubuntu2.2, 2.6.1+dfsg1-3ubuntu2.3),                  libkwineffects13:amd64 (4:5.24.6-0ubuntu0.1, 4:5.24.7-0ubuntu0.1), plasma-workspace:amd64 (4:5.24.6-0ubuntu0.1, 4:5.24.7-0ubuntu0.1), libtaskmanager6:amd64 (4:5.24.6-0ubuntu0.1, 4:5.24.7-0ubuntu0.1), kde-config-updates:     amd64 (5.24.6-0ubuntu0.1, 5.24.7-0ubuntu0.1), libweather-ion7:amd64 (4:5.24.6-0ubuntu0.1, 4:5.24.7-0ubuntu0.1), firmware-sof-signed:amd64 (2.0-1ubuntu3, 2.0-1ubuntu4), libpowerdevilcore2:amd64 (4:5.24.4-0ubuntu1, 4:5.24.7-  0ubuntu0.1), nfs-common:amd64 (1:2.6.1-1ubuntu1.1, 1:2.6.1-1ubuntu1.2), gir1.2-javascriptcoregtk-4.0:amd64 (2.36.8-0ubuntu0.22.04.1, 2.38.2-0ubuntu0.22.04.2), plasma-discover-common:amd64 (5.24.6-0ubuntu0.1, 5.24.7-         0ubuntu0.1), gir1.2-webkit2-4.0:amd64 (2.36.8-0ubuntu0.22.04.1, 2.38.2-0ubuntu0.22.04.2), powerdevil:amd64 (4:5.24.4-0ubuntu1, 4:5.24.7-0ubuntu0.1), libflac8:amd64 (1.3.3-2build2, 1.3.3-2ubuntu0.1), plasma-workspace-data:   amd64 (4:5.24.6-0ubuntu0.1, 4:5.24.7-0ubuntu0.1), kwin-x11:amd64 (4:5.24.6-0ubuntu0.1, 4:5.24.7-0ubuntu0.1), plasma-discover-backend-snap:amd64 (5.24.6-0ubuntu0.1, 5.24.7-0ubuntu0.1), plasma-discover-backend-fwupd:amd64 (5. 24.6-0ubuntu0.1, 5.24.7-0ubuntu0.1), sddm-theme-breeze:amd64 (4:5.24.6-0ubuntu0.1, 4:5.24.7-0ubuntu0.1), libfreerdp2-2:amd64 (2.6.1+dfsg1-3ubuntu2.2, 2.6.1+dfsg1-3ubuntu2.3), libkwinxrenderutils13:amd64 (4:5.24.6-0ubuntu0.  1, 4:5.24.7-0ubuntu0.1), libcolorcorrect5:amd64 (4:5.24.6-0ubuntu0.1, 4:5.24.7-0ubuntu0.1), rsync:amd64 (3.2.3-8ubuntu3, 3.2.3-8ubuntu3.1), libunbound8:amd64 (1.13.1-1ubuntu5.2, 1.13.1-1ubuntu5.3), libpowerdevilui5:amd64    (4:5.24.4-0ubuntu1, 4:5.24.7-0ubuntu0.1), libjavascriptcoregtk-4.0-18:amd64 (2.36.8-0ubuntu0.22.04.1, 2.38.2-0ubuntu0.22.04.2), libwinpr2-2:amd64 (2.6.1+dfsg1-3ubuntu2.2, 2.6.1+dfsg1-3ubuntu2.3), libfreerdp-server2-2:amd64  (2.6.1+dfsg1-3ubuntu2.2, 2.6.1+dfsg1-3ubuntu2.3), netplan.io:amd64 (0.104-0ubuntu2.1, 0.105-0ubuntu2~22.04.1), libfreerdp-client2-2:amd64 (2.6.1+dfsg1-3ubuntu2.2, 2.6.1+dfsg1-3ubuntu2.3), plasma-desktop-data:amd64 (4:5.24.  6-0ubuntu0.1, 4:5.24.7-0ubuntu0.1), plasma-discover:amd64 (5.24.6-0ubuntu0.1, 5.24.7-0ubuntu0.1), libwebkit2gtk-4.0-37:amd64 (2.36.8-0ubuntu0.22.04.1, 2.38.2-0ubuntu0.22.04.2), libnotificationmanager1:amd64 (4:5.24.6-       0ubuntu0.1, 4:5.24.7-0ubuntu0.1), libkfontinstui5:amd64 (4:5.24.6-0ubuntu0.1, 4:5.24.7-0ubuntu0.1), libkfontinst5:amd64 (4:5.24.6-0ubuntu0.1, 4:5.24.7-0ubuntu0.1), libplasma-geolocation-interface5:amd64 (4:5.24.6-0ubuntu0.  1, 4:5.24.7-0ubuntu0.1), libnfsidmap1:amd64 (1:2.6.1-1ubuntu1.1, 1:2.6.1-1ubuntu1.2), libnetplan0:amd64 (0.104-0ubuntu2.1, 0.105-0ubuntu2~22.04.1), kwin-data:amd64 (4:5.24.6-0ubuntu0.1, 4:5.24.7-0ubuntu0.1), powerdevil-     data:amd64 (4:5.24.4-0ubuntu1, 4:5.24.7-0ubuntu0.1), libkworkspace5-5:amd64 (4:5.24.6-0ubuntu0.1, 4:5.24.7-0ubuntu0.1), dkms:amd64 (2.8.7-2ubuntu2, 2.8.7-2ubuntu2.1), plasma-desktop:amd64 (4:5.24.6-0ubuntu0.1, 4:5.24.7-     0ubuntu0.1), kwin-common:amd64 (4:5.24.6-0ubuntu0.1, 4:5.24.7-0ubuntu0.1)

After I did that I tried to build a project using CMake, which told me that the Intel OneAPI C++ compiler (icpx, version 2022.2.1) is broken and cannot compile a simple test program.

So I tried to compile a simple 'hello-world' program using the <cstdio> header, which gave me the error

fatal error: 'cstdio' file not found

If I use the C-header <stdio.h> instead I get

/usr/bin/ld: cannot find -lstdc++: No such file or directory

Using the GNU C++ compiler, everything works just fine.

Does anyone have the same problem or know what happened here and how to fix it? Thank you in advance.

Benjamin Loison
  • 3,782
  • 4
  • 16
  • 33
BernieD
  • 352
  • 1
  • 10

3 Answers3

2

May help you... please see this knowledge base article:

https://www.intel.com/content/www/us/en/developer/articles/troubleshooting/error-c-header-file-not-found-with-dpc-c-compiler.html

Some relevant text: Intel® oneAPI DPC++/C++ Compiler relies on the C++ runtime (libstdc++) from GNU g++ package on Linux. Intel Compiler driver (icpx) has a mechanism to detect which gcc versions are installed on the machine and picks the highest version installed if multiple versions are detected. If the highest version of GNU gcc detected doesn't have the equivalent g++ package installed, the customer will run into this problem.

TonyM
  • 366
  • 1
  • 4
2
sudo apt install libstdc++-12-dev

Should solve the problem.

Benjamin Loison
  • 3,782
  • 4
  • 16
  • 33
1

As per the system requirements of oneAPI C++ compilers, Ubuntu 22.04 is not a supported OS.
This may be the possible reason for your issue. You can try the supported operating systems.
Please refer to the below link for supported Operating systems: https://www.intel.com/content/www/us/en/developer/articles/system-requirements/intel-oneapi-dpcpp-system-requirements.html

SeshaP-Intel
  • 129
  • 5
  • Thank you very much. I just want to add that support of Ubuntu 22.04 has been added in version 2023.0.0. So if anyone has the same problem with Ubuntu 22.04, simply updating the oneAPI compiler should do the trick. – BernieD Jan 02 '23 at 14:10
  • Hello, I have similar problem where `icpx` cannot find the standard header files, `iostream` etc... I have reinstalled Intel OneAPI Compiler, but the problem continues. I have Ubuntu 22.04 and GCC 11 on the linux. GCC (both gcc and g++) works fine. Any suggestions? – berkus Jan 15 '23 at 08:34