Skip to content
Merged
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
3 changes: 2 additions & 1 deletion Dockerfile.android
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand
ENV ANDROID_HOME=/root/sdk/
ENV ANDROID_NDK_ROOT=/root/sdk/ndk-bundle/

RUN git clone https://github.com/mono/mono --branch mono-${mono_version} --single-branch && \
RUN git clone https://github.com/mono/mono --branch ${mono_version} --single-branch && \
cd mono && git submodule update --init && cd .. && \
export MONO_SOURCE_ROOT=/root/mono && \
export make="make -j" && \
git clone https://github.com/godotengine/godot-mono-builds && \
cd godot-mono-builds && \
git checkout bd129da22b8b9c96f3e8b07af348cc5fb61504bf && \
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile.javascript
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ RUN dnf -y install --setopt=install_weak_deps=False \
./emsdk activate 1.38.47-upstream && \
echo "source /root/emsdk/emsdk_env.sh" >> /root/.bashrc

RUN git clone https://github.com/mono/mono --branch mono-${mono_version} --single-branch && \
RUN git clone https://github.com/mono/mono --branch ${mono_version} --single-branch && \
cd mono && git submodule update --init && cd .. && \
export MONO_SOURCE_ROOT=/root/mono && \
export make="make -j" && \
git clone https://github.com/godotengine/godot-mono-builds && \
cd godot-mono-builds && \
git checkout bd129da22b8b9c96f3e8b07af348cc5fb61504bf && \
python3 patch_emscripten.py && \
git am -3 /root/files/patches/mono-wasm-avoid-aligning-stack-bounds.patch && \
python3 wasm.py configure --target=runtime && \
python3 wasm.py make --target=runtime && \
cd /root/mono && git clean -fdx && NOCONFIGURE=1 ./autogen.sh && \
Expand Down
11 changes: 6 additions & 5 deletions Dockerfile.mono
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand
dnf -y install --setopt=install_weak_deps=False \
autoconf automake cmake gcc gcc-c++ gettext libtool perl python && \
dnf clean all && \
git clone https://github.com/mono/mono --branch mono-${mono_version} --single-branch && \
git clone https://github.com/mono/mono --branch ${mono_version} --single-branch && \
cd mono && git submodule update --init && \
NOCONFIGURE=1 ./autogen.sh && \
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib/mono --disable-boehm && \
make -j && \
make install && \
cd .. && \
cert-sync /etc/pki/tls/certs/ca-bundle.crt && \
rpm -ivh --nodeps https://download.mono-project.com/repo/centos8-stable/m/msbuild/msbuild-16.0+xamarinxplat.2018.09.26.17.53-0.xamarin.5.epel8.noarch.rpm \
https://download.mono-project.com/repo/centos8-stable/m/msbuild-libhostfxr/msbuild-libhostfxr-2.0.0.2017.07.06.00.01-0.xamarin.3.epel8.x86_64.rpm \
https://download.mono-project.com/repo/centos8-stable/m/msbuild/msbuild-sdkresolver-16.0+xamarinxplat.2018.09.26.17.53-0.xamarin.5.epel8.noarch.rpm \
https://download.mono-project.com/repo/centos8-stable/n/nuget/nuget-4.7.0.5148.bin-0.xamarin.2.epel8.noarch.rpm && \
rpm -ivh --nodeps \
https://download.mono-project.com/repo/centos8-stable/m/msbuild/msbuild-16.3+xamarinxplat.2019.08.08.00.55-0.xamarin.2.epel8.noarch.rpm \
https://download.mono-project.com/repo/centos8-stable/m/msbuild-libhostfxr/msbuild-libhostfxr-3.0.0.2019.04.16.02.13-0.xamarin.4.epel8.x86_64.rpm \
https://download.mono-project.com/repo/centos8-stable/m/msbuild/msbuild-sdkresolver-16.3+xamarinxplat.2019.08.08.00.55-0.xamarin.2.epel8.noarch.rpm \
https://download.mono-project.com/repo/centos8-stable/n/nuget/nuget-5.2.0.6090.bin-0.xamarin.1.epel8.noarch.rpm && \
rm -rf /root/mono

