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

8.7.14+ fails to build man page #635

Closed
opoplawski opened this issue Mar 16, 2023 · 12 comments
Closed

8.7.14+ fails to build man page #635

opoplawski opened this issue Mar 16, 2023 · 12 comments

Comments

@opoplawski
Copy link
Contributor

Describe the bug
The Fedora package build of Lmod after 8.7.14 (8.7.7 is the previous successful build) has an error when building the man page.

Successful build:

/usr/bin/lua ./src/lmod.in.lua bash --help >/dev/null 2> /builddir/build/BUILDROOT/Lmod-8.7.7-2.fc37.x86_64/usr/share/lmod/8.7.7/share/man/cat1/module.1

Failed build:

/usr/bin/lua ./src/lmod.in.lua bash --help >/dev/null 2> /builddir/build/BUILDROOT/Lmod-8.7.14-1.fc38.x86_64/usr/share/lmod/8.7.14/share/man/cat1/module.1
make: [makefile:242: man_pages] Error 1 (ignored)

Text of output:

/usr/bin/lua: ./src/utils.lua:896: module 'tcl2lua' not found:
        no field package.preload['tcl2lua']
        no file './src/tcl2lua.lua'
        no file './src/../tools/tcl2lua.lua'
        no file './src/../tools/tcl2lua/init.lua'
        no file './src/../shells/tcl2lua.lua'
        no file './src/tcl2lua/init.lua'
        no file '/usr/share/lua/5.4/tcl2lua.lua'
        no file '/usr/share/lua/5.4/tcl2lua/init.lua'
        no file '/usr/lib64/lua/5.4/tcl2lua.lua'
        no file '/usr/lib64/lua/5.4/tcl2lua/init.lua'
        no file './tcl2lua.lua'
        no file './tcl2lua/init.lua'
        no file './src/../lib/tcl2lua.so'
        no file '/usr/lib64/lua/5.4/tcl2lua.so'
        no file '/usr/lib64/lua/5.4/loadall.so'
        no file './tcl2lua.so'
stack traceback:
        [C]: in function 'require'
        ./src/utils.lua:896: in upvalue 'l_build_runTCLprog'
        ./src/utils.lua:1056: in function 'initialize_lmod'
        ./src/lmod.in.lua:361: in function 'main'
        ./src/lmod.in.lua:584: in main chunk
        [C]: in ?

It would be good if the build error was not ignored.

@rtmclay
Copy link
Member

rtmclay commented Mar 16, 2023

Thanks for the bug report! I was able to reproduce your issue and fix it for me. Please test Lmod 8.7.20 to see if it fixes it for you.

The issue is that I made LMOD_FAST_TCL_INTERP to be active by default in Lmod 8.7.12 but I failed to handle all the cases where lmod.in.lua was used. This change should fix that. Thanks!

@opoplawski
Copy link
Contributor Author

Seems to be fixed now, thanks!

@rungitta
Copy link

I still see this error when building 8.7.22 on Ubuntu:

make[1]: Leaving directory '/opt/software/src/lmod/Lmod-8.7.22'
/usr/bin/lua5.3 ./src/lmod.in.lua bash --help > /dev/null 2> /opt/software/lmod/8.7.22/share/man/cat1/module.1
make: *** [makefile:242: man_pages] Error 1

It installs but the symlink is never created in the end. The newest version that don't cause this error is 8.7.19, all above produces it.

@rtmclay
Copy link
Member

rtmclay commented Mar 28, 2023

I am unable to reproduce this issue running on Ubuntu. Would you please try the following:

$ cd  /path/to/lmod_source
$ /usr/bin/lua5.3 ./src/lmod.in.lua bash -D --help > ~/help.log 2> ~/help.err

and send me the help.log and help.err files

@rungitta
Copy link

Thanks!
Those commands let me know that the lua-filesystem package was missing on the system. Installing that and it worked like a charm. Since the other 8.7.19 worked, does that mean that lua filesystem comes with Lmod and somehow worked in that case but for some reason not with the newer versions? I should probably also mention that this was on an ARM machine.

