Skip to content

Commit

Permalink
core with zlib/xml2
Browse files Browse the repository at this point in the history
  • Loading branch information
pmp-p committed Aug 26, 2024
1 parent d9a92a1 commit ab9e7e5
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 8 deletions.
5 changes: 3 additions & 2 deletions cibuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
export CMA_MB=${CMA_MB:-64}

export CI=${CI:-false}

if $CI
then
. .buildconfig
Expand Down Expand Up @@ -212,8 +213,8 @@ END
END
fi

mkdir -p ${PGROOT}/include/postgresql ${PGROOT}/include/postgresql/server
cp ${PG_DEBUG_HEADER}
mkdir -p ${PGROOT}/include/postgresql/server
cp ${PG_DEBUG_HEADER} ${PGROOT}/include/
cp ${PG_DEBUG_HEADER} ${PGROOT}/include/postgresql
cp ${PG_DEBUG_HEADER} ${PGROOT}/include/postgresql/server

Expand Down
15 changes: 12 additions & 3 deletions cibuild/linkweb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ pushd src/backend
../../src/timezone/strftime.o \
../../pg_initdb.o"

PG_L="../../src/common/libpgcommon_srv.a ../../src/port/libpgport_srv.a ../.././src/interfaces/libpq/libpq.a -L$PREFIX/lib -lxml2"
PG_L="../../src/common/libpgcommon_srv.a ../../src/port/libpgport_srv.a ../.././src/interfaces/libpq/libpq.a -L$PREFIX/lib -lxml2 -lz"
# -lz for xml2
# -sUSE_ZLIB"

if $DEBUG
then
Expand Down Expand Up @@ -148,13 +150,20 @@ END

if $OBJDUMP
then
echo "
Linking to : $PG_L
"

# link with MAIN_MODULE=1 ( ie export all ) and extract all sym.
. ${WORKSPACE}/cibuild/linkexport.sh
. ${WORKSPACE}/cibuild/linkexport.sh || exit 158

if [ -f ${WORKSPACE}/patches/exports/pgcore ]
then
echo "PGLite can export $(wc -l ${WORKSPACE}/patches/exports/pgcore) core symbols"
. ${WORKSPACE}/cibuild/linkimports.sh
. ${WORKSPACE}/cibuild/linkimports.sh || exit 163

else
echo "
Expand Down
6 changes: 4 additions & 2 deletions cibuild/pgbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@ else
XSLT="--with-libxslt"
fi

# --with-libxml does not fit with --without-zlib

CNF="${PGSRC}/configure --prefix=${PGROOT} \
XML2_CONFIG=$PREFIX/bin/xml2-config \
--cache-file=${PGROOT}/config.cache.emsdk \
--disable-spinlocks \
--without-zlib --disable-largefile --without-llvm \
--without-pam --disable-largefile --without-zlib --with-openssl=no \
--disable-largefile --without-llvm \
--without-pam --disable-largefile --with-openssl=no \
--without-readline --without-icu --with-libxml ${XSLT} --with-uuid=ossp \
${PGDEBUG}"

Expand Down
31 changes: 31 additions & 0 deletions cibuild/postgis.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
#================================================
# TODO move that to emsdk-extra after CI test

. /etc/lsb-release
export DISTRIB="${DISTRIB_ID}-${DISTRIB_RELEASE}"
export SDKROOT=${SDKROOT:-/opt/python-wasm-sdk}
export CIVER=${CIVER:-$DISTRIB}

TAG=emsdk

echo "making sdk-extra $TAG tarball" 1>&2

pushd /
mkdir -p /tmp/sdk /tmp/web
tar -cpPR \
${SDKROOT}/config \
${SDKROOT}/python3-was? \
${SDKROOT}/wasm32-*-shell.sh \
${SDKROOT}/*sdk \
${SDKROOT}/scripts/*sdk-fetch.sh \
${SDKROOT}/devices/* \
${SDKROOT}/prebuilt/* \
> /tmp/sdk/python${PYBUILD}-${TAG}-sdk-extra-${CIVER}.tar

lz4 -c --favor-decSpeed --best /tmp/sdk/python${PYBUILD}-${TAG}-sdk-extra-${CIVER}.tar \
> /tmp/web/python${PYBUILD}-${TAG}-sdk-extra-${CIVER}.tar.lz4

echo "done" 1>&2
popd

#================================================

mkdir -p build

Expand Down
5 changes: 5 additions & 0 deletions patches/exports/pglite
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,9 @@ ___wasm_setjmp
___wasm_setjmp_test
___xmlOutputBufferCreateFilename
___xmlParserInputBufferCreateFilename
__dist_code
__exit
__length_code
_abort
_access
_acos
Expand Down Expand Up @@ -1921,3 +1923,6 @@ _xmlXPathSubstringFunction
_xmlXPathSumFunction
_xmlXPathTranslateFunction
_xmlXPathTrueFunction
_z_errmsg
_zcalloc
_zcfree
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
+#define IDB_PIPE_FILE "/tmp/initdb.txt"
+#define IDB_PIPE_BOOT "/tmp/initdb.boot.txt"
+#define IDB_PIPE_SINGLE "/tmp/initdb.single.txt"
+#define PG_DEBUG_HEADER "pg_debug.h"
+#define PG_DEBUG_HEADER <pg_debug.h>
+
+
+#if defined(PREFIX)
Expand Down

0 comments on commit ab9e7e5

Please sign in to comment.