Skip to content

docker builder, wasm->libpglite(wasi/emsdk)->pglite all in one #45

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

Open
wants to merge 8 commits into
base: REL_17_5_WASM-pglite
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .buildconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PG_VERSION=17.5
PG_BRANCH=REL_17_5_WASM
SDK_VERSION=3.1.74.12.0
SDK_VERSION=3.1.74.11.11
SDKROOT=/tmp/sdk
GETZIC=false
ZIC=/usr/sbin/zic
Expand Down
62 changes: 62 additions & 0 deletions docker_rc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#!/bin/bash

WORKSPACE=$(pwd)

echo "

SDK prepare

"

pushd /
# this is minimum required to **use** sdk on docker/debian 12, not build it
apt-get update && apt-get --yes install git wget curl lz4 xz-utils bison flex pkg-config autoconf make

if [ -f $WORKSPACE/sdk.tar.lz4 ]
then
tar xf $WORKSPACE/sdk.tar.lz4 --use-compress-program=lz4
fi

if [ -d $SDKROOT/wasisdk/upstream ]
then
echo "wasi sdk common support is already installed"
else
tar xf ${WORKSPACE}/prebuilt/wasi-sdk-25.tar.xz
fi

if [ -d $SDKROOT/wasisdk/upstream/lib ]
then
echo "wasi sdk $(arch) support is already installed"
else
pushd $SDKROOT/wasisdk
if arch|grep -q aarch64
then
wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/wasi-sdk-25.0-arm64-linux.tar.gz -O/tmp/sdk.tar.gz
else
wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/wasi-sdk-25.0-x86_64-linux.tar.gz -O/tmp/sdk.tar.gz
fi
tar xfz /tmp/sdk.tar.gz && rm /tmp/sdk.tar.gz
mv wasi-sdk-25.0-*/{bin,lib} upstream/
popd
fi

popd

echo "

Setting up SDK shell


Applying Hotfixes
------------------------------------------------------------------------------------------
"

echo "linker fix"
cp -vf hotfix/library_dylink.js ${SDKROOT}/emsdk/upstream/emscripten/src/



echo "------------------------------------------------------------------------------------------"


${SDKROOT}/wasm32-bi-emscripten-shell.sh
Loading