Skip to content

Instantly share code, notes, and snippets.

@alexarchambault
alexarchambault / build.sh
Created July 15, 2021 13:54 — forked from sify21/build.sh
build static native image with graal
# build gcc toolchain targeting x86_64-linux-musl with https://github.com/richfelker/musl-cross-make
# don't use master branch which uses musl v1.2.1(the new malloc implementation has deadlock problems, v1.2.2 fixes it, v1.2.0 doesn't have it)
cd ~
git clone https://github.com/richfelker/musl-cross-make -b v0.9.9
cd musl-cross-make
cp config.mak.dist config.mak
# edit config.mak: TARGET = x86_64-linux-musl
make -j`nproc`
make install
ln -s output/bin/x86_64-linux-musl-gcc output/bin/musl-gcc
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
$ git clone https://github.com/coursier/coursier.git
$ cd coursier
$ git rev-parse HEAD
dc5b9f127e4a7b26317a656ef7f10f10c4f3c625
$ scripts/generate-launcher.sh --assembly
$ $GRAALVM_HOME/bin/native-image --enable-http --enable-https --no-fallback -jar coursier coursier-graalvm
$ ./coursier-graalvm resolve org.apache.spark:spark-sql_2.12:2.4.2 --no-default -r http://repo1.maven.org/maven2
…
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
  • in settings, create access key id / secret access key
  • then
$ aws configure # enter at least access keys
$ aws emr create-default-roles \
    --region us-east-1
$ aws ec2 create-key-pair \
    --region us-east-1 \
    --key-name Demo \
    --query 'KeyMaterial' \