Lmod icon indicating copy to clipboard operation
Lmod copied to clipboard

vague build error: `make[1]: *** [makefile:264: man_pages] Error 1`

Open simonLeary42 opened this issue 4 months ago • 1 comments

In this instruction from the makefile, stderr is redirected to another file. If an error is occurred, the error is redirected to the file and not printed. The only thing that is printed is this:

make[1]: *** [makefile:264: man_pages] Error 1

This was not much to work with. Since the source code has only a Makefile.in and not the actual makefile, I couldn't even know what happened on line 264.

Here is the error I got which was redirected to a file:

/usr/bin/lua5.3: ./src/../tools/fileOps.lua:38: module 'lfs' not found:
        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/share/lmod/8.7.53/libexec/lfs.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 '/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/share/lmod/8.7.53/lib/lfs.so'
        no file '/usr/local/lib/lua/5.3/lfs.so'
        no file '/usr/lib/x86_64-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 '/usr/local/lib/lua/5.3/lfs.so'
        no file '/usr/lib/x86_64-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:44: in main chunk
        [C]: in function 'require'
        ./src/lmod.in.lua:107: in main chunk
        [C]: in ?

And here was how I gained access to the file (using pdebuild on Ubuntu 24.04):

sudo bash -c 'echo HOOKDIR="/usr/lib/pbuilder/hooks" >> /etc/pbuilderrc'
sudo mkdir -p /usr/lib/pbuilder/hooks
sudo ln -s /usr/share/doc/pbuilder/examples/C10shell /usr/lib/pbuilder/hooks/C10shell

this enables a pbuilder hook so that in the event of a build failure, the current TTY will be immediately dropped into a shell inside the chroot.

I'm not sure that it's worth it to add extra logic to the makefile to prevent errors like these from hiding. If nothing else, I just wanted to document my problem in case it happens to someone else. If this isn't considered actionable, feel free to close the issue.

simonLeary42 avatar Oct 21 '24 20:10 simonLeary42