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

Add modulecmd wrapper to lmod-ohpc for scl-utils dependency? #1346

Closed
ECoulter opened this issue Sep 2, 2021 · 9 comments · Fixed by #1367
Closed

Add modulecmd wrapper to lmod-ohpc for scl-utils dependency? #1346

ECoulter opened this issue Sep 2, 2021 · 9 comments · Fixed by #1367
Milestone

Comments

@ECoulter
Copy link

ECoulter commented Sep 2, 2021

Greetings, All!

I've run into a dependency issue while trying to install Open OnDemand (openondemand.org) with OpenHPC 2.3 on Rocky 8.4, which requires scl-utils, which in turn requires /usr/bin/modulecmd, which is only provided by environment-modules, which then conflicts with lmod-ohpc. (I'd prefer to keep using LMod, of course)

Would it be possible to add a simple wrapper for modulecmd -> lmod to the lmod-ohpc package, similar to this workaround:
hpcugent/Lmod-UGent@47bc1a6
?

In the meantime, planning to see if a temporary switch to env-modules will work, or possibly testing with a local rebuild of the lmod-ohpc package; I'll update here as we go.

Cheers,
Eric C.

@sjpb
Copy link

sjpb commented Oct 14, 2021

Hi @ECoulter, I've just just hit the same thing ... did you ever get a solution to this please?!

@sjpb
Copy link

sjpb commented Oct 14, 2021

Error for posterity:

Depsolve Error occured: 
 Problem: package scl-utils-1:2.0.2-13.el8.x86_64 requires /usr/bin/modulecmd, but none of the providers can be installed
  - package lmod-ohpc-8.2.10-15.1.ohpc.2.0.x86_64 obsoletes environment-modules provided by environment-modules-4.5.2-1.el8.x86_64
  - problem with installed package lmod-ohpc-8.2.10-15.1.ohpc.2.0.x86_64
  - installed package lmod-ohpc-8.2.10-15.1.ohpc.2.0.x86_64 obsoletes environment-modules provided by environment-modules-4.5.2-1.el8.x86_64
  - package ondemand-runtime-2.0-1.el8.x86_64 requires scl-utils, but none of the providers can be installed
  - package ondemand-2.0.18-1.el8.x86_64 requires ondemand-runtime >= 2.0-1, but none of the providers can be installed
  - package ondemand-2.0.18-1.el8.x86_64 requires ondemand-runtime < 2.1, but none of the providers can be installed
  - package ondemand-2.0.18-1.el8.x86_64 requires ondemand-runtime < 3.0, but none of the providers can be installed
  - cannot install the best candidate for the job

@adrianreber
Copy link
Member

I think the workaround mentioned in the first comment would be a good idea for OpenHPC. If anyone can provide a patch that would be great.

@sjpb
Copy link

sjpb commented Oct 14, 2021

I'm afraid I don't understand packaging enough to understand the patch! I may have a go locally and if I can educate myself, do that.

@ECoulter
Copy link
Author

Ah this is good motivation. I'll block out some time and see if I can get a patch working & pull request submitted.
I'd been wanting to, but knowing more folks are interested helps a lot.

@sjpb
Copy link

sjpb commented Oct 14, 2021

I've got a cluster up I can test a patch on. Having tried some other things I've currently just rebuilt the rpm having commented out Obsoletes: environment-modules .. which at least got the openondemand role to complete and allowed me to work on understanding other bits, but isn't really a solution 😆. I'm sure you're ahead of that but if you want my notes from that rebuild process let me know.

@ECoulter
Copy link
Author

ECoulter commented Oct 14, 2021

In my local test virtual cluster, I've got an lmod-ohpc rpm built with the following diff to add a symlink for modulecmd - not tested fully, but I think it's a better solution than a wrapper script - at least dnf is satisfied with the change. Also need to figure out how to get a pull request in against the correct branch... next week!


Author: Eric Coulter jecoulte@iu.edu
Date: Thu Oct 14 16:15:53 2021 -0400

Added a softlink for modulecmd

Adds a softlink from the lmod binary to /usr/bin/modulecmd
which is required by scl-utils, among other things.

Signed-off-by: Eric Coulter <jecoulte@iu.edu>

diff --git a/components/admin/lmod/SPECS/lmod.spec b/components/admin/lmod/SPECS/lmod.spec
index 13eef12ab..5fabd33d9 100644
--- a/components/admin/lmod/SPECS/lmod.spec
+++ b/components/admin/lmod/SPECS/lmod.spec
@@ -182,6 +182,12 @@ EOF

%{__mkdir_p} ${RPM_BUILD_ROOT}/%{_docdir}

+#install a modulecmd soft link
+# to allow use of scl-utils, among other dependencies
+%{__mkdir_p} %{buildroot}/%{_bindir}
+
+%{__ln_s} %{OHPC_ADMIN}/lmod/lmod/libexec/lmod %{buildroot}/%{_bindir}/modulecmd
+
%files
%dir %{OHPC_HOME}
%dir %{OHPC_ADMIN}
@@ -190,3 +196,4 @@ EOF
%config %{_sysconfdir}/profile.d/lmod.csh
%{OHPC_PUB}
%doc License README.md README_lua_modulefiles.txt INSTALL
+%{_bindir}/modulecmd

@sjpb
Copy link

sjpb commented Oct 15, 2021

Thanks! Works for me, in that after building/installing an RPM with it I can install openhpc v2 with lmod-ohpc-dependement packages, and then install scl-utils.x86_64 1:2.0.2-13.el8 @appstream.

@koomie koomie added this to the 2.4 milestone Nov 4, 2021
@koomie
Copy link
Contributor

koomie commented Nov 4, 2021

Thanks you for the the testing on this and PR.

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

Successfully merging a pull request may close this issue.

4 participants