Skip to content

Commit

Permalink
Lmod: fix Ubuntu bug #1752082
Browse files Browse the repository at this point in the history
Because of a [packaging bug in Debian's `lua-posix` package][1],
initialization of Lmod would fail with the following traceback:

```
/usr/bin/lua: /usr/share/lua/5.2/posix/init.lua:29: module 'posix.ctype' not found:
        no field package.preload['posix.ctype']
        no file '/usr/local/share/lua/5.2/posix/ctype.lua'
        no file '/usr/local/share/lua/5.2/posix/ctype/init.lua'
        no file '/usr/local/lib/lua/5.2/posix/ctype.lua'
        no file '/usr/local/lib/lua/5.2/posix/ctype/init.lua'
        no file '/usr/share/lua/5.2/posix/ctype.lua'
        no file '/usr/share/lua/5.2/posix/ctype/init.lua'
        no file './posix/ctype.lua'
        no file '/usr/local/lib/lua/5.2/posix/ctype.so'
        no file '/usr/lib/x86_64-linux-gnu/lua/5.2/posix/ctype.so'
        no file '/usr/lib/lua/5.2/posix/ctype.so'
        no file '/usr/local/lib/lua/5.2/loadall.so'
        no file './posix/ctype.so'
        no file '/usr/local/lib/lua/5.2/posix.so'
        no file '/usr/lib/x86_64-linux-gnu/lua/5.2/posix.so'
        no file '/usr/lib/lua/5.2/posix.so'
        no file '/usr/local/lib/lua/5.2/loadall.so'
        no file './posix.so'
stack traceback:
        [C]: in function 'require'
        /usr/share/lua/5.2/posix/init.lua:29: in main chunk
        [C]: in function 'require'
        /usr/share/lmod/lmod/libexec/addto:64: in main chunk
        [C]: in ?
```

Creating a symlink (as suggested in [comment #6][3] in the [Ubuntu
Launchpad bug report][2]) fixes the issue.

The corresponding Debian bug is [#891541][1] but it seems like no released
Debian version is affected at this point in time.

[1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=891541
[2]: https://bugs.launchpad.net/ubuntu/+source/lua-posix/+bug/1752082
[3]: https://bugs.launchpad.net/ubuntu/+source/lua-posix/+bug/1752082/comments/6
  • Loading branch information
riccardomurri committed Jan 13, 2020
1 parent 892170b commit dcb9ec3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions elasticluster/share/playbooks/roles/lmod/tasks/postinst-Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,13 @@
- { dest: "/etc/profile.d/z80_StdEnv.sh", src: "etc/profile.d/z80_StdEnv.sh.j2" }
- { dest: "/etc/csh/login.d/lmod.csh", src: "etc/profile.d/lmod.csh.j2" }
- { dest: "/etc/csh/login.d/z80_StdEnv.csh", src: "etc/profile.d/z80_StdEnv.csh.j2" }


# See: https://bugs.launchpad.net/ubuntu/+source/lua-posix/+bug/1752082
# and especially comments #3 and and #6
- name: Fix Ubuntu bug #1752082
file:
state: link
src: '/usr/lib/x86_64-linux-gnu/lua/5.2/posix_c.so'
dest: '/usr/lib/x86_64-linux-gnu/lua/5.2/posix.so'
when: is_ubuntu_18_04

0 comments on commit dcb9ec3

Please sign in to comment.