CMD /bin/bash
2 changes: 1 addition & 1 deletion Dockerfile.osx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand
ENV OSXCROSS_ROOT=/root/osxcross
ENV PATH="/root/osxcross/target/bin:${PATH}"

RUN git clone https://github.com/mono/mono --branch mono-${mono_version} --single-branch && \
RUN git clone https://github.com/mono/mono --branch ${mono_version} --single-branch && \
cd mono && git submodule update --init && \
export CMAKE=/root/osxcross/target/bin/x86_64-apple-darwin18-cmake && \
NOCONFIGURE=1 ./autogen.sh && \
Expand Down
14 changes: 7 additions & 7 deletions Dockerfile.ubuntu-32
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,24 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand
ln -sf /usr/bin/gcc-8 /usr/bin/gcc && \
ln -sf /usr/bin/g++-8 /usr/bin/g++

RUN git clone https://github.com/mono/mono --branch mono-${mono_version} --single-branch && \
RUN git clone https://github.com/mono/mono --branch ${mono_version} --single-branch && \
cd mono && git submodule update --init && \
NOCONFIGURE=1 ./autogen.sh && \
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib/mono --disable-boehm --host=i386-linux-gnu && \
make -j && \
make install && \
cd .. && \
cert-sync /etc/ssl/certs/ca-certificates.crt && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/m/msbuild/msbuild_16.0+xamarinxplat.2018.09.26.17.53-0xamarin3+ubuntu1404b1_all.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/c/core-setup/msbuild-libhostfxr_2.0.0.2017.07.06.00.01-0xamarin21+ubuntu1404b1_i386.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/m/msbuild/msbuild-sdkresolver_16.0+xamarinxplat.2018.09.26.17.53-0xamarin3+ubuntu1404b1_all.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/n/nuget/nuget_4.7.0.5148.bin-0xamarin2+ubuntu1404b1_all.deb && \
rm -rf /root/mono && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/m/msbuild/msbuild_16.3+xamarinxplat.2019.08.08.00.55-0xamarin2+ubuntu1604b1_all.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/c/core-setup/msbuild-libhostfxr_3.0.0.2019.04.16.02.13-0xamarin3+ubuntu1604b1_i386.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/m/msbuild/msbuild-sdkresolver_16.3+xamarinxplat.2019.08.08.00.55-0xamarin2+ubuntu1604b1_all.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/n/nuget/nuget_5.2.0.6090.bin-0xamarin1+ubuntu1604b1_all.deb && \
dpkg -i --force-all *.deb && \
sed -i '/Depends.*mono/d' /var/lib/dpkg/status && \
ln -s /usr/bin/mono /usr/bin/cli && \
apt-get clean && \
rm -rf /var/lib/apt/lists/ && \
rm *.deb && \
rm -rf /root/mono
rm *.deb

CMD /bin/bash
14 changes: 7 additions & 7 deletions Dockerfile.ubuntu-64
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,24 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand
ln -sf /usr/bin/gcc-8 /usr/bin/gcc && \
ln -sf /usr/bin/g++-8 /usr/bin/g++

RUN git clone https://github.com/mono/mono --branch mono-${mono_version} --single-branch && \
RUN git clone https://github.com/mono/mono --branch ${mono_version} --single-branch && \
cd mono && git submodule update --init && \
NOCONFIGURE=1 ./autogen.sh && \
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib/mono --disable-boehm --host=x86_64-linux-gnu && \
make -j && \
make install && \
cd .. && \
cert-sync /etc/ssl/certs/ca-certificates.crt && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/m/msbuild/msbuild_16.0+xamarinxplat.2018.09.26.17.53-0xamarin3+ubuntu1404b1_all.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/c/core-setup/msbuild-libhostfxr_2.0.0.2017.07.06.00.01-0xamarin21+ubuntu1404b1_amd64.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/m/msbuild/msbuild-sdkresolver_16.0+xamarinxplat.2018.09.26.17.53-0xamarin3+ubuntu1404b1_all.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/n/nuget/nuget_4.7.0.5148.bin-0xamarin2+ubuntu1404b1_all.deb && \
rm -rf /root/mono && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/m/msbuild/msbuild_16.3+xamarinxplat.2019.08.08.00.55-0xamarin2+ubuntu1604b1_all.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/c/core-setup/msbuild-libhostfxr_3.0.0.2019.04.16.02.13-0xamarin3+ubuntu1604b1_amd64.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/m/msbuild/msbuild-sdkresolver_16.3+xamarinxplat.2019.08.08.00.55-0xamarin2+ubuntu1604b1_all.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/n/nuget/nuget_5.2.0.6090.bin-0xamarin1+ubuntu1604b1_all.deb && \
dpkg -i --force-all *.deb && \
sed -i '/Depends.*mono/d' /var/lib/dpkg/status && \
ln -s /usr/bin/mono /usr/bin/cli && \
apt-get clean && \
rm -rf /var/lib/apt/lists/ && \
rm *.deb && \
rm -rf /root/mono
rm *.deb