It's the first time I install Lmod on Ubuntu so just followed the instructions here:
https://lmod.readthedocs.io/en/latest/030_installing.html#using-your-package-manager-ubuntu-for-18-04-and-20-04
I didn't see any reference to lua-filesystem so skipped it (even though I always install that on RHEL systems).

Here is the output of help.err (help.log was empty):

/usr/bin/lua5.3: ./src/../tools/fileOps.lua:38: module 'lfs' not found:                                                                                                                            [0/46724]
        no field package.preload['lfs']                                                                                                                                                                     
        no file './src/lfs.lua'                                                                                                                                                                             
        no file './src/../tools/lfs.lua'                                                                                                                                                                    
        no file './src/../tools/lfs/init.lua'                                                                                                                                                               
        no file './src/../shells/lfs.lua'                                                                                                                                                                   
        no file './src/lfs/init.lua'                                                                                                                                                                        
        no file '/usr/local/share/lua/5.3/lfs.lua'                                                                                                                                                          
        no file '/usr/local/share/lua/5.3/lfs/init.lua'                                                                                                                                                     
        no file '/usr/local/lib/lua/5.3/lfs.lua'                                                                                                                                                            
        no file '/usr/local/lib/lua/5.3/lfs/init.lua'                                                                                                                                                       
        no file '/usr/share/lua/5.3/lfs.lua'                                                                                                                                                                
        no file '/usr/share/lua/5.3/lfs/init.lua'                                                                                                                                                           
        no file './lfs.lua'                                                                                                                                                                                 
        no file './lfs/init.lua'                                                                                                                                                                            
        no file './src/../lib/lfs.so'                                                                                                                                                                       
        no file '/usr/local/lib/lua/5.3/lfs.so'                                                                                                                                                             
        no file '/usr/lib/aarch64-linux-gnu/lua/5.3/lfs.so'                                                                                                                                                 
        no file '/usr/lib/lua/5.3/lfs.so'                                                                                                                                                                   
        no file '/usr/local/lib/lua/5.3/loadall.so'                                                                                                                                                         
        no file './lfs.so'                                                                                                                                                                                  
stack traceback:                                                                                                                                                                                            
        [C]: in function 'require'                                                                                                                                                                          
        ./src/../tools/fileOps.lua:38: in main chunk                                                                                                                                                        
        [C]: in function 'require'                                                                                                                                                                          
        ./src/myGlobals.lua:45: in main chunk                                                                                                                                                               
        [C]: in function 'require'                                                                                                                                                                          
        ./src/lmod.in.lua:107: in main chunk                                                                                                                                                                
        [C]: in ?

@rtmclay
Copy link
Member

rtmclay commented Mar 28, 2023

The fact that it failed before is a problem. Please try installing Lmod on similar system where lua filesystem is NOT installed. See Lmod normally knows that if it doesn't find lfs, it will build its own. So I'd like to know why that failed.

Could you send me the output of the build?

@rungitta
Copy link

rungitta commented Mar 28, 2023 via email

@rtmclay
Copy link
Member

rtmclay commented Mar 28, 2023

Thanks very much for the output from the build of Lmod! Lmod does correctly build lfs.so and installs it but when the manpage is created, lmod.in.lua doesn't know about it. I have updated the testing branch to set LUA_PATH and LUA_CPATH when building the manpage.

Please using the testing branch to see if this change works for you.

@rungitta
Copy link

I can confirm that the testing branch installation for 8.7.22 worked very well. Do you want the build output as well?

@rtmclay
Copy link
Member

rtmclay commented Mar 29, 2023

No. I don't need the build output as long as it works for you. I'll update the main branch later today and release 8.7..23

@rtmclay
Copy link
Member

rtmclay commented Mar 29, 2023

Lmod 8.7.23 has been released. It now has the changes in the testing branch.

@rungitta
Copy link

Thanks for the help :)

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

No branches or pull requests

3 participants