I have some Fish scripts for my Toolforge tool that I'd like to be able to run on the Grid Engine, but fish isn't available there, even though it's available to the scripts when they're run in the console for the tool, outside the Grid Engine. Could Fish be enabled on the Grid Engine?
I posted on IRC in #wikimedia-cloud and someone recommended that I post here.
Demonstration on the console for my tool (after become <my tool name>):
$ which fish /usr/bin/fish $ cd ~ && echo $'#! /usr/bin/env fish\n\necho "Hello, world!"' > hello.fish && chmod +x hello.fish $ /usr/bin/env fish hello.fish Hello, world! $ jsub -stderr -sync y hello.fish; tail hello.err Job xxxxxxx exited with exit code 127. Your job xxxxxxx ("hello") has been submitted /usr/bin/env: ‘fish’: No such file or directory
I tried copying /usr/bin/fish locally and running it in the job engine, but it looks like it can't find a PCRE2 shared library that it requires:
$ cd ~ && cp $(which fish) . && echo '#! '$(readlink -f ./fish)$'\n\necho "Hello, world!"' > hello.fish && chmod +x hello.fish $ jsub hello.fish
After the job runs, hello.err contains /.../fish: error while loading shared libraries: libpcre2-32.so.0: cannot open shared object file: No such file or directory. I thought maybe this was because PCRE2 is too potentially pathological for the Grid Engine. (But I'd be surprised if other languages could get along without it.)
Is this intentional or could Fish be enabled on the Grid Engine? I suppose I could try to rewrite my scripts in another language if necessary.