Mount and Blade Warband won't start on NixOS

Hello, I'm having issues running mount and blade warband's native linux version on NixOS. Here's the log, it says something is missing but I'm not sure exactly what it is:
92 Replies
rival-black
rival-black16mo ago
Try without using steam runtime but the game itself complains about missing libGLEW.so.2.1
inland-turquoise
inland-turquoiseOP16mo ago
no difference, same error
inland-turquoise
inland-turquoiseOP16mo ago
yeah, I am not exactly sure what that is or how to fix that maybe something to do with wine?
rival-black
rival-black16mo ago
it's a native game you can try with wine though would need to uninstall the game and reinstall windows version
inland-turquoise
inland-turquoiseOP16mo ago
I'd prefer the native version
rival-black
rival-black16mo ago
I don't have any experience with nix so I can't really help here ¯\_(ツ)_/¯ hopefully someone else sees this and helps
inland-turquoise
inland-turquoiseOP16mo ago
ok, I'll ask in the nixos unofficial discord too and post the solution here if they find it.
relaxed-coral
relaxed-coral16mo ago
I just dealt with libGLEW this morning while trying to use the Sonic Mania decomp. I also needed libGLEW.so.2.1, but (1) I am using an immutable Fedora, so I had to spin up a distrobox container and (2) using an arch container, I found that the only way to get libGLEW.so.2.1 was to get it from the AUR, so I had to install paru into the container because I don't know how to pull from AUR otherwise the version of libGLEW on the Arch repos was newer and not backward compatible and I couldn't use it in a Fedora container because according to this https://rpmfind.net/linux/rpm2html/search.php?query=libGLEW.so.2.1()(64bit), it isn't even available as a package for Fedora
inland-turquoise
inland-turquoiseOP16mo ago
Nixpkgs does have a glew package, will try that later
relaxed-coral
relaxed-coral16mo ago
Check to see if it matches the one sought. There’s a newer libglew available on Arch that isn’t back compatible to the one above
flat-fuchsia
flat-fuchsia16mo ago
@termdisc This is a bit off-topic, but installing an AUR package without the use of a helper isn't terribly difficult, in the general case. Each package has a URL you can clone its Git repository from, and then you simply run makepkg -srci where the PKGBUILD file is.
inland-turquoise
inland-turquoiseOP16mo ago
nixpkgs has 2.2 :c
relaxed-coral
relaxed-coral16mo ago
yeah, same with Fedora and Arch. chalk it up to GOG native games being frozen in time
inland-turquoise
inland-turquoiseOP16mo ago
I'll try to see if I can make a custom nixOS package
relaxed-coral
relaxed-coral16mo ago
There’s also the risk that the native build is out of date in terms of game content and patches
inland-turquoise
inland-turquoiseOP16mo ago
ok so far I have managed to override the version attribute to 2.1.0 I'll let you know if it works nope it installed but it doesn't see it wait a minute, libGLEW is in the game files
rival-black
rival-black16mo ago
try adding LD_LIBRARY_PATH env var to point there
inland-turquoise
inland-turquoiseOP16mo ago
well, now it doesn't find libcurl progress
rival-black
rival-black16mo ago
:sunglase: try this out with steam runtime too
inland-turquoise
inland-turquoiseOP16mo ago
aight that's even worse
rival-black
rival-black16mo ago
aight then don't
inland-turquoise
inland-turquoiseOP16mo ago
without steam runtime
inland-turquoise
inland-turquoiseOP16mo ago
maybe I can download it somehwere and copy it there (this is so scuffed) man istg
inland-turquoise
inland-turquoiseOP16mo ago
I manually downlaoded a precompiled libcurl from arch, and now it wants another goddamn library
inland-turquoise
inland-turquoiseOP16mo ago
screw this I'll try the windows version
relaxed-coral
relaxed-coral16mo ago
The thing I was doing had me install 3-4 different ones, one at a time
inland-turquoise
inland-turquoiseOP16mo ago
Ok so here's what I did Installe wine and winetricks Then installed d3dcompiler_43 and 47 Then d3dx9, d3dx9_43, d3dx10, d3dx10_43 and d3dx11_43 Now it runs if I execute the exe file with wine. It doesn't seem like the heroic launcher manages to launch it yet but I will check tomorrow
relaxed-coral
relaxed-coral16mo ago
You have to completely redownload the game to switch to the windows build. Did you do that?
inland-turquoise
inland-turquoiseOP16mo ago
Yes
relaxed-coral
relaxed-coral16mo ago
Post a log
inland-turquoise
inland-turquoiseOP16mo ago
inland-turquoise
inland-turquoiseOP16mo ago
this is what hapens if I try to run it via heroic if I run the actual exe with wine however it works
flat-fuchsia
flat-fuchsia16mo ago
Are you using the same prefix in both cases?
inland-turquoise
inland-turquoiseOP16mo ago
yeah I think so I used the heroic launcher to install the components in the prefix so in theory it should use the same prefix
flat-fuchsia
flat-fuchsia16mo ago
And what is the non-Heroic command you're using to run the game?
inland-turquoise
inland-turquoiseOP16mo ago
Two things work: wine ./mb_warband.exe on the working directory (I setup a shortcut to do that) or right click and run with Wine (same thing, on KDE)
CommandMC
CommandMC16mo ago
You're not using the same prefix and Wine version then
inland-turquoise
inland-turquoiseOP16mo ago
oof
CommandMC
CommandMC16mo ago
Use the Winetricks button in Heroic (game settings) to install the components you listed above
inland-turquoise
inland-turquoiseOP16mo ago
I did that's how I got those components installed
inland-turquoise
inland-turquoiseOP16mo ago
No description
CommandMC
CommandMC16mo ago
Hmm, maybe try downloading the redist from here and installing it using "Run EXE in prefix"? As an aside, please update to Heroic 2.12.1
inland-turquoise
inland-turquoiseOP16mo ago
I'm using whatever Heroic version is shipped with NixOS 23.11 I'd hope that doesn't mess with the fix the game itself runs, just not through Heroic
CommandMC
CommandMC16mo ago
Heroic runs the game, and any executables you run using "Run EXE on prefix", in the game's Wineprefix. Anything you do inside there will thus not affect your global prefix (what's used when just running wine ... / opening a Windows application using your file manager The output of winetricks list-installed might also give some clues (that lists the verbs installed in your global prefix; make sure all of those are also installed in Heroic)
inland-turquoise
inland-turquoiseOP16mo ago
winetricks list-installed gives me this: with wine-8.0.2 and WINEARCH=win32 d3dcompiler_47 did not work and it also borked my fix great just great I'm gonna try and undo that and just stick with my fix. I'll leave this open for others who either want the fix or find out a solution to run this on heroic
relaxed-coral
relaxed-coral16mo ago
Delete your prefix, disable Dxvk-NVAPI, use wine-GE, install d3dcompiler_47
inland-turquoise
inland-turquoiseOP16mo ago
I'm getting 0024:err:module:import_dll Loading library d3d9.dll (which is needed by L"Z:\home\lorenzob\Giochi\Heroic\Mount and Blade - Warband\mb_warband.exe") failed (error c000035a). 0024:err:module:LdrInitializeThunk Importing dlls for L"Z:\home\lorenzob\Giochi\Heroic\Mount and Blade - Warband\mb_warband.exe" failed, status c0000135 from the terminal rn
relaxed-coral
relaxed-coral16mo ago
Add that too
CommandMC
CommandMC16mo ago
Assuming you didn't do something entirely wrong (as in, running the executable by just double-clicking it or something), this is impossible
inland-turquoise
inland-turquoiseOP16mo ago
I did everything as you said
relaxed-coral
relaxed-coral16mo ago
NVAPI is enabled in your log yet you have AMD
CommandMC
CommandMC16mo ago
Right, I do fail to see how something happening in one Wineprefix can influence another, but alright Please delete Heroic's Wineprefix (/home/lorenzob/Giochi/Heroic/Prefixes/default/Mount Blade Warband), only install d3dcompiler_47 via Winetricks in Heroic, and run the game again. Assuming that doesn't work, send in a game log
inland-turquoise
inland-turquoiseOP16mo ago
d3dx9 is already installed as well as d3dcompiler_47. dxvk-NVAPI is disabled
relaxed-coral
relaxed-coral16mo ago
But d3d9 should be provided by wine ge Your log showed system wine
CommandMC
CommandMC16mo ago
This isn't a case of it being missing, it's there but failing to load I don't even know how well native d3dx9 works in Wine, but seeing as their default prefix has (well, had) the game working and that doesn't have the verb installed, I'm thinking to just skip it (not sure why OP chose to install it in the first place)
relaxed-coral
relaxed-coral16mo ago
Post a new log
inland-turquoise
inland-turquoiseOP16mo ago
I'm not trying to run it as heroic launcher anymore
rival-black
rival-black16mo ago
👏DXVK👏
inland-turquoise
inland-turquoiseOP16mo ago
d3dcompiler alone isn't enough
CommandMC
CommandMC16mo ago
That's all you had in your global prefix and it worked there I'm just thinking that we might want to try one step at a time. Installing d3dx9 is easy, removing it again is impossible
inland-turquoise
inland-turquoiseOP16mo ago
well evidently when i was running it with wine it wasn't using the global prefix then
relaxed-coral
relaxed-coral16mo ago
I’d still want to see a failed attempt after changing the runner to wine-GE instead of system wine
CommandMC
CommandMC16mo ago
That's not how this works. Unless you provide a custom prefix path (with the WINEPREFIX env var), you're using the default (global) prefix And if you did provide a custom prefix path via the env var, it'd also apply to Winetricks above, and that'd list the verbs in that custom prefix
inland-turquoise
inland-turquoiseOP16mo ago
well, all I know is it worked yesterday, I tried installing that thing you said and now it doesn't work anymore
inland-turquoise
inland-turquoiseOP16mo ago
relaxed-coral
relaxed-coral16mo ago
You still didn’t switch to wine GE
inland-turquoise
inland-turquoiseOP16mo ago
not yet
relaxed-coral
relaxed-coral16mo ago
Which presumably means you didn’t delete the prefix Wine GE comes with gaming patches Do that before you spin out on stuff that might be moot
inland-turquoise
inland-turquoiseOP16mo ago
I did I don't even know what package does nixos ship wineGE as
relaxed-coral
relaxed-coral16mo ago
It’s in the wine manager in heroic
CommandMC
CommandMC16mo ago
Please click the "winecfg" button in Heroic (right next to Winetricks), head to the "Libraries" tab, and take a screenshot
inland-turquoise
inland-turquoiseOP16mo ago
No description
No description
No description
inland-turquoise
inland-turquoiseOP16mo ago
all right
CommandMC
CommandMC16mo ago
Right, whatever you deleted was not the prefix Since those overrides wouldn't be there if you would've deleted it
inland-turquoise
inland-turquoiseOP16mo ago
downloading wine GE, will see if it installs given it's an immutable distro which ones
CommandMC
CommandMC16mo ago
All of them
inland-turquoise
inland-turquoiseOP16mo ago
I literally rm -rfed the wine prefix directory this is how it was also when it launched yesterday at least, as far as I can tell
relaxed-coral
relaxed-coral16mo ago
It gets installed in Heroic’s config folder in user space
inland-turquoise
inland-turquoiseOP16mo ago
ok
CommandMC
CommandMC16mo ago
Are you... sure you rm'd the right directory? All I can tell you is that a regular Wineprefix has none of those overrides in there (overrides are stored in the per-prefix registry, so it's not like they persist or anything)
inland-turquoise
inland-turquoiseOP16mo ago
yes, heroic's wine prefix is ~/Games/Heroic/Prefixes/default/Mount and Blade. I rm-rfed Mount and Blade
CommandMC
CommandMC16mo ago
Could you run cat "/home/lorenzob/Giochi/Heroic/Prefixes/default/Mount Blade Warband/winetricks.log"?
inland-turquoise
inland-turquoiseOP16mo ago
inland-turquoise
inland-turquoiseOP16mo ago
everything in there I installed after deleting the prefix ok, installed wineGE
inland-turquoise
inland-turquoiseOP16mo ago
without adding any other component
CommandMC
CommandMC16mo ago
Alright, let me clarify: delete the prefix, only install d3dcompiler_47, try to run the game. Assuming that doesn't work, send in another game log Installing d3dx9, be that via Winetricks or via the standalone installer, will not work and will bork your prefix (as you've seen a couple times now)
relaxed-coral
relaxed-coral16mo ago
Now do what commandmc says about d3dcompiler It’s needed for dx9 games many times
inland-turquoise
inland-turquoiseOP16mo ago
ok deleted all prefixes now I deleted all prefixes and run game without doing anything, launcher starts, game probably won't but will try
relaxed-coral
relaxed-coral16mo ago
That’s when you install d3dcompiler_47 only
inland-turquoise
inland-turquoiseOP16mo ago
ok, now it works at least, seems to work it gave me a weird graphical glitch at startup but the game itself apparently works marking this as solved thanks @termdisc @CommandMC
CommandMC
CommandMC16mo ago
In case you want to solve this, send in a new game log Might just need d3dcompiler_43 as well installed (installing that and _47 is usually harmless; as in it doesn't break anything like d3dx9 does)
inland-turquoise
inland-turquoiseOP16mo ago
It only gave it once so far

Did you find this page helpful?