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

install latest scala-cli on behemoths #1517

Closed
SethTisue opened this issue Dec 7, 2021 · 2 comments
Closed

install latest scala-cli on behemoths #1517

SethTisue opened this issue Dec 7, 2021 · 2 comments
Assignees

Comments

@SethTisue
Copy link
Member

so I can use the new scala-cli shebang for scripting

@SethTisue SethTisue self-assigned this Dec 7, 2021
@SethTisue
Copy link
Member Author

SethTisue commented Dec 7, 2021

I would prefer to use Coursier to manage the installation of scala-cli, but the capability to do that only recently landed, in Coursier 2.1.0-M1. We have an older version install, but cs update won't install a milestone by default. and also it looks like coursier is preferred to cs these days, but our starting point was having cs installed, so to get on the latest we ssh in as jenkins and do:

cs install coursier:2.1.0-M1
coursier uninstall cs
coursier install --contrib scala-cli

and then if scala-cli version shows (as of Dec 7 2021 anyway) 0.0.9, Bob's your uncle!

===

I don't think it should be necessary, but if coursier wants to make a native image for something itself, you'll need to first ssh to the behemoth as admin and:

sudo apt-get install build-essential

(and maybe throw in libz-dev if you see errors about missing zlib headers? not sure if it's needed)

@SethTisue
Copy link
Member Author

SethTisue commented Dec 7, 2021

gah, one annoying thing here is that you can't #!/usr/bin/env -S scala-cli shebang <args> because our coreutils on the behemoths is too old for env to support -S (and it definitely needs it in order to pass an argument such as shebang)

I don't feel confident attempting to upgrade coreutils systemwide (if doing so is even possible without a full OS upgrade)

so here's what I worked out. let's build a recent coreutils and then copy the env binary into /usr/local/bin

that means in order to run the build locally you have to also do ln -s /usr/bin/env /usr/local/bin/env, but oh well

here's the steps. ssh to the behemoth as jenkins, then:

wget http://ftp.gnu.org/gnu/coreutils/coreutils-8.32.tar.xz && tar xf coreutils-8.32.tar.xz
cd coreutils-8.32
./configure
make

then ssh to the behemoth as admin and:

sudo cp ~jenkins/coreutils-8.32/src/env /usr/local/bin/env

I have now done this on all 3 behemoths.

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

1 participant