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

[🐧] ARM (AArch64) Linux port discussion #4052

Open
InfamousKnight opened this issue Sep 24, 2024 · 26 comments
Open

[🐧] ARM (AArch64) Linux port discussion #4052

InfamousKnight opened this issue Sep 24, 2024 · 26 comments
Labels
App: EmuHawk Relating to EmuHawk frontend Enhancement For feature requests or possible improvements re: Multiplatform Relating to the Linux and macOS ports (Mono Framework, and eventually .NET Core)

Comments

@InfamousKnight
Copy link

InfamousKnight commented Sep 24, 2024

So the only solution i can think of is using mkbundle to make it x86_64 build so you won't have to install mono.

The only other thing needed is box64. If you install mono on an arm64 machine, it will just install mono arm64 which won't work. It will load the program, but no roms will load.

So far I have managed to get bizhawk running on winlator for android, but it's not very stable. I have ways to run linux on android.

@YoshiRulz YoshiRulz added Enhancement For feature requests or possible improvements App: EmuHawk Relating to EmuHawk frontend re: Multiplatform Relating to the Linux and macOS ports (Mono Framework, and eventually .NET Core) labels Sep 25, 2024
@YoshiRulz
Copy link
Member

YoshiRulz commented Sep 25, 2024

As I've told you before (#2731 (comment)), it should "just work" if you have a AArch64 copy of Mono, and the same for any native libraries used by a core.

edit: As a workaround, you may also have some success with https://fex-emu.com/ (on macOS, https://mac.getutm.app/).

@YoshiRulz YoshiRulz changed the title Arm64 port discussion ARM (AArch64) Linux port discussion Sep 25, 2024
@InfamousKnight
Copy link
Author

InfamousKnight commented Sep 25, 2024 via email

@InfamousKnight
Copy link
Author

InfamousKnight commented Sep 26, 2024

c22f2ab

Retrying this with the same setup, and it crashes at startup with this message:

