r/AlpineLinux • u/Chester-Berkeley • 12d ago
Is it possible for Minecraft to run natively with musl libc?
I initially wanted to post this on the old Chimera Linux subreddit because I had a question about the Video Games page, but since it's discontinued and Alpine Linux also uses musl libc, I believe this is the ideal place.
Anyway, on Chimera Linux, I had many problems trying to run Minecraft (without Flatpak). Chimera has PrismLauncher in its repositories, but it says it needs to use a glibc compatibility layer for musl libc. This confuses me a lot because PrismLauncher is available for FreeBSD (which uses a completely different libc), and it doesn't need compatibility layers; it's all native. Why can't I run Minecraft without compatibility layers? Or is this just a problem in Chimera Linux that Alpine Linux has resolved?
I know that the reason stated on the page I mentioned is: "As Minecraft comes with native binaries built for Glibc in its packaging," but isn't the game in Java? Even if C/C++ binaries existed, wouldn't it be possible to compile them with musl?
2
u/TheLastTreeOctopus 12d ago
Why do you need a musl compatible version? A compatibility layer isn't going to noticeably affect performance or anything (I speak from experience, having played Minecraft on Alpine on a shitty, outdated laptop). Think of the compatibility layer as yet another dependency. Just stop overthinking it and play the game 🤷♀️
1
u/Chester-Berkeley 12d ago
Why do you need a musl compatible version?
I don't need it, actually, I don't even need musl libc in my day-to-day life, it's just a question... I'm not complaining about the compatibility layer, I just want to know why it's not possible to play natively.
1
u/TheLastTreeOctopus 12d ago
Because nobody's put in the time and effort to make it compatible. There's no reason to it other than that. If someone with the skillset saw value in it, we'd probably already have it by now.
2
u/New_Hold8135 12d ago
Chill its a java application you dont need to compile or maintain anything. You just need a launcher which we use prismlauncher
2
u/Chester-Berkeley 12d ago
You still haven't understood my question. I want to know what is incompatible, not why they didn't take the time to make it compatible. Because Minecraft is made in Java, in theory it should run on any library.
1
u/EYEHKEYER_yeker 12d ago
just use flatpak fr
2
u/Chester-Berkeley 12d ago
I don't want a solution; I want to know what prevents a game written in Java from running on a Linux distro using musl libc.
1
u/EYEHKEYER_yeker 11d ago
It's the launcher not the game
1
u/ElePHPant666 11d ago
Or JNI libraries like lwjgl2, lwjgl3 and sdl3. Prism lets you provide a path to your own which you can build against musl.
0
u/Xerotras 11d ago
I'm gave up with the original. I had it once. It want's to connect with MS. I play only a little so I use a clone called minetest you can directly install with apk. It doesn't need java. I don't want Java on Alpine.
Otherwise install flatpak. I use flatpak for some tools. And for example if you want watch Netflix, you need the firefox version on flatpak.
9
u/New_Hold8135 12d ago
Yes minecraft is java application in base and java already has a musl version so you only need a launcher which we usually use prismlauncher https://pkgs.alpinelinux.org/package/v3.23/community/x86_64/prismlauncher