negativo17 / blender

3D modeling, animation, rendering and post-production
3 stars 2 forks source link

blender-4.0 on EPEL-9 needs libMaterialX added to requires/provides exclusion lists #9

Closed ianwestc9 closed 7 months ago

ianwestc9 commented 8 months ago

On EL9, I noticed that blender's Negativo-compiled RPM requires libraries that are included in the RPM itself. Error: Problem: conflicting requests

scaronni commented 8 months ago

Thanks for reporting and thanks for the patch!

I was looking at the RPM, that library is not filtered because it's provided by the package itself (on Fedora):

$ rpm -qp --requires blender-4.0.2-1.fc39.x86_64.rpm | grep libMaterial
libMaterialXCore.so.1()(64bit)
libMaterialXFormat.so.1()(64bit)
libMaterialXGenGlsl.so.1()(64bit)
libMaterialXGenMdl.so.1()(64bit)
libMaterialXGenOsl.so.1()(64bit)
libMaterialXGenShader.so.1()(64bit)
libMaterialXRender.so.1()(64bit)
libMaterialXRenderGlsl.so.1()(64bit)
libMaterialXRenderHw.so.1()(64bit)
libMaterialXRenderOsl.so.1()(64bit)
$ rpm -qp --provides blender-4.0.2-1.fc39.x86_64.rpm | grep libMaterial
libMaterialXCore.so.1()(64bit)
libMaterialXFormat.so.1()(64bit)
libMaterialXGenGlsl.so.1()(64bit)
libMaterialXGenMdl.so.1()(64bit)
libMaterialXGenOsl.so.1()(64bit)
libMaterialXGenShader.so.1()(64bit)
libMaterialXRender.so.1()(64bit)
libMaterialXRenderGlsl.so.1()(64bit)
libMaterialXRenderHw.so.1()(64bit)
libMaterialXRenderOsl.so.1()(64bit)

And probably this is because recent Fedora versions check for libraries that also have non-proper permissions while building, while EL9 does not. In fact inside the RPM, even on Fedora, the libraries are not with the correct permissions (644 instead of 755):

$ rpm -qpvl blender-4.0.2-1.fc39.x86_64.rpm | grep -E "libMaterial.*.so.1.38.*"
lrwxrwxrwx    1 root     root                       26 Dec  5 09:48 /usr/lib64/blender/lib/libMaterialXCore.so.1 -> libMaterialXCore.so.1.38.6
-rw-r--r--    1 root     root                  1226608 Sep 27  2023 /usr/lib64/blender/lib/libMaterialXCore.so.1.38.6
lrwxrwxrwx    1 root     root                       28 Dec  5 09:48 /usr/lib64/blender/lib/libMaterialXFormat.so.1 -> libMaterialXFormat.so.1.38.6
-rw-r--r--    1 root     root                   405640 Sep 27  2023 /usr/lib64/blender/lib/libMaterialXFormat.so.1.38.6
lrwxrwxrwx    1 root     root                       29 Dec  5 09:48 /usr/lib64/blender/lib/libMaterialXGenGlsl.so.1 -> libMaterialXGenGlsl.so.1.38.6
-rw-r--r--    1 root     root                   670200 Sep 27  2023 /usr/lib64/blender/lib/libMaterialXGenGlsl.so.1.38.6
lrwxrwxrwx    1 root     root                       28 Dec  5 09:48 /usr/lib64/blender/lib/libMaterialXGenMdl.so.1 -> libMaterialXGenMdl.so.1.38.6
-rw-r--r--    1 root     root                   379320 Sep 27  2023 /usr/lib64/blender/lib/libMaterialXGenMdl.so.1.38.6
lrwxrwxrwx    1 root     root                       28 Dec  5 09:48 /usr/lib64/blender/lib/libMaterialXGenOsl.so.1 -> libMaterialXGenOsl.so.1.38.6
-rw-r--r--    1 root     root                   315976 Sep 27  2023 /usr/lib64/blender/lib/libMaterialXGenOsl.so.1.38.6
lrwxrwxrwx    1 root     root                       31 Dec  5 09:48 /usr/lib64/blender/lib/libMaterialXGenShader.so.1 -> libMaterialXGenShader.so.1.38.6
-rw-r--r--    1 root     root                  1186968 Sep 27  2023 /usr/lib64/blender/lib/libMaterialXGenShader.so.1.38.6
lrwxrwxrwx    1 root     root                       28 Dec  5 09:48 /usr/lib64/blender/lib/libMaterialXRender.so.1 -> libMaterialXRender.so.1.38.6
-rw-r--r--    1 root     root                   694008 Sep 27  2023 /usr/lib64/blender/lib/libMaterialXRender.so.1.38.6
lrwxrwxrwx    1 root     root                       32 Dec  5 09:48 /usr/lib64/blender/lib/libMaterialXRenderGlsl.so.1 -> libMaterialXRenderGlsl.so.1.38.6
-rw-r--r--    1 root     root                   643072 Sep 27  2023 /usr/lib64/blender/lib/libMaterialXRenderGlsl.so.1.38.6
lrwxrwxrwx    1 root     root                       30 Dec  5 09:48 /usr/lib64/blender/lib/libMaterialXRenderHw.so.1 -> libMaterialXRenderHw.so.1.38.6
-rw-r--r--    1 root     root                    24512 Sep 27  2023 /usr/lib64/blender/lib/libMaterialXRenderHw.so.1.38.6
lrwxrwxrwx    1 root     root                       31 Dec  5 09:48 /usr/lib64/blender/lib/libMaterialXRenderOsl.so.1 -> libMaterialXRenderOsl.so.1.38.6
-rw-r--r--    1 root     root                   105096 Sep 27  2023 /usr/lib64/blender/lib/libMaterialXRenderOsl.so.1.38.6
scaronni commented 8 months ago

So the proper fix is to make sure all the libraries inside the package have the proper permission before the RPM is assembled. Some other libraries might have the same issue in the future.

I'll push Blender 4.1 with the fix today.

Thanks!

scaronni commented 8 months ago

The list of libraries in the exclude list should only contain libraries that are provided by other packages as well. For example, if boost is not filtered, another package requiring boost might accidentally pull in Blender as a dependency and failing. If the libraries are unique to the package (as in the case of libMaterial) , they should not be filtered.

scaronni commented 8 months ago

https://github.com/negativo17/blender/commit/eb73488c8e842ee9de635e0911b1696e9deb7936

scaronni commented 7 months ago

There's another one though, which is support for AMD's ROCm:

# dnf install blender
Last metadata expiration check: 0:00:15 ago on Tue 16 Apr 2024 01:39:08 PM CEST.
Error: 
 Problem: cannot install the best candidate for the job
  - nothing provides libamdhip64.so.6()(64bit) needed by blender-2:4.1.0-1.el9.x86_64 from epel-multimedia
  - nothing provides libamdhip64.so.6(hip_4.2)(64bit) needed by blender-2:4.1.0-1.el9.x86_64 from epel-multimedia
  - nothing provides libamdhip64.so.6(hip_4.3)(64bit) needed by blender-2:4.1.0-1.el9.x86_64 from epel-multimedia
  - nothing provides libamdhip64.so.6(hip_5.1)(64bit) needed by blender-2:4.1.0-1.el9.x86_64 from epel-multimedia
  - nothing provides libamdhip64.so.6(hip_6.0)(64bit) needed by blender-2:4.1.0-1.el9.x86_64 from epel-multimedia
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)