I am trying to use O2 software on MacOS Catalina 10.15.6 and I have several builds installed. All worked for me before, but now when I tried to use command ‘alienv enter O2/latest-dev-o2’ (or any other tag), I get an error message ’ ERROR: O2/latest-dev-o2 was not found’. Also, when I try to enter ‘alienv q’, it is not finding anything. However, I can see all the builds in ‘~/alice/sw/BUILD/’. Could anyone help me with this?
Hi,
I have managed to solve this issue yesterday.
It turns out that alienv q uses brew -t avail to list all installed modules.
Next, it pipes stderr to stdout, so instead of crashing, it just pipes the error message to the next step (this will become important later).
This masked the underlying problem, which was caused by modulecmd which is used to access all available O2 packages.
For some reason, I assume during migration from v3 to v4, as per commit https://github.com/alisw/alibuild/commit/ca5754cc83918974fdd15599eac0e5fa5e082510, the command is expected to be modulecmd-compat.
Presumably, in my case, easy_install pip updates Homebrew as well, which regenerated files in libexec directory, where modulecmd-compat used to reside, and was removed after the update.
This causes modulecmd to fail via the file simply not existing.
Since stderr is being piped to stdout and not treated as a proper error, grep down the pipeline can’t find anything that would resemble O2 modules, and simply prints nothing, thus hiding the real error.
A quick patch for this was to create a symlink named modulecmd-compat targeting /usr/local/Cellar/modules/4.6.0/libexec/modulecmd.tcl in the same location as modulecmd.tcl.
This looks like a botched alienv migration to module4… :-/ I think now we are modules4 safe (and if not, we should fix the modules). Can you try dropping completely the reference to module-compat in alienv and see if that works?
I have just posted my solution to this problem, that was to reinstall modules 4.5.3 (the latest version 4.6.0 has different behaviour and the modulecmd bash -t avail does not produce the expected output):
Dear all,
can’t update alienv instead of downgrading modules?
I’ve checked that if I comment out: export MODULES_USE_COMPAT_VERSION=1
inside alienv, it works without any further error.
But of course I did not try if this breaks some other systems.