Bug 2292427

Summary: libamd_comgr.so.2 references an unreachable file
Product: [Fedora] Fedora Reporter: Nils Philippsen <nphilipp>
Component: rocm-compilersupportAssignee: Jeremy Newton <alexjnewt>
Status: CLOSED ERRATA QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 40CC: alexjnewt, dominik, nphilipp, rocm-packagers-sig
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rocm-compilersupport-17.3-6.rocm6.1.2.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2292379 Environment:
Last Closed: 2024-10-06 02:11:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2292870    
Bug Blocks:    

Description Nils Philippsen 2024-06-14 17:30:52 UTC
The library libamd_comgr.so references a path which doesn’t exist and prints errors about it:

--- 8< ---
nils@gibbon:~> strings /usr/lib64/libamd_comgr.so.2 | grep opencl-c-base
/usr/lib64/llvm17/bin/../../../lib/clang/17/include/opencl-c-base.h
/usr/lib64/llvm17/bin/../../../lib/clang/17/include/opencl-c-base.h
/usr/lib64/llvm17/bin/../../../lib/clang/17/include/opencl-c-base.h
/usr/lib64/llvm17/bin/../../../lib/clang/17/include/opencl-c-base.h
--- >8 ---

See the original gimp3 bug:

+++ This bug was initially created as a clone of Bug #2292379 +++

Description of problem:
When running gimp3 from terminal, I get many "file not found" errors which seem to be non-fatal.

Version-Release number of selected component (if applicable):
gimp3-2.99.18-5.fc40.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. dnf install gimp3-2.99.18-5.fc40.x86_64
2. Run gimp-2.99 in a terminal

Actual results:
gimp-user-install: migrating from /home/rathann/.config/GIMP/2.10
This is a development version of GIMP.  Debug messages may appear here.

GEGL-WARNING: build program failure
fatal error: malformed or corrupted AST file: 'could not find file '/usr/lib64/llvm17/bin/../../../lib/clang/17/include/opencl-c-base.h' referenced by AST file '/tmp/comgr-b190a8/include/opencl1.2-c.pch''
1 error generated.
Error: Failed to compile source (from CL or HIP source to LLVM IR).



GEGL-WARNING: OpenCL Failed to compile color conversions (float_kernels)

Application icon missing: /usr/share/icons/hicolor/64x64/apps/gimp.png (Failed to open file “/usr/share/icons/hicolor/64x64/apps/gimp.png”: No such file or directory)
Application icon missing: /usr/share/icons/hicolor/scalable/apps/gimp.svg (Failed to open file “/usr/share/icons/hicolor/scalable/apps/gimp.svg”: No such file or directory)
GIMP-Message: Some fonts failed to load:
- /usr/share/gimp/2.99/fonts/

gimp_font_factory_load_names: 75 unsupported fonts were ignored. Set the GIMP_DEBUG_FONTS environment variable for a listing.
set device 'Virtual core XTEST pointer' to mode: disabled
set device 'Logitech M325' to mode: disabled
set device 'Logitech K520' to mode: disabled
GIMP-WARNING: gimp-2.99: gimp_wire_read(): error

INFO: not existing action 'windows-display-0010' was ignored from the shortcutsrc file.
[rathann@amaterasu ~]$ 
[rathann@amaterasu ~]$ 
[rathann@amaterasu ~]$ gimp-2.99
gimp-user-install: migrating from /home/rathann/.config/GIMP/2.10
This is a development version of GIMP.  Debug messages may appear here.

GEGL-WARNING: build program failure
fatal error: malformed or corrupted AST file: 'could not find file '/usr/lib64/llvm17/bin/../../../lib/clang/17/include/opencl-c-base.h' referenced by AST file '/tmp/comgr-b190a8/include/opencl1.2-c.pch''
1 error generated.
Error: Failed to compile source (from CL or HIP source to LLVM IR).



GEGL-WARNING: OpenCL Failed to compile color conversions (float_kernels)

Application icon missing: /usr/share/icons/hicolor/64x64/apps/gimp.png (Failed to open file “/usr/share/icons/hicolor/64x64/apps/gimp.png”: No such file or directory)
Application icon missing: /usr/share/icons/hicolor/scalable/apps/gimp.svg (Failed to open file “/usr/share/icons/hicolor/scalable/apps/gimp.svg”: No such file or directory)
GIMP-Message: Some fonts failed to load:
- /usr/share/gimp/2.99/fonts/

gimp_font_factory_load_names: 75 unsupported fonts were ignored. Set the GIMP_DEBUG_FONTS environment variable for a listing.
set device 'Virtual core XTEST pointer' to mode: disabled
set device 'Logitech M325' to mode: disabled
set device 'Logitech K520' to mode: disabled
GIMP-WARNING: gimp-2.99: gimp_wire_read(): error

