| Summary: | slurm-devel conflicting with pkgconfig | ||
|---|---|---|---|
| Product: | Slurm | Reporter: | Marc Caubet Serrabou <marc.caubet> |
| Component: | Other | Assignee: | Tim McMullan <mcmullan> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | 4 - Minor Issue | ||
| Priority: | --- | CC: | sts |
| Version: | 20.11.8 | ||
| Hardware: | Linux | ||
| OS: | Linux | ||
| Site: | Paul Scherrer | Alineos Sites: | --- |
| Atos/Eviden Sites: | --- | Confidential Site: | --- |
| Coreweave sites: | --- | Cray Sites: | --- |
| DS9 clusters: | --- | HPCnow Sites: | --- |
| HPE Sites: | --- | IBM Sites: | --- |
| NOAA SIte: | --- | OCF Sites: | --- |
| Recursion Pharma Sites: | --- | SFW Sites: | --- |
| SNIC sites: | --- | Linux Distro: | --- |
| Machine Name: | CLE Version: | ||
| Version Fixed: | 22.05pre1 | Target Release: | --- |
| DevPrio: | --- | Emory-Cloud Sites: | --- |
| Attachments: | Install slurm-devel from fresh Centos7 image | ||
Hi,
any news about it? Looks like the conflict with pkgconfig is still present for the slurm-devel package, even in the latest 20.11 releases (I tested 20.11.7).
Just a comment, the below workaround does not contain all proper changes needed (in example, probably SPEC needs to be adapted also for Cray), but is clear that "%dir %{_libdir}/pkgconfig" should not be there as it will always conflict with pkgconfig.
Cheers,
Marc
Hi, any news about this? I opened this ticket 2 years ago already but it seems it was never checked. This still happens in version 20.11.8 and I just checked and it seems to be present also in 21.08. That's really a small change, but really helps when deploying Slurm through RPMs, otherwise installing slurm-devel packages breaks due to a senseless dependency, and can not be installed i.e. normally through "yum". Cheers, Marc Marc - I do apologize for the miss-routing of this issue. When it was filed originally, the bug was treated as a contribution rather than a bug. I will have our support team look over this and get back to you. As a side note, this issue better fits as a sev 4, so I have adjusted this bug to match. This change will not impact us looking into this issue in a timely manner. Hi Marc, I'm sorry about the long delay in this getting looked at! My quick test of building and installing the slurm rpms on centos7 and 8 (stream) appear to be installing just fine with yum. I can certainly see how it might conflict though, so I'm curious if there is something I'm missing when trying to replicate. Is yum yelling about it for you? If so, at what point does it yell? What OS are you running? Ignoring that it hasn't failed for me yet, I am looking to see if depending on pkgconfig is just the better solution anyway. Thanks -Tim Hi Tim, thanks a lot for taking a look to it. The O.S. is RHEL7, however we compile it directly from the Slurm sources and provide Slurm the RPMs through our own yum repository. In order to fix the conflict problem, every time we compile a new Slurm release we need to patch the slurm.spec file coming from the source packages. I understand that if installing RPMs from the official Centos7 repositories is not causing problems is because they probably also patch or provide their own spec file. And answering your question: yes, yum is complaining. In example (I am using a non-patched compiled version here): [root@merlin-l-001 ~]# yum install slurm-devel Loaded plugins: nvidia, search-disabled-repos Resolving Dependencies --> Running transaction check ---> Package slurm-devel.x86_64 0:20.11.8-1.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ========================================================================================================================================================================= Package Arch Version Repository Size ========================================================================================================================================================================= Installing: slurm-devel x86_64 20.11.8-1.el7 slurm 78 k Transaction Summary ========================================================================================================================================================================= Install 1 Package Total size: 78 k Installed size: 363 k Is this ok [y/d/N]: y Downloading packages: Running transaction check Running transaction test Transaction check error: file /usr/lib64/pkgconfig from install of slurm-devel-20.11.8-1.el7.x86_64 conflicts with file from package pkgconfig-1:0.27.1-4.el7.x86_64 Error Summary ------------- [root@merlin-l-001 ~]# rpm -iv http://linux.web.psi.ch/ext/slurm/20.11.8/slurm-devel-20.11.8-1.el7.x86_64.rpm Retrieving http://linux.web.psi.ch/ext/slurm/20.11.8/slurm-devel-20.11.8-1.el7.x86_64.rpm Preparing packages... file /usr/lib64/pkgconfig from install of slurm-devel-20.11.8-1.el7.x86_64 conflicts with file from package pkgconfig-1:0.27.1-4.el7.x86_64 So the only way for installing it: [root@merlin-l-001 ~]# rpm -iv --force http://linux.web.psi.ch/ext/slurm/20.11.8/slurm-devel-20.11.8-1.el7.x86_64.rpm Retrieving http://linux.web.psi.ch/ext/slurm/20.11.8/slurm-devel-20.11.8-1.el7.x86_64.rpm Preparing packages... slurm-devel-20.11.8-1.el7.x86_64 (In reply to Marc Caubet Serrabou from comment #6) > Hi Tim, > > thanks a lot for taking a look to it. > > The O.S. is RHEL7, however we compile it directly from the Slurm sources and > provide Slurm the RPMs through our own yum repository. In order to fix the > conflict problem, every time we compile a new Slurm release we need to patch > the slurm.spec file coming from the source packages. > > I understand that if installing RPMs from the official Centos7 repositories > is not causing problems is because they probably also patch or provide their > own spec file. I was doing my testing on a centos 7 host, built the RPMs with "rpmbuild -ta", added the rpms to a local rpm repo (literally just made the rpms directory a repo), then yum insalled the slurm packages and yum did not complain the same way it is for you. I'm not sure how what seem to be very similar processes are resulting in such different results. Interestingly enough, the epel slurm packages don't seem to provide the pkgconfig file at all which would certainly avoid the issue. > And answering your question: yes, yum is complaining. In example (I am using > a non-patched compiled version here) Thank you for the further clarification on what you are seeing! --Tim What do you see when unpacking your RPM? [root@merlin-l-001 ~]# rpm2cpio http://linux.web.psi.ch/ext/slurm/20.11.8/slurm-devel-20.11.8-1.el7.x86_64.rpm | cpio -idmv ./usr/include/slurm ./usr/include/slurm/pmi.h ./usr/include/slurm/pmi2.h ./usr/include/slurm/slurm.h ./usr/include/slurm/slurm_errno.h ./usr/include/slurm/slurmdb.h ./usr/include/slurm/smd_ns.h ./usr/include/slurm/spank.h ./usr/lib64/pkgconfig ./usr/lib64/pkgconfig/slurm.pc 729 blocks Is strange that you don't see that, at the end the problem is clearly present, in example at line 556 for the 20.11 branch (https://github.com/SchedMD/slurm/blob/slurm-20.11/slurm.spec) and line 561 for the branch 21.08 (https://github.com/SchedMD/slurm/blob/slurm-21.08/slurm.spec). The solution should be removing that line and adding a Requires dependency in the "%package devel" section (line 202 for v20.11, line 205 for v21.08). In example: %package devel Summary: Development package for Slurm Group: Development/System Requires: %{name}%{?_isa} = %{version}-%{release} Requires: pkgconfig %description devel Development package for Slurm. This package includes the header files and static libraries for the Slurm API Other sections already contain this (in example, when "with cray" / "with cray_network" is enabled, lines 99 and 113 for v20.11). Cheers, Marc (In reply to Marc Caubet Serrabou from comment #8) > What do you see when unpacking your RPM? > > [root@merlin-l-001 ~]# rpm2cpio > http://linux.web.psi.ch/ext/slurm/20.11.8/slurm-devel-20.11.8-1.el7.x86_64. > rpm | cpio -idmv > ./usr/include/slurm > ./usr/include/slurm/pmi.h > ./usr/include/slurm/pmi2.h > ./usr/include/slurm/slurm.h > ./usr/include/slurm/slurm_errno.h > ./usr/include/slurm/slurmdb.h > ./usr/include/slurm/smd_ns.h > ./usr/include/slurm/spank.h > ./usr/lib64/pkgconfig > ./usr/lib64/pkgconfig/slurm.pc > 729 blocks [root@el7slurm-master x86_64]# rpm2cpio ./slurm-devel-20.11.8-1.el7.x86_64.rpm | cpio -idmv ./usr/include/slurm ./usr/include/slurm/pmi.h ./usr/include/slurm/pmi2.h ./usr/include/slurm/slurm.h ./usr/include/slurm/slurm_errno.h ./usr/include/slurm/slurmdb.h ./usr/include/slurm/smd_ns.h ./usr/include/slurm/spank.h ./usr/lib64/pkgconfig ./usr/lib64/pkgconfig/slurm.pc 729 blocks Same exact output. The best guess I've got right now is some sort of permissions conflict? Do you have anything exciting in your rpmmacros file maybe? Mine is totally empty (apart from when I was testing setting a prefix for the slurm install). Just trying to understand the difference at this point. I'm proposing a patch that will remove the "%dir %{_libdir}/pkgconfig" line and should avoid that conflict. Thanks! --Tim Created attachment 23376 [details]
Install slurm-devel from fresh Centos7 image
Hi Tim, my rpmmacros is pretty simple, I just set a different topdir: (base) ❄ [caubet_m@merlin-l-001:/data/user/caubet_m]# cat ~/.rpmmacros %_topdir %(echo /data/user/caubet_m)/rpmbuild I have setup a fresh container image based on Centos7 and installed the package to see whether it had something to with Centos7 vs RHEL7. As I was expecting, it has the same behavior (see attached singularity.log). Since your slurm-devel file contains the affected line (./usr/lib64/pkgconfig), as long as you have pkgconfig package installed I understand that the error should pop up. For curiosity, did you fully installed slurm-devel? The error only appears when installation starts (alias one needs to press [y] in yum or just "rpm -i" with rpm). Thanks for proposing that change, that would help a lot and is an easy fix. I would strongly recommend adding a "Requires: pkgconfig" for slurm-devel, since slurm-devel contains a file which has to be placed in /usr/lib64/pkgconfig. However, I would expect that in general such systems will contain pkgconfig in general, but I do not have the full overview of all distros and O.S. supported by Slurm. Thanks a lot for your help, Marc (In reply to Marc Caubet Serrabou from comment #12) > Hi Tim, > > my rpmmacros is pretty simple, I just set a different topdir: > > (base) ❄ [caubet_m@merlin-l-001:/data/user/caubet_m]# cat ~/.rpmmacros > %_topdir %(echo /data/user/caubet_m)/rpmbuild > > I have setup a fresh container image based on Centos7 and installed the > package to see whether it had something to with Centos7 vs RHEL7. As I was > expecting, it has the same behavior (see attached singularity.log). Thank you for the additional information! > Since your slurm-devel file contains the affected line > (./usr/lib64/pkgconfig), as long as you have pkgconfig package installed I > understand that the error should pop up. For curiosity, did you fully > installed slurm-devel? The error only appears when installation starts > (alias one needs to press [y] in yum or just "rpm -i" with rpm). pkgconfig is definitely installed, I fully installed slurm and slurm-devel, and double checked that the files appeared where they should. I might just blow this VM away and try again. > Thanks for proposing that change, that would help a lot and is an easy fix. > I would strongly recommend adding a "Requires: pkgconfig" for slurm-devel, > since slurm-devel contains a file which has to be placed in > /usr/lib64/pkgconfig. However, I would expect that in general such systems > will contain pkgconfig in general, but I do not have the full overview of > all distros and O.S. supported by Slurm. Some good news: that change has been pushed into master, so starting with 22.05 this shouldn't be an issue for you (https://github.com/SchedMD/slurm/commit/c52ea49). In this case, I did opt not to depend on pkgconfig. I do understand that this might not be ideal... but since we can change the installation directory of slurm (as well as the slurm.pc file), depending on pkgconfig isn't enough to guarantee that the directory exists. However, even without "%dir %{_libdir}/pkgconfig" the appropriate directory gets created if it doesn't exist. There is also a *potential* issue where some distributions are moving to the "pkgconf" package instead of "pkgconfig". I've opened a separate issue where I'll be figuring out if that is something we need to address, but I don't want that discussion to block fixing this :) > Thanks a lot for your help, > Marc Thank you for all your help on this, and for your patience regarding getting it resolved! Let me know if you have any other questions or concerns about this! --Tim (In reply to Tim McMullan from comment #14) > (In reply to Marc Caubet Serrabou from comment #12) Hi Tim, > pkgconfig is definitely installed, I fully installed slurm and slurm-devel, > and double checked that the files appeared where they should. I might just > blow this VM away and try again. Yes that's weird really. I tried also with a VM and I have the same problem. > Some good news: that change has been pushed into master, so starting with > 22.05 this shouldn't be an issue for you > (https://github.com/SchedMD/slurm/commit/c52ea49). Cool! This will be very helpful! Thanks a lot for moving this :) > In this case, I did opt not to depend on pkgconfig. I do understand that > this might not be ideal... but since we can change the installation > directory of slurm (as well as the slurm.pc file), depending on pkgconfig > isn't enough to guarantee that the directory exists. However, even without > "%dir %{_libdir}/pkgconfig" the appropriate directory gets created if it > doesn't exist. > > There is also a *potential* issue where some distributions are moving to the > "pkgconf" package instead of "pkgconfig". I've opened a separate issue > where I'll be figuring out if that is something we need to address, but I > don't want that discussion to block fixing this :) Yes, you are right, some distros changed that. > > Thank you for all your help on this, and for your patience regarding getting > it resolved! > > Let me know if you have any other questions or concerns about this! > --Tim Having this from 22.05 will be ok, in the meantime I will keep patching for the v21 releases. Therefore, ticket can be closed if necessary. Thanks a lot for your help, Marc Thanks Marc, sounds good! I'll resolve this for now, but please let us know if you have any other issues! Thanks again! --Tim |
When installing the slurm-devel package it conflicts with pkgconfig. Proposed change: (base) [caubet_m@merlin-l-001 Compile]$ diff slurm-19.05.5/slurm.spec.orig slurm-19.05.5/slurm.spec 196c196 < Requires: %{name}%{?_isa} = %{version}-%{release} --- > Requires: %{name}%{?_isa} = %{version}-%{release} pkgconfig 524d523 < %dir %{_libdir}/pkgconfig It forces the slurm-devel to depend on pkgconfig (so it ensures that the proper directory exists) and remove the existing line '%dir %{_libdir}/pkgconfig'. Cheers, Marc