CMD /bin/bash
2 changes: 1 addition & 1 deletion Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand
/root/files/mingw64-binutils-2.30-5.fc29.godot.x86_64.rpm \
/root/files/mingw32-binutils-2.30-5.fc29.godot.x86_64.rpm

RUN git clone https://github.com/mono/mono --branch mono-${mono_version} --single-branch && \
RUN git clone https://github.com/mono/mono --branch ${mono_version} --single-branch && \
cd mono && git submodule update --init && \
NOCONFIGURE=1 ./autogen.sh && \
./configure --prefix=/root/dependencies/mono-64 --host=x86_64-w64-mingw32 --disable-boehm --disable-mcs-build --disable-executables && \
Expand Down
59 changes: 59 additions & 0 deletions files/patches/mono-wasm-avoid-aligning-stack-bounds.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
From aad54942583f8658ab6d7e7af5ffe3b76b3f35b3 Mon Sep 17 00:00:00 2001
From: Zoltan Varga <vargaz@gmail.com>
Date: Tue, 3 Sep 2019 13:27:24 -0400
Subject: [PATCH] [wasm] Avoid aligning the stack bounds, they are not page
aligned on wasm.

---
mono/utils/mono-threads-wasm.c | 8 ++++----
mono/utils/mono-threads.c | 2 ++
2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/mono/utils/mono-threads-wasm.c b/mono/utils/mono-threads-wasm.c
index 687e6c4c93e7..c61d800f4be2 100644
--- a/mono/utils/mono-threads-wasm.c
+++ b/mono/utils/mono-threads-wasm.c
@@ -145,10 +145,10 @@ mono_threads_platform_yield (void)
void
mono_threads_platform_get_stack_bounds (guint8 **staddr, size_t *stsize)
{
+ int tmp;
#ifdef __EMSCRIPTEN_PTHREADS__
pthread_attr_t attr;
gint res;
- int tmp;

*staddr = NULL;
*stsize = (size_t)-1;
@@ -173,13 +173,13 @@ mono_threads_platform_get_stack_bounds (guint8 **staddr, size_t *stsize)
*staddr = (guint8*)wasm_get_stack_base ();
*stsize = wasm_get_stack_size ();
}
-
- g_assert (&tmp > *staddr);
- g_assert (&tmp < (char*)*staddr + *stsize);
#else
*staddr = (guint8*)wasm_get_stack_base ();
*stsize = wasm_get_stack_size ();
#endif
+
+ g_assert ((guint8*)&tmp > *staddr);
+ g_assert ((guint8*)&tmp < (guint8*)*staddr + *stsize);
}

gboolean
diff --git a/mono/utils/mono-threads.c b/mono/utils/mono-threads.c
index 546704ff9e8f..bf73e01c7970 100644
--- a/mono/utils/mono-threads.c
+++ b/mono/utils/mono-threads.c
@@ -1569,8 +1569,10 @@ mono_thread_info_get_stack_bounds (guint8 **staddr, size_t *stsize)
/* Sanity check the result */
g_assert ((current > *staddr) && (current < *staddr + *stsize));

+#ifndef TARGET_WASM
/* When running under emacs, sometimes staddr is not aligned to a page size */
*staddr = (guint8*)((gssize)*staddr & ~(mono_pagesize () - 1));
+#endif
}

gboolean