System.TypeInitializationException: The type initializer for 'BizHawk.Bizware.Graphics.ImGui2DRenderer' threw an exception. ---> System.DllNotFoundException: cimgui assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) BizHawk.Bizware.Graphics.ImGui2DRenderer.ImDrawListSharedData_ImDrawListSharedData()
  at BizHawk.Bizware.Graphics.ImGui2DRenderer..cctor () [0x00000] in <6943343e38fc431da513df9dd525dff5>:0 
   --- End of inner exception stack trace ---
  at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_generic_class_init(intptr)
  at BizHawk.Bizware.Graphics.IGLExtensions.Create2DRenderer (BizHawk.Bizware.Graphics.IGL gl, BizHawk.Bizware.Graphics.ImGuiResourceCache resourceCache) [0x0000a] in <6943343e38fc431da513df9dd525dff5>:0 
  at BizHawk.Client.Common.DisplayManagerBase..ctor (BizHawk.Client.Common.Config config, BizHawk.Emulation.Common.IEmulator emulator, BizHawk.Client.Common.InputManager inputManager, BizHawk.Client.Common.IMovieSession movieSession, BizHawk.Bizware.Graphics.EDispMethod dispMethod, BizHawk.Bizware.Graphics.IGL gl, BizHawk.Bizware.Graphics.IGuiRenderer renderer) [0x00262] in <8aed7adcbd24456cb47ad9a31acf45af>:0 
  at BizHawk.Client.EmuHawk.DisplayManager..ctor (BizHawk.Client.Common.Config config, BizHawk.Emulation.Common.IEmulator emulator, BizHawk.Client.Common.InputManager inputManager, BizHawk.Client.Common.IMovieSession movieSession, BizHawk.Bizware.Graphics.IGL gl, BizHawk.Client.EmuHawk.PresentationPanel presentationPanel, System.Func`1[TResult] getIsSecondaryThrottlingDisabled) [0x00016] in <5707a324a080454ba4a87492040bbff0>:0 
  at BizHawk.Client.EmuHawk.MainForm..ctor (BizHawk.Client.Common.ParsedCLIFlags cliFlags, BizHawk.Bizware.Graphics.IGL gl, System.Func`1[TResult] getConfigPath, System.Func`1[TResult] getGlobalConfig, System.Action`1[T] updateGlobalSound, System.String[] args, BizHawk.Client.Common.IMovieSession& movieSession, System.Boolean& exitEarly) [0x002d4] in <5707a324a080454ba4a87492040bbff0>:0 
  at (wrapper remoting-invoke-with-check) BizHawk.Client.EmuHawk.MainForm..ctor(BizHawk.Client.Common.ParsedCLIFlags,BizHawk.Bizware.Graphics.IGL,System.Func`1<string>,System.Func`1<BizHawk.Client.Common.Config>,System.Action`1<BizHawk.Client.EmuHawk.Sound>,string[],BizHawk.Client.Common.IMovieSession&,bool&)
  at BizHawk.Client.EmuHawk.Program.SubMain (System.String[] args) [0x003c8] in <5707a324a080454ba4a87492040bbff0>:0 

@YoshiRulz
Copy link
Member

YoshiRulz commented Sep 26, 2024

I forget if that's used with every display method or just OpenGL, so you could try switching to the GDI+ display method. But I think you'll have to compile libcimgui.so. Or use a build without 476ac94.

@InfamousKnight
Copy link
Author

InfamousKnight commented Sep 26, 2024

I managed to compile libcimgui but the same result happens..

I didn't really follow the instructions on the page, but what I did was: after using git to download the source files, I then changed directory into cimgui and made a new folder called build. Changed to that folder and then cmake.. followed by make.

And I tried to get an older build before the one you posted. Gitlab didn't have any files to download for it. I guess they expire to save storage..

@CasualPokePlayer
Copy link
Member

CasualPokePlayer commented Sep 28, 2024

You would also have the issue of SDL2 being used, which you would also need to compile.

cimgui is also somewhat fragile, you can't just plop in any version, it must be the same version as ImGui.NET expects (otherwise expect weird crashes due to mismatching ABI).

@InfamousKnight
Copy link
Author

Oh yeah, I remember having to install libsdl because it wouldn't even open a window without it.

Seems this has gotten more complicated than I expected..

@CasualPokePlayer
Copy link
Member

CasualPokePlayer commented Sep 28, 2024

The system SDL2 will not be used (and generally cannot be used, there is no guarantee the system SDL2 is new enough). BizHawk will always use the vendored SDL2.

@InfamousKnight
Copy link
Author

So what about sdl3?

@CasualPokePlayer
Copy link
Member

No, that is completely incompatible (hence why it is "3" and not "2")

@InfamousKnight
Copy link
Author

I see.

What are all the required dependencies for ubuntu linux? I feel like I'm missing something still..

@YoshiRulz
Copy link
Member

Last I checked, libc6-dev and libopenal1 (which are both likely pre-installed) and mono-complete. Everything else is included with BizHawk and those are going to be what cause problems.

@InfamousKnight
Copy link
Author

I guess a solution to this would be to install missing dependencies automatically? Libtas does that. If it can tell me what sort of dependency is missing, it should be able to download and install it.

@YoshiRulz
Copy link
Member

You're describing a package as used by a package manager.

@CasualPokePlayer
Copy link
Member

CasualPokePlayer commented Oct 3, 2024

You already have any "missing dependencies" "installed." The issue is again native libraries that we vendor. These are libraries which you cannot install, they have to come with BizHawk. We only offer x64 builds. For us to actually "support" other platforms, we would need to provide native libraries for those other platforms, it would not be on the user. If you want to somehow get another platform working, you need to self-compile all these dependencies. These do not have instructions, as they are not supported, and they might end up failing to compile with our current scripts for all we know.

If you are incapable of figuring out how to self-compile all these dependencies (which frankly, we don't expect you nor any other user to be capable of such), then you should not try to get BizHawk working natively on a non-x64 platform. You should wait for whatever day we decide to support whatever other platforms users want to run BizHawk on and thus actually have builds for such platforms (that, or somehow try to run some x64 emulation setup, although that is likely going to work poorly; if anything, just get any x64 device if you really want to use BizHawk).

@InfamousKnight
Copy link
Author

Yeah, well, at least we're not too far away from this.

Long story short, some IRL events happened that made my laptop kinda useless.

Thank you for trying to explain.

@InfamousKnight
Copy link
Author

Update over here: It seems that android 13 supports kvm hypervisor. And root is required to use it.

So I'm afraid if this was to work on an android device, you would need root because of overprotective android.

Irrelevant note: got my x86_64 laptop working fixed. Very impressed by how much bizhawk has improved since 2.9.1.

@YoshiRulz YoshiRulz changed the title ARM (AArch64) Linux port discussion [🐧] ARM (AArch64) Linux port discussion Nov 30, 2024
@InfamousKnight

This comment was marked as resolved.

@YoshiRulz

This comment was marked as resolved.

@InfamousKnight

This comment was marked as resolved.

@YoshiRulz

This comment was marked as resolved.

@InfamousKnight

This comment was marked as resolved.

@YoshiRulz

This comment was marked as resolved.

@InfamousKnight

This comment was marked as resolved.

@CasualPokePlayer

This comment was marked as resolved.

@InfamousKnight
Copy link
Author

Got it compiled.. Just weird issues I'm facing with android for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App: EmuHawk Relating to EmuHawk frontend Enhancement For feature requests or possible improvements re: Multiplatform Relating to the Linux and macOS ports (Mono Framework, and eventually .NET Core)
Projects
None yet
Development

No branches or pull requests

3 participants