Bug 1192675 - opencl: cannot open file '/usr/lib64/clc//polaris11-amdgcn-mesa-mesa3d.bc': No such file or directory
opencl: cannot open file '/usr/lib64/clc//polaris11-amdgcn-mesa-mesa3d.bc': N...
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Distribution
Classification: openSUSE
Component: X.Org
Leap 15.3
Other Other
: P3 - Medium : Normal (vote)
: ---
Assigned To: Gfx Bugs
Gfx Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-11-14 15:51 UTC by Matwey Kornilov
Modified: 2022-11-22 14:09 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matwey Kornilov 2021-11-14 15:51:08 UTC
Hello,

I am using

01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Lexa PRO [Radeon 540/540X/550/550X / RX 540X/550/550X] (rev c7)

and the following software:

Mesa-20.2.4-57.13.x86_64
Mesa-libOpenCL-20.2.4-57.12.x86_64
libclc-0.2.0+llvm11.0.1-bp153.1.2.noarch
kernel-default-5.3.18-59.27.1.x86_64
clinfo-2.2.18.04.06-bp153.1.14.x86_64


When I run clinfo, I see the following:

Number of platforms                               1
  Platform Name                                   Clover
  Platform Vendor                                 Mesa
  Platform Version                                OpenCL 1.1 Mesa 20.2.4
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd
  Platform Extensions function suffix             MESA

  Platform Name                                   Clover
Number of devices                                 1
  Device Name                                     Radeon RX550/550 Series (POLARIS12, DRM 3.39.0, 5.3.18-59.27-default, LLVM 11.0.1)
  Device Vendor                                   AMD
  Device Vendor ID                                0x1002
  Device Version                                  OpenCL 1.1 Mesa 20.2.4
  Driver Version                                  20.2.4
  Device OpenCL C Version                         OpenCL C 1.1
  Device Type                                     GPU
  Device Profile                                  FULL_PROFILE
  Device Available                                Yes
  Compiler Available                              Yes
  Max compute units                               8
  Max clock frequency                             1183MHz
  Max work item dimensions                        3
  Max work item sizes                             256x256x256
  Max work group size                             256
=== CL_PROGRAM_BUILD_LOG ===
fatal error: cannot open file '/usr/lib64/clc//polaris11-amdgcn-mesa-mesa3d.bc': No such file or directory


While I expect the OpenCL to be working correctly. It seems that there is wrongly hard-coded path somewhere,  because the requested file is located at the different place in my system:

> rpm -q -f /usr/share/clc/polaris11-amdgcn-mesa-mesa3d.bc
libclc-0.2.0+llvm11.0.1-bp153.1.2.noarch
Comment 1 Stefan Dirsch 2021-11-14 18:46:09 UTC
Thanks. Does it help to add a compatibily link?

  sudo ln -s /usr/share/clc /usr/lib64/clc
Comment 2 Matwey Kornilov 2021-11-14 18:52:10 UTC
Yes, it helps. clinfo and clpeak works as expected.
Comment 3 Stefan Dirsch 2021-11-14 21:16:47 UTC
Thanks. Should be fixed now.

https://build.opensuse.org/request/show/931436

Looks like this got broken with

-------------------------------------------------------------------
Fri Oct 30 15:33:35 UTC 2020 - Aaron Puchert <aaronpuchert@alice-dsl.net>

- Update to version 0.2.0+llvm11.0.0.
[...]
- The library files have moved from %{_libdir} to %{_datadir}.
- Make noarch: the bitcode files don't depend on the host CPU.

So since more than a year ...
Comment 4 Matwey Kornilov 2021-11-14 21:20:28 UTC
Could you please also make maintenance update for Leap 15.3?
Comment 5 Stefan Dirsch 2021-11-14 21:25:46 UTC
libclc on Leap 15.3 is not affected by this issue.
Comment 6 Matwey Kornilov 2021-11-14 21:26:37 UTC
No, it is. I am facing this issue on Leap 15.3 right now.
Comment 7 Stefan Dirsch 2021-11-14 21:37:27 UTC
I don't understand this. Latest changelog on Leap 15.3 is

