cea-hpc / modules

Environment Modules: provides dynamic modification of a user's environment
http://modules.sourceforge.net/
GNU General Public License v2.0
716 stars 109 forks source link

After updating fish shell / modules source fish reports issues with x_64 for arm arch #550

Closed richiwalt closed 1 month ago

richiwalt commented 1 month ago

After updating Fish Shell ... my module source statement is now failing with the following console output:

 source ./fish ERROR: dlopen(/usr/local/Cellar/modules/5.4.0/lib/libtclenvmodules.dylib, 0x000A): tried: '/usr/local/Cellar/modules/5.4.0/lib/libtclenvmodules.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/Cellar/modules/5.4.0/lib/libtclenvmodules.dylib' (no such file), '/usr/local/Cellar/modules/5.4.0/lib/libtclenvmodules.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')) while executing "load [file normalize [getConf tcl_ext_lib]] Envmodules" Please report this issue at https://github.com/cea-hpc/modules/issues

Which makes sense, as I am on an Apple M1 system

module command was working before the upgrade, but oh-my-posh required it to render the prompt properly.

Any solution ... tried brew uninstall and reinstall of modules ... but it looks like the uninstall crashed during that process ...

thanks for any assistance.

To Reproduce

Steps to reproduce the behavior:

$ module <command1> <arguments>
$ module <command2> <arguments>
...

Location and content of any modulerc or modulefile involved:

$ cat path/to/modulepath/module/version
$ cat path/to/modulepath/module/.modulerc
$ cat path/to/modulepath/.modulerc
...

Expected behavior

Error and debugging information

$ module --debug <command1> <arguments>
$ module --debug <command2> <arguments>
...

Modules version and configuration

$ module --version
$ module config --dump-state

Additional context

xdelaruelle commented 1 month ago

Thanks for your report. It seems that Modules was installed for x86_64 arch but now you need the arm64 version installed, as I assume the upgraded version of Fish shell is now arm64.

I have no better suggestion than reinstalling your whole Homebrew setup for arm64 architecture, to make the whole thing consistent with your default arch. The brew uninstall crash seems to indicate that there are other software that have been installed for x86_64 that now cannot be used anymore from a shell installed for arm64 arch.

Maybe an alternative is to install the Fish shell update for x86_64 to make it consistent with the other software installed.

To solve your issue for Modules in your actual setup, you can remove the /usr/local/Cellar/modules/5.4.0/lib/libtclenvmodules.dylib library file. Without this library, Modules is a bit less performant but still can be used.

richiwalt commented 1 month ago

Thank you so much for this explanation.  Makes sense to me now what’s going on.  I guess my mistake was using Time Machine to initially set up my M1 Mac from previous Intel Mac.  I may bite the bullet and reinstall everything from scratch to stay pure arm64.  Need to research things first to understand what softwares will be lacking. On Oct 7, 2024 at 12:46 AM -0500, Xavier Delaruelle @.***>, wrote:

Thanks for your report. It seems that Modules was installed for x86_64 arch but now you need the arm64 version installed, as I assume the upgraded version of Fish shell is now arm64. I have no better suggestion than reinstalling your whole Homebrew setup for arm64 architecture, to make the whole thing consistent with your default arch. The brew uninstall crash seems to indicate that there are other software that have been installed for x86_64 that now cannot be used anymore from a shell installed for arm64 arch. Maybe an alternative is to install the Fish shell update for x86_64 to make it consistent with the other software installed. To solve your issue for Modules in your actual setup, you can remove the /usr/local/Cellar/modules/5.4.0/lib/libtclenvmodules.dylib library file. Without this library, Modules is a bit less performant but still can be used. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>