Skip to content

Commit e365a85

Browse files
authored
Merge pull request #8 from godotengine/mono-ubuntu-cil
Mono: Workaround segfault issue with Mono MSBuild on Ubuntu 14.04
2 parents 4d8e6dc + 5a7ffb3 commit e365a85

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

build-linux/build.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ if [ "${MONO}" == "1" ]; then
4848
cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/
4949
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig/
5050

51-
$SCONS platform=x11 CC=$CC CXX=$CXX $OPTIONS $OPTIONS_MONO tools=yes target=release_debug copy_mono_root=yes
51+
# Workaround for MSBuild segfault on Ubuntu containers, we build the CIL on Fedora and copy here.
52+
mkdir -p bin
53+
cp -r /root/mono-glue/cil/GodotSharp bin/
54+
55+
$SCONS platform=x11 CC=$CC CXX=$CXX $OPTIONS $OPTIONS_MONO tools=yes target=release_debug copy_mono_root=yes build_cil=no
5256
mkdir -p /root/out/tools-mono
5357
cp -rvp bin/* /root/out/tools-mono
5458
rm -rf bin

build-mono-glue/build.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ if [ "${MONO}" == "1" ]; then
2626

2727
rm -rf /root/mono-glue/*
2828
xvfb-run bin/godot.x11.opt.tools.64.mono --generate-mono-glue /root/mono-glue || /bin/true
29+
30+
# Build and copy CIL that we'll need for Ubuntu 14.04 Linux builds
31+
# to workaround Mono MSBuild segfault in our containers.
32+
xvfb-run bin/godot.x11.opt.tools.64.mono --generate-mono-glue modules/mono/glue || /bin/true
33+
${SCONS} platform=x11 bits=64 ${OPTIONS} target=release_debug tools=yes module_mono_enabled=yes mono_glue=yes build_cil=yes
34+
35+
mkdir /root/mono-glue/cil
36+
cp -r bin/GodotSharp /root/mono-glue/cil/
2937
fi
3038

3139
echo "Mono glue generated successfully"

build-server/build.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ if [ "${MONO}" == "1" ]; then
4343
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
4444
cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/
4545

46-
$SCONS platform=server CC=$CC CXX=$CXX $OPTIONS $OPTIONS_MONO tools=yes target=release_debug copy_mono_root=yes
46+
# Workaround for MSBuild segfault on Ubuntu containers, we build the CIL on Fedora and copy here.
47+
mkdir -p bin
48+
cp -r /root/mono-glue/cil/GodotSharp bin/
49+
50+
$SCONS platform=server CC=$CC CXX=$CXX $OPTIONS $OPTIONS_MONO tools=yes target=release_debug copy_mono_root=yes build_cil=no
4751
mkdir -p /root/out/tools-mono
4852
cp -rvp bin/* /root/out/tools-mono
4953
rm -rf bin

0 commit comments

Comments
 (0)