FS#75557 - [intel-oneapi-mkl] Incorrect pkg-config output

Attached to Project: Community Packages
Opened by Vũ Hoàng Hưng (K3ssl3r5yndr0me) - Tuesday, 09 August 2022, 01:25 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Saturday, 10 September 2022, 23:50 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Konstantin Gizdov (kgizdov)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
pkg-config cannot automatically locate openmp.pc in directory /opt/intel/oneapi/compiler/2022.1.0/lib/pkgconfig. Once set the PKG_CONFIG_PATH environment variable, pkg-config produces linker flags to nonexistent directory.

pkg-config --cflags --libs mkl-dynamic-lp64-iomp
-> -I/usr/share/pkgconfig/../../include -I/opt/intel/oneapi/compiler/2022.1.0/lib/pkgconfig/../../linux/compiler/include -L/usr/share/pkgconfig/../../lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lpthread -lm -ldl -L/opt/intel/oneapi/compiler/2022.1.0/lib/pkgconfig/../../linux/compiler/lib/intel64/ -liomp5
/opt/intel/oneapi/compiler/2022.1.0/lib/pkgconfig/../../linux/compiler/lib/intel64/ doesn't exist but /opt/intel/oneapi/compiler/2022.1.0/lib/pkgconfig/../../linux/compiler/lib/intel64_lin does
/usr/share/pkgconfig/../../lib/intel64 doesn't exist

the same is true for all mkl-* (both dynamic and static, seq and iomp).


Additional info:
* package version(s)
intel-oneapi-mkl 2022.1.0_223-3


Steps to reproduce:
1. export PKG_CONFIG_PATH=/opt/intel/oneapi/compiler/2022.1.0/lib/pkgconfig
2. pkg-config --cflags --libs mkl-*
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Saturday, 10 September 2022, 23:50 GMT
Reason for closing:  No response
Additional comments about closing:  Should be fixed but we didn't get a confirmation from the reporter.
Comment by Vũ Hoàng Hưng (K3ssl3r5yndr0me) - Tuesday, 09 August 2022, 01:32 GMT
I forgot to add this, but the include directory is also incorrect.
/opt/intel/oneapi/compiler/2022.1.0/lib/pkgconfig/../../linux/compiler/include doesn't exist on my system.
Comment by Jacob Xiaoyu Wei (xywei) - Monday, 15 August 2022, 03:52 GMT
I bumped into a possibly related issue: /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_thread.so.2: undefined symbol: omp_get_num_procs, where the .so file of concern is not linked with openmp
ldd /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_thread.so.2
linux-vdso.so.1 => linux-vdso.so.1 (0x00007ffd8bd8e000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007fed2fcbe000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007fed2fcb9000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007fed2c219000)
/usr/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007fed2fd2f000)
Comment by Konstantin Gizdov (kgizdov) - Friday, 26 August 2022, 14:12 GMT
Unfortunately, this is the case even on the official Ubuntu packages. I have managed to correct some of the issues. However, the 'include' directory is missing even on the official packages from Intel itself. For example:
```
$ lsb_release -d
Description: Ubuntu 22.04.1 LTS
$ apt install intel-oneapi-openmp pkg-config
...
$ pkg-config openmp --cflags
-I/opt/intel//oneapi/compiler/latest/lib/pkgconfig/../..//linux/compiler/include
$ ls /opt/intel//oneapi/compiler/latest/lib/pkgconfig/../..//linux/compiler/include
ls: cannot access '/opt/intel//oneapi/compiler/latest/lib/pkgconfig/../..//linux/compiler/include': No such file or directory
$ ls /opt/intel//oneapi/compiler/latest/lib/pkgconfig/../..//linux/compiler/
lib
```
So the top-level directory does exist, but the headers are not provided anywhere. That is an upstream bug, unfortunately.
Comment by Konstantin Gizdov (kgizdov) - Friday, 26 August 2022, 22:51 GMT
Alright, I've made some more extensive changes - could you try again and see if the issue is resolved?
Comment by Konstantin Gizdov (kgizdov) - Sunday, 04 September 2022, 21:43 GMT
is this still an issue?

Loading...