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

Compiling on mac #11

Open
flanter21 opened this issue Feb 22, 2024 · 3 comments
Open

Compiling on mac #11

flanter21 opened this issue Feb 22, 2024 · 3 comments

Comments

@flanter21
Copy link

flanter21 commented Feb 22, 2024

I have mono and pkg-config installed but running compile.sh leads to

Choose the configuration. Press '1' for Release and '2' for Debug: 
1) Release
2) Debug
#? 1

Choose the platform. Press '1' for x86 or '2' for x64: 
1) x86
2) x64
#? 2

Compiling base library...
./compile.sh: line 48: msbuild: command not found
Error compiling Tinke into the default directory. Aborting.

I have tried defining mono in path just in case with no luck. I would appreciate any help on this and am opening this issue to suggest that perhaps any additional steps be added to the readme.

Edit: also cannot import donor iheader on any Pokemon Conquest bad dump (with hash bb2616e3 labelled as third party on datomatic)

@R-YaTian
Copy link
Owner

Apple does not support x86 application on newer macOS, and unfortunately mono does not support x64 platform on macOS. This is out of my range, but I will look into the donor iheader issue when I find a time. Sry for my late reply.

@flanter21
Copy link
Author

flanter21 commented Mar 18, 2024

Thank you for the reply and no worries. I am unfamiliar with the workings of mono but according to this link, they do support x64 on mac.

However, I should've specified that I am using an arm64 mac, which may be the cause of my issues as mono does not currently support arm on mac. I am running mono through rosetta2 however, so the x64 option should've worked. Luckily, now it does seem to work without any issue. However, funnily enough I can't actually run the compiled binary using either dotnet runtime or mono. I believe this is on their end however. Afaik dotnet runtime doesn't support windows.forms and mono, which does, gives this error which implies that windows forms won't work on it

WARNING: The Carbon driver has not been ported to 64bits, and very few parts of Windows.Forms will work properly, or at all
Fontconfig warning: ignoring UTF-8: not a valid region tag
Fontconfig warning: ignoring UTF-8: not a valid region tag
Fontconfig warning: ignoring UTF-8: not a valid region tag

=================================================================
	Native Crash Reporting
=================================================================
Got a segv while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

=================================================================
	Native stacktrace:
=================================================================
	0x104a6d679 - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : mono_dump_native_crash_info
	0x104a0540e - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : mono_handle_native_crash
	0x104a677f6 - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : altstack_handle_and_restore
	0x7ff81c033acd - /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/SkyLight : SLDisplayBounds
	0x1161fa7a8 - Unknown
	0x10d989ce6 - Unknown
	0x104962352 - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : mono_jit_runtime_invoke
	0x104b737e2 - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : mono_runtime_try_invoke
	0x104b72408 - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : mono_runtime_class_init_full
	0x104959d5c - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : mono_jit_compile_method_inner
	0x10495d8aa - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : mono_jit_compile_method_with_opt
	0x104a07f2e - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : common_call_trampoline
	0x104a07970 - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : mono_magic_trampoline
	0x10d901393 - Unknown
	0x1161f9d2b - Unknown

=================================================================
	Telemetry Dumper:
=================================================================
Pkilling 0x13118300160x from 0x8676401728x
Entering thread summarizer pause from 0x8676401728x
Finished thread summarizer pause from 0x8676401728x.
Failed to create breadcrumb file (null)/crash_hash_0x7a9c1e202

Waiting for dumping threads to resume

=================================================================
	External Debugger Dump:
=================================================================

=================================================================
	Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x7ff81c033acd):0x7ff81c033abd  89 fb 48 8b 05 b2 1f d5 3b 0f 10 00 0f 10 48 10  ..H.....;.....H.
0x7ff81c033acd  0f 11 4f 10 0f 11 07 89 f7 48 89 de e8 43 c2 f9  ..O......H...C..
0x7ff81c033add  ff 48 89 d8 48 83 c4 08 5b 5d c3 55 48 89 e5 53  .H..H...[].UH..S
0x7ff81c033aed  48 83 ec 28 48 8b 05 b8 43 d4 3b 48 8b 00 48 89  H..(H...C.;H..H.

=================================================================
	Managed Stacktrace:
=================================================================
	  at <unknown> <0xffffffff>
	  at System.Windows.Forms.XplatUICarbon:CGDisplayBounds <0x000b7>
	  at System.Windows.Forms.XplatUICarbon:get_WorkingArea <0x00072>
	  at System.Windows.Forms.XplatUICarbon:get_VirtualScreen <0x00043>
	  at System.Windows.Forms.XplatUI:get_VirtualScreen <0x00048>
	  at System.Windows.Forms.Screen:.cctor <0x0017a>
	  at System.Object:runtime_invoke_void <0x000a5>
	  at <unknown> <0xffffffff>
	  at System.Windows.Forms.Hwnd:GetNextStackedFormLocation <0x001aa>
	  at System.Windows.Forms.XplatUICarbon:CreateWindow <0x0046a>
	  at System.Windows.Forms.XplatUI:CreateWindow <0x00047>
	  at System.Windows.Forms.NativeWindow:CreateHandle <0x0006a>
	  at System.Windows.Forms.Control:CreateHandle <0x000b8>
	  at System.Windows.Forms.Form:CreateHandle <0x00052>
	  at System.Windows.Forms.Control:CreateControl <0x000c6>
	  at System.Windows.Forms.Control:SetVisibleCore <0x00112>
	  at System.Windows.Forms.Form:SetVisibleCore <0x00252>
	  at System.Windows.Forms.Control:set_Visible <0x00052>
	  at System.Windows.Forms.Control:set_Visible <0x000aa>
	  at System.Windows.Forms.Application:RunLoop <0x00412>
	  at System.Windows.Forms.Application:Run <0x00092>
	  at System.Windows.Forms.Application:Run <0x0007a>
	  at Tinke.Program:Main <0x00312>
	  at <Module>:runtime_invoke_void_object <0x000b0>
=================================================================
zsh: abort      mono64 tinke.exe

It does run through wine, though with major issues compared to the precompiled builds, such as a significantly higher tendancy to crash or the "open rom" option just bringing up a duplicate window of the default ui (can work around this by dragging the file into the ui from finder).

Not really sure what can be done, as you said, but figured it's worth keeping a note of it. Feel free to close the issue.

Another note is that mono does support arm on linux, so if you know how to enable arm compilation on linux for this project, that might potentially be of interest for some people.

EDIT: I'm not sure if you've seen this, but maybe it might be of interest?

@R-YaTian
Copy link
Owner

Yes, Windows.Forms does not fully support 64bit, that is why TinkeDSi could not run on amd64 and/or arm64 macOS

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

No branches or pull requests

2 participants