Skip to content
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

Generate mono code error on mac m1 and run app crash. #59871

Open
Colocasia opened this issue Apr 4, 2022 · 6 comments
Open

Generate mono code error on mac m1 and run app crash. #59871

Colocasia opened this issue Apr 4, 2022 · 6 comments

Comments

@Colocasia
Copy link

Colocasia commented Apr 4, 2022

Godot version

4.0-dev

System information

Mac M1

Issue description

Generate mono code error on mac m1 and run app crash.

Steps to reproduce

Hi! I compiled mono as follows,It crashes when I run it:

scons p=osx arch=arm64 tools=yes module_mono_enabled=yes mono_glue=no mono_prefix=$HOME/Projects/Engines/mono_arm64 -j$(sysctl -n hw.logicalcpu)
bin/godot.osx.tools.arm64.mono --generate-mono-glue modules/mono/glue
scons p=osx arch=arm64 target=release_debug tools=yes module_mono_enabled=yes mono_glue=yes mono_prefix=$HOME/Projects/Engines/mono_arm64 -j$(sysctl -n hw.logicalcpu)
cp -r misc/dist/osx_tools.app ./Godot.app
mkdir -p Godot.app/Contents/MacOS
cp bin/godot.osx.opt.tools.arm64.mono Godot.app/Contents/MacOS/Godot
chmod +x Godot.app/Contents/MacOS/Godot
mkdir -p Godot.app/Contents/Frameworks
cp -R bin/GodotSharp Godot.app/Contents/Frameworks/

I do something wrong? And where is crash log? I need help

and When I run this:

bin/godot.osx.tools.arm64.mono --generate-mono-glue modules/mono/glue

it has error:

ERROR: Cannot resolve type reference in documentation: 'RootMotionView'.
   at: bbcode_to_xml (modules/mono/editor/bindings_generator.cpp:391)
ERROR: Cannot resolve type reference in documentation: 'RootMotionView'.
   at: bbcode_to_xml (modules/mono/editor/bindings_generator.cpp:391)

Is this cause crash and how can fix it?

Minimal reproduction project

No response

@Colocasia
Copy link
Author

Colocasia commented Apr 4, 2022

Oh! I think i found the problem!
if i run bin/godot.osx.opt.tools.arm64.mono it work fine.
if i do this:

cp -r misc/dist/osx_tools.app ./Godot.app
mkdir -p Godot.app/Contents/MacOS
cp bin/godot.osx.opt.tools.arm64.mono Godot.app/Contents/MacOS/Godot
chmod +x Godot.app/Contents/MacOS/Godot
mkdir -p Godot.app/Contents/Frameworks
cp -R bin/GodotSharp Godot.app/Contents/Frameworks/

then i run godot.app it will be crash!
Why? How can i run godot.app not crash?
Is there anything missing from the directory structure?

Contents
-->Frameworks
---->GodotSharp
------>...
---->libMoltenVK.dylib
-->info.plist
-->MacOS
---->Godot
-->PkgInfo
-->Resources
---->...

@GeorgeS2019
Copy link

GeorgeS2019 commented Apr 4, 2022

@Colocasia There are some recent changes to the master branch, which may not support Godot4 mono to work properly. I read someplace that PR has been created But may not merge yet.

However, Godot4 mono is no longer Officially focused as the next goal is Godot4 dotnet6.

Some feedback I read on Discord suggests that perhaps two to three weeks old commits will work. Not sure.

Providing the feedback here so I could learn from others who manage to successfully use the recent commit and compile Godot4 mono and to learn which commit will be fine.

Yet to test hypothesis:

Merged PR: Note that this does not make it work yet in GDScript, Visual Script or Mono

Merged PR : Support static methods in C# bindings generator

FYI: using MSVC to compile, not sure will that has any impact.

@Colocasia
Copy link
Author

Thank you for your reply! If so, I'll use the CPP version for now

@GeorgeS2019
Copy link

GeorgeS2019 commented Apr 10, 2022

@Colocasia This is not on any milestone e.g. 4.0. Please share which Godot4 commit you use for mono build

@Colocasia
Copy link
Author

@GeorgeS2019 mono version 6.12.0.162 godot commit e7c1888

@GeorgeS2019
Copy link

GeorgeS2019 commented Apr 18, 2022

@Colocasia

Godot Issue

Godot Engine v4.0.alpha.mono.custom_build.3639c27cf
Mono JIT compiler version 6.13.0

I am attempting to track which Master commits work and with which Mono compiler version, so others could repeat and test and share their experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants