Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on rpmbuild -ba amdgpu-pro-opencl.spec / Fedora 35 #12

Open
feikede opened this issue Jan 9, 2022 · 3 comments
Open

Error on rpmbuild -ba amdgpu-pro-opencl.spec / Fedora 35 #12

feikede opened this issue Jan 9, 2022 · 3 comments

Comments

@feikede
Copy link

feikede commented Jan 9, 2022

Thanks for your work! Unfortunately I get an error while building the rpm:

ERROR 0002: file '/usr/lib64/amdgpu-pro-opencl/libamdocl64.so' contains an invalid '/opt/amdgpu-pro/lib/x86_64-linux-gnu' in [/opt/amdgpu-pro/lib/x86_64-linux-gnu]

Any hints for me?

@feikede
Copy link
Author

feikede commented Jan 9, 2022

Was able to build rpm with https://drivers.amd.com/drivers/linux/amdgpu-pro-21.30-1290604-ubuntu-20.04.tar.xz and the following diff in specs:

diff --git a/amdgpu-pro-opencl.spec b/amdgpu-pro-opencl.spec
index 775c863..ca451d6 100644
--- a/amdgpu-pro-opencl.spec
+++ b/amdgpu-pro-opencl.spec
@@ -17,12 +17,13 @@
 # Therefore it's illegal to distribute the .src.rpm or .rpm files to third
 # parties.
 
-%global major 20.45
-%global minor 1188099
+
+%global major 21.30
+%global minor 1290604
 %global distro ubuntu-20.04
 
 # Version of downstream libdrm-amdgpu package
-%global amdver 2.4.100
+%global amdver 2.4.106
 
 # RPM flags
 %global debug_package %{nil}
@@ -54,14 +55,14 @@ ar x opencl-rocr-amdgpu-pro_%{major}-%{minor}_amd64.deb
 tar -xJC files -f data.tar.xz
 ar x rocm-device-libs-amdgpu-pro_1.0.0-%{minor}_amd64.deb
 tar -xJC files -f data.tar.xz
-ar x hsa-runtime-rocr-amdgpu_1.2.0-%{minor}_amd64.deb
+ar x hsa-runtime-rocr-amdgpu_1.3.0-%{minor}_amd64.deb
 tar -xJC files -f data.tar.xz
 ar x hsakmt-roct-amdgpu_1.0.9-%{minor}_amd64.deb
 tar -xJC files -f data.tar.xz
 ar x hip-rocr-amdgpu-pro_%{major}-%{minor}_amd64.deb
 tar -xJC files -f data.tar.xz
 #comgr
-ar x comgr-amdgpu-pro_1.7.0-%{minor}_amd64.deb
+ar x comgr-amdgpu-pro_2.1.0-%{minor}_amd64.deb
 tar -xJC files -f data.tar.xz
 # This one is probably unneeded for most users, but you never know.
 ar x opencl-rocr-amdgpu-pro-dev_%{major}-%{minor}_amd64.deb

@feikede
Copy link
Author

feikede commented Jan 9, 2022

Can confirm amdgpu pro works now:

[rainer@cslbox amdgpu-pro-opencl]$ amdgporun clinfo
Number of platforms                               1
  Platform Name                                   AMD Accelerated Parallel Processing
  Platform Vendor                                 Advanced Micro Devices, Inc.
  Platform Version                                OpenCL 2.1 AMD-APP (3302.5)
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd cl_amd_event_callback cl_amd_offline_devices 
  Platform Extensions function suffix             AMD
  Platform Host timer resolution                  1ns

  Platform Name                                   AMD Accelerated Parallel Processing
Number of devices                                 1
  Device Name                                     Ellesmere
  Device Vendor                                   Advanced Micro Devices, Inc.
  Device Vendor ID                                0x1002
  Device Version                                  OpenCL 2.0 AMD-APP (3302.5)
  Driver Version                                  3302.5 (PAL,HSAIL)
  Device OpenCL C Version                         OpenCL C 2.0 
  Device Type                                     GPU
  Device Board Name (AMD)                         AMD Radeon RX 570 Series

For Fedora 35 / Gnome 41 with kernel 5.15:

System:    Host: cslbox Kernel: 5.15.12-200.fc35.x86_64 x86_64 bits: 64 Desktop: GNOME 41.2
           Distro: Fedora release 35 (Thirty Five)
Machine:   Type: Desktop System: CSL- & KG product: A0000001 v: 1.0 serial: <superuser required>
           Mobo: Micro-Star model: MPG X570 GAMING EDGE WIFI (MS-7C37) v: 1.0 serial: <superuser required>
           UEFI: American Megatrends v: 1.40 date: 09/10/2019
CPU:       Info: 8-Core model: AMD Ryzen 7 3700X bits: 64 type: MT MCP cache: L2: 4 MiB
           Speed: 3600 MHz min/max: N/A Core speeds (MHz): 1: 3600 2: 3600 3: 3600 4: 3600 5: 3711 6: 3600 7: 3600 8: 3600
           9: 3600 10: 3600 11: 3600 12: 3600 13: 3600 14: 3600 15: 3600 16: 3600
Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] driver: amdgpu
           v: kernel
           Device-2: Logitech Webcam C270 type: USB driver: snd-usb-audio,uvcvideo
           Display: wayland server: X.Org 1.21.1.4 driver: loaded: amdgpu note: n/a (using device driver) - try sudo/root
           resolution: 1: 1920x1080~60Hz 2: 1920x1080~60Hz
           OpenGL: renderer: AMD Radeon RX 570 Series (POLARIS10 DRM 3.42.0 5.15.12-200.fc35.x86_64 LLVM 13.0.0)
           v: 4.6 Mesa 21.3.3

@bregeon
Copy link

bregeon commented Jan 15, 2022

To build 20.45, I have used:
QA_RPATHS=$(( 0x0001|0x0010|0x0002 )) rpmbuild -ba amdgpu-pro-opencl.spec
to ignore the rpath warning.

Thanks indeed for this work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants