- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We have a Cmake build script set up to build our program on Linux. This works fine with IFORT, but I'm having an issue with IFX and LTO (link time optimisation). With IFORT we were using IPO (inter-procedural optimisation).
We have 4 shared libraries that are compiled with -ipo with IFORT); these now use -flto with IFX.
We also have a static library that is compiled with -ip with IFORT; when I change this to use -ftlo, I get a link error:
ld: error: LLVM gold plugin: Never resolved value found in function (Producer: 'Intel.oneAPI.DPCPP.Compiler_2023.1.0' Reader: 'Intel.oneAPI.DPCPP.Compiler_2023.1.0')
This links successfully if I omit -flto for the static library.
Before I try cutting this down, has anyone had similar issues or a solution?
OneAPI 2023.1
Ubuntu 20.04 LTS
Cmake 3.26.4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found out what was happening, because I had similar link issues with LTO (/Qipo) on Windows with IFX.
I had to disable optimisation on one file in the static library because it ICEd otherwise (this has been reported (05854745) and should be fixed in OneAPI 2023.2).
Disabling optimisation also disables LTO.
It also appears that all files in a project need to be compiled with LTO enabled for it to link correctly.
Luckily, the code in the offending file is not used yet, so I could just comment it out and use the default project optimisation option.
One other point was that I was also having link issues with a C++ DLL using IFX/LTO dependent libraries on Windows. In this case, the problem was the C++ project was using the Microsoft VS 2019 Platform Toolset (so not using the LLVM linker). Switching to Intel C++ resolved this.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found out what was happening, because I had similar link issues with LTO (/Qipo) on Windows with IFX.
I had to disable optimisation on one file in the static library because it ICEd otherwise (this has been reported (05854745) and should be fixed in OneAPI 2023.2).
Disabling optimisation also disables LTO.
It also appears that all files in a project need to be compiled with LTO enabled for it to link correctly.
Luckily, the code in the offending file is not used yet, so I could just comment it out and use the default project optimisation option.
One other point was that I was also having link issues with a C++ DLL using IFX/LTO dependent libraries on Windows. In this case, the problem was the C++ project was using the Microsoft VS 2019 Platform Toolset (so not using the LLVM linker). Switching to Intel C++ resolved this.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page