Fri Oct 12 01:55:46 UTC 2018 - jimmy@boombatower.com

- Update to version 0.2.0+git.20180915:

Also there /usr/lib64/clc is still being used.

%files
[...]
%{_libdir}/clc

Maybe you're using packages from X11:XOrg project? But this is now fixed. It's the devel project for Factory/Tumbleweed.
Comment 8 Matwey Kornilov 2021-11-14 21:47:28 UTC
I use the package provided by the distro:

> rpm -q -f /usr/share/clc/polaris11-amdgcn-mesa-mesa3d.bc --info
Name        : libclc
Version     : 0.2.0+llvm11.0.1
Release     : bp153.1.2
Architecture: noarch
Install Date: Вс 14 ноя 2021 16:33:19
Group       : Development/Libraries/C and C++
Size        : 74525857
License     : (BSD-3-Clause OR MIT) AND Apache-2.0 WITH LLVM-exception
Signature   : RSA/SHA256, Чт 22 апр 2021 11:34:18, Key ID 9c214d4065176565
Source RPM  : libclc-0.2.0+llvm11.0.1-bp153.1.2.src.rpm
Build Date  : Чт 22 апр 2021 11:33:23
Build Host  : old-atreju3
Relocations : (not relocatable)
Packager    : https://bugs.opensuse.org
Vendor      : openSUSE
URL         : https://libclc.llvm.org/
Summary     : OpenCL C programming language library
Description :
Library requirements of the OpenCL C programming language.
Distribution: SUSE Linux Enterprise 15 SP3



> rpm -q -f /usr/share/clc/polaris11-amdgcn-mesa-mesa3d.bc --changes | head
* Сб 09 янв 2021 15:00:00 Aaron Puchert <aaronpuchert@alice-dsl.net>
- Update to version 0.2.0+llvm11.0.1.

* Пт 30 окт 2020 15:00:00 Aaron Puchert <aaronpuchert@alice-dsl.net>
- Update to version 0.2.0+llvm11.0.0.
  The repository that we extracted the tarball from isn't updated
  any longer. So we take the tarballs from LLVM releases instead.
- The build now uses CMake instead of a custom Python script.
- Remove dependencies on gcc, libstdc++-devel, ncurses and zlib.
- The provided package consists of LLVM bitcode files, which are
Comment 10 Stefan Dirsch 2021-11-14 22:22:01 UTC
This is weird. Indeed libclc has been updated for Leap 15.3, but not for SLE15-SP3. This should not happen. Not sure why this has been accepted ...
Comment 12 Stefan Dirsch 2021-11-14 22:39:38 UTC
done