INFO: not existing action 'windows-display-0010' was ignored from the shortcutsrc file.

Expected results:
No errors about missing files.

Additional info:
This error is I think easily fixable:
GEGL-WARNING: build program failure
fatal error: malformed or corrupted AST file: 'could not find file '/usr/lib64/llvm17/bin/../../../lib/clang/17/include/opencl-c-base.h' referenced by AST file '/tmp/comgr-b190a8/include/opencl1.2-c.pch''
1 error generated.
Error: Failed to compile source (from CL or HIP source to LLVM IR).

The file exists as:
/usr/lib/clang/17/include/opencl-c-base.h
but the path above doesn't, because /usr/lib64/llvm17/bin doesn't:
$ ls -l /usr/lib64/llvm17/bin
ls: cannot access '/usr/lib64/llvm17/bin': No such file or directory

After manually creating it, the error disappears. However, I think the path should be fixed instead to avoid parent directory relative references.

Comment 1 Jeremy Newton 2024-07-04 16:51:06 UTC
Yeah there's a bug in the 6.0 packages, we're going to update to 6.1, so it should resolve the issue.

Comment 2 Jeremy Newton 2024-07-04 16:51:06 UTC
Yeah there's a bug in the 6.0 packages, we're going to update to 6.1, so it should resolve the issue.

Comment 3 Fedora Update System 2024-07-12 00:58:58 UTC
FEDORA-2024-2a06d36b71 (hipblas-6.1.1-1.fc40, hipcub-6.1.1-2.fc40, and 24 more) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-2a06d36b71

Comment 4 Fedora Update System 2024-07-13 03:05:10 UTC
FEDORA-2024-2a06d36b71 has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-2a06d36b71`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-2a06d36b71

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Dominik 'Rathann' Mierzejewski 2024-07-16 08:26:22 UTC
The above update does not fix this bug:

$ strings /usr/lib64/libamd_comgr.so.2 | grep opencl-c-base
/usr/lib64/llvm17/bin/../../../lib/clang/17/include/opencl-c-base.h
/usr/lib64/llvm17/bin/../../../lib/clang/17/include/opencl-c-base.h
/usr/lib64/llvm17/bin/../../../lib/clang/17/include/opencl-c-base.h
/usr/lib64/llvm17/bin/../../../lib/clang/17/include/opencl-c-base.h
$ ls -l /usr/lib64/llvm17/bin/../../../lib/clang/17/include/opencl-c-base.h
ls: cannot access '/usr/lib64/llvm17/bin/../../../lib/clang/17/include/opencl-c-base.h': No such file or directory
$ rpm -qf /usr/lib64/libamd_comgr.so.2 
rocm-comgr-17.3-4.rocm6.1.2.fc40.x86_64

Comment 6 Jeremy Newton 2024-07-28 03:34:31 UTC
Moving back to assigned, I need to reproduce

Comment 7 Jeremy Newton 2024-09-27 21:53:36 UTC
Yeah I'm still puzzled over this. I have no idea where it's being picked up.

We put this in:
https://src.fedoraproject.org/rpms/rocm-compilersupport/blob/f40/f/rocm-compilersupport.spec#_158

But it's still getting generated somewhere.

I noticed that in 6.2, it actually sets the path to:
/usr/bin/../lib/clang/17/include/opencl-c-base.h

Which is still weird but /usr/bin does exist at least. I'll need to do a git bisect and see what changed between 6.1 and 6.2.

Comment 8 Jeremy Newton 2024-09-27 22:23:02 UTC
Ok I see the issue now. Looks like we're actually getting this path from clang's cmake logic itself. Furthermore, it looks like the clang17-resource-filesystem package has a bug and doesn't own the missing directory, so it doesn't exist. To be clear, nothing seems to own this directory.

It looks like they have a fix coming down the pipe, but I'm not sure how long it will take because it seems they're consumed by upgrading f41 and f42 to llvm 19, and the latest clang17 builds are failing on f40.
I'll push a workaround for now by pulling in clang17 as a dependency for rocm-comgr. It's not great, but it at least fixes a bug that's been unfixed for 3.5 months now.

Comment 9 Fedora Update System 2024-09-27 22:38:20 UTC
FEDORA-2024-1b43e5339b (rocm-compilersupport-17.3-6.rocm6.1.2.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-1b43e5339b

Comment 10 Fedora Update System 2024-09-28 02:34:20 UTC
FEDORA-2024-1b43e5339b has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-1b43e5339b`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-1b43e5339b

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2024-10-06 02:11:36 UTC
FEDORA-2024-1b43e5339b (rocm-compilersupport-17.3-6.rocm6.1.2.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.