I went over the build_server_2.sh
again line by line comparing them to what I have in my chrooted system, here’s the problematic lines:
cp -a /etc/mono/4.5/machine.config /opt/cfx-server/citizen/clr2/cfg/mono/4.5/machine.config
Problem: mono
directory does not exist under /etc/
cp -a /usr/lib/mono/4.5/Facades/ /opt/cfx-server/citizen/clr2/lib/mono/4.5/Facades/
Problem: mono
directory does not exist under /usr/lib/
cp -a /usr/lib/libMonoPosixHelper.so /tmp/libMonoPosixHelper.so
cp -a /usr/lib/libmono-btls-shared.so /tmp/libmono-btls-shared.so
Problem: files libMonoPosixHelper.so
and libmono-btls-shared.so
do not exist under this path.
What do I do wrong? Is the alpine docker image incorrect? I used mcr.microsoft.com/dotnet/core/sdk:3.1-alpine3.13
It seems that what’s directly on the image is not really relevant because of the chroot
into alpine
, I would trust build_server_2.sh
script takes care of those files being there, but will double check.
Update:
It looks like all the .dll files copied by the following loop:
for dll in I18N.CJK.dll I18N.MidEast.dll I18N.Other.dll I18N.Rare.dll I18N.West.dll I18N.dll Microsoft.CSharp.dll Mono.CSharp.dll Mono.Posix.dll Mono.Security.dll System.Collections.Immutable.dll System.ComponentModel.DataAnnotations.dll System.Configuration.dll System.Core.dll System.Data.dll System.Drawing.dll System.EnterpriseServices.dll System.IO.Compression.FileSystem.dll System.IO.Compression.dll System.Management.dll System.Net.Http.WebRequest.dll System.Net.Http.dll System.Net.dll System.Numerics.Vectors.dll System.Numerics.dll System.Reflection.Metadata.dll System.Runtime.InteropServices.RuntimeInformation.dll System.Runtime.Serialization.dll System.ServiceModel.Internals.dll System.ServiceModel.dll System.Transactions.dll System.Web.dll System.Xml.Linq.dll System.Xml.dll System.dll mscorlib.dll; do
cp /usr/lib/mono/4.5/$dll /opt/cfx-server/citizen/clr2/lib/mono/4.5/ || true
done
are there with the exception of System.Runtime.InteropServices.RuntimeInformation.dll
, which can be fixed by adding the following line to build_server_2.sh
above the loop:
cp -a ../data/server_windows/citizen/clr2/lib/mono/4.5/System.Runtime.InteropServices.RuntimeInformation.dll /usr/lib/mono/4.5
Only problem that still remains is this:
Linking citizen-server-state-fivesv
readelf: Warning: Separate debug info file /usr/lib/debug//lib//ld-musl-x86_64.so.1.debug found, but CRC does not match - ignoring
readelf: Warning: Separate debug info file /usr/lib/debug//lib//ld-musl-x86_64.so.1.debug found, but CRC does not match - ignoring
Bus error (core dumped)
/src/code/tools/ci/build_server_2.sh: line 217: objcopy: I/O error
/src/code/tools/ci/build_server_2.sh: line 218: rm: I/O error
For now I will try to just cut out this part (it’s some magic binary patching that seems to be something unimportant like some version tagging or something like that, but I can be wrong) and see if the server is actually runnable.
Update 2:
The binary patching might have been important afterall, After trying to run the server, it immediately crashes with an assertion failure:
Assertion failed: IsObject() (../../../../vendor/rapidjson/include/rapidjson/document.h: FindMember: 1249)