https://build.opensuse.org/request/show/931442
Comment 13 Aaron Puchert 2021-11-15 01:36:19 UTC
(In reply to Stefan Dirsch from comment #3)
> Looks like this got broken with
> 
> -------------------------------------------------------------------
> Fri Oct 30 15:33:35 UTC 2020 - Aaron Puchert <aaronpuchert@alice-dsl.net>
> 
> - Update to version 0.2.0+llvm11.0.0.
> [...]
> - The library files have moved from %{_libdir} to %{_datadir}.
> - Make noarch: the bitcode files don't depend on the host CPU.
> 
> So since more than a year ...

Nothing broken on Tumbleweed for me. The files moved, but that is reflected in the pkgconfig:

$ cat /usr/share/pkgconfig/libclc.pc
includedir=/usr/include
libexecdir=/usr/share/clc

Name: libclc
Description: Library requirements of the OpenCL C programming language
Version: 0.2.0
Cflags: -I${includedir}
Libs: -L${libexecdir}

Mesa picks that up just fine. The problem is probably that Leap's Mesa was still compiled with the older libclc in SLE.

(In reply to Stefan Dirsch from comment #10)
> This is weird. Indeed libclc has been updated for Leap 15.3, but not for
> SLE15-SP3. This should not happen. Not sure why this has been accepted ...
The package was in Backports before I submitted the update. [1] But you're right, I should have tried to get this into SLE, not sure why I didn't consider that. There were some discussions about updating the llvm metapackage in SLE which didn't happen, and so I had to create some overlay packages in Leap to avert version downgrades in Leap 15.3 versus 15.2 (bug 1184920).

Though I don't see a reason to not update libclc, after all Mesa was also starting to use llvm11.

[1] https://build.opensuse.org/package/revisions/openSUSE:Backports:SLE-15-SP3/libclc
Comment 14 Stefan Dirsch 2021-11-15 09:42:55 UTC
Thanks. Understood. I reverted the SR against Factory/Tumbleweed. Mesa should have been rebiult and released as well with the libclc update in Leap 15.3.  Since you're not working at SUSE you cannot submit anything against SLE.  At least we didn't break it there as well. that way;-)
Comment 15 Matwey Kornilov 2021-11-15 09:56:10 UTC
I've just reopened this issue in order not to lost it in the history.
Comment 16 Stefan Dirsch 2021-11-15 10:12:14 UTC
I made a Submit request for Leap 15.3. So once this has been checked in and the update released, things are fixed. If there are issue with the SR and things cannot be fixed as I planned I'll reopen the bugreport.

I can't do more than this. I need to close my bugs once they are addressed from my point. Otherwise I lose any overview over my bugs.
Comment 17 Aaron Puchert 2021-11-15 13:02:50 UTC
(In reply to Matwey Kornilov from comment #15)
> I've just reopened this issue in order not to lost it in the history.
I guess we can't do anything further in the SP3 codeline, but we could try to fix it for SP4. (That is, update libclc in SLE and drop it from Backports.)

I'd suggest to file a new report against Leap 15.4.
Comment 18 Stefan Dirsch 2021-11-15 13:42:47 UTC
libclc and Mesa has been updated for SP4 to current Tumbleweed version and everything will be freshly built. So in SP4 we're fine.
Comment 19 Aaron Puchert 2021-11-15 14:03:28 UTC
(In reply to Stefan Dirsch from comment #18)
> libclc and Mesa has been updated for SP4 to current Tumbleweed version and
> everything will be freshly built. So in SP4 we're fine.
Should we also delete https://build.opensuse.org/package/show/openSUSE:Backports:SLE-15-SP4/libclc then so that SLE and Leap share the same package?
Comment 20 Stefan Dirsch 2021-11-15 14:15:25 UTC
I don't know the meaning of these Backports repos. It's the first time I see these. But yes, we want to have the same package on sle15-sp4 and Leap 15.4!
Comment 21 Aaron Puchert 2021-11-15 14:21:41 UTC
(In reply to Stefan Dirsch from comment #20)
> I don't know the meaning of these Backports repos. It's the first time I see
> these. But yes, we want to have the same package on sle15-sp4 and Leap 15.4!
These are basically the packages that Leap has on top of SLE. Normally they should not have any packages in common, but some overlay packages are there.

We should probably file a delete request for that.
Comment 22 Stefan Dirsch 2021-11-15 14:25:51 UTC
(In reply to Aaron Puchert from comment #21)
> (In reply to Stefan Dirsch from comment #20)
> > I don't know the meaning of these Backports repos. It's the first time I see
> > these. But yes, we want to have the same package on sle15-sp4 and Leap 15.4!
> These are basically the packages that Leap has on top of SLE. Normally they
> should not have any packages in common, but some overlay packages are there.
> 
> We should probably file a delete request for that.

Yes. Please go ahead!
Comment 23 Aaron Puchert 2021-11-15 23:51:58 UTC
Filed delete request https://build.opensuse.org/request/show/931639.
Comment 24 Stefan Dirsch 2021-11-16 10:13:34 UTC
(In reply to Aaron Puchert from comment #23)
> Filed delete request https://build.opensuse.org/request/show/931639.

Thanks!
Comment 25 Swamp Workflow Management 2021-11-22 14:28:59 UTC
openSUSE-RU-2021:1499-1: An update that has one recommended fix can now be installed.

Category: recommended (moderate)
Bug References: 1192675
CVE References: 
JIRA References: 
Sources used:
openSUSE Backports SLE-15-SP3 (src):    libclc-0.2.0+llvm11.0.1-bp153.2.3.1