VOGONS


First post, by dbgl-user

User metadata
Rank Newbie
Rank
Newbie

so, i tried to get this working on my own, but i really need some assistance here.

i have already unpacked the source dosbox-0.74-3.tar.gz and also placed the dosbox-0.74-3-mt32-patch.diff in that folder (one level up the src folder). then started the terminal in dosbox folder and ran: patch -p0 <dosbox-0.74-3-mt32-patch.diff

an error message comes up: file can not be found

i hoped these steps are already enough to apply the patch?

Last edited by Dominus on 2020-03-24, 09:47. Edited 1 time in total.

Reply 1 of 14, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

can you elaborate the message? Is it the patch file cannot be found or the file to be patched?
if patch file: make sure to enter the path tho the patch file. Also on OS X I need to use patch -p0 -i patch.patch
if file to be patched: experiment with the -p0 option (for example -p1 or even -p2, this corrects the issue if the patch file has additional, redundant path information)

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox

Reply 2 of 14, by dbgl-user

User metadata
Rank Newbie
Rank
Newbie

hi dominus,

thanks for replying.

here is the output in detail:

patch -p0 <dosbox-0.74-3-mt32-patch.diff
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/src/Makefile.am b/src/Makefile.am
|index a4029e8..3869353 100644
|--- a/src/Makefile.am
|+++ b/src/Makefile.am
--------------------------
File to patch: ^C

and here with -p1:

patch -p1 <dosbox-0.74-3-mt32-patch.diff
patching file src/Makefile.am
patching file src/dosbox.cpp
patching file src/gui/Makefile.am
patching file src/gui/midi.cpp
patching file src/gui/midi_mt32.cpp
patching file src/gui/midi_mt32.h
patching file src/mt32options.h

does it mean it was patched succesfully and i can continue compiling like this:

./autogen.sh
./configure && make -j 4

Reply 4 of 14, by dbgl-user

User metadata
Rank Newbie
Rank
Newbie

compiling fails with this error:

midi_mt32.h:7:10: schwerwiegender Fehler: mt32emu/mt32emu.h: Datei oder Verzeichnis nicht gefunden
7 | #include <mt32emu/mt32emu.h>
| ^~~~~~~~~~~~~~~~~~~
Kompilierung beendet.

i guess some prerequisits are not met, wished i would have found a tutorial for beginners like me.

Reply 5 of 14, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

hmm, seems to me that the patch is not adding the munt files themselves... you can try adding everything from munts code folder mt32emu/src in mt32emu in dsobox' main root.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox

Reply 6 of 14, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

I took a quick look and while that approach would fix finding the headers, compiling breaks because it (the patch) is probably not compatible with current MUNT code but it doesn't state for which version or revision it is good. I opened a thread to for sergm at Problems applying and compiling the integrated DOSBox patch.
Either monitor that or I will eventually get back to you here

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox

Reply 7 of 14, by dbgl-user

User metadata
Rank Newbie
Rank
Newbie
Dominus wrote on 2020-03-23, 15:01:

Either monitor that or I will eventually get back to you here

thank you very much for the efforts taken 😀

if i understood @sergm correctly, munt has to be installed on the system as well for compiling the patched dosbox source?

i might try this and tell you later on.

btw, how would you achieve a standalone db binary only, without the need to have munt installed at all?

something like removing munt after the process is finished, then: strip --strip-unneeded dosbox?

Reply 8 of 14, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

ok, there is a bit of confusion.
what sergm meant was that you need to compile the sources and add the lib and headers to your system (AFAIK you do that via cmake for munt). It's not the same as having Munt installed. So when you apply the patch to DSOBox it gets picked up on compilation.

When that all works you end up with a DOSBox that relies on certain dynamic libraries (SDL, SDL_net, SDL_Sound, ogg/vorbis, mt32emu...), but that is ok and how it is to work usually 😀

What I meant in the thread as integrated munt, was the way we did it in Exult. We added munt to our code, to not rely on the lib. But in hindsight, this was a bad decision as we manually need to sync back with Munt to get the latest improvements. But we are lagging behind mostly because some changes to Munt require Exult to go through more substantial changes as well.

Edit: adapted topic a bit and moved it to the Munt development forum.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox

Reply 9 of 14, by dbgl-user

User metadata
Rank Newbie
Rank
Newbie

ok, I got it compiled now, to my surprise exactly as I described it!

i installed munt 2.3 from the aur.

then went on just as before with compiling dosbox:

patch -p1 <dosbox-0.74-3-mt32-patch.diff
./autogen.sh
./configure && make -j 4

next i uninstalled munt (i try to keep aur packages at a minimum, hence my question).

strip --strip-unneeded dosbox

resulting in a dosbox build incl. munt libs out of the box.

perhaps this is not meant to be or has other drawbacks, but it seems to work fine.

Reply 10 of 14, by sergm

User metadata
Rank Oldbie
Rank
Oldbie

Note, it's quite possible to nuke the library afterwards provided that it is built statically. The Cmake option libmt32emu_SHARED controls whether a static or a dynamic library is being built. The default depends on whether the munt package is being build or just the library stand-alone. In the latter case, it is shared by default.

As for the aur munt package, I suppose it includes the library built statically since the build script seem to involve the entire munt stuff.

Reply 12 of 14, by sergm

User metadata
Rank Oldbie
Rank
Oldbie
dbgl-user wrote on 2020-03-24, 15:52:

one last question: how to find out if the build is 64bit for sure?

If you are in doubt, I'm pretty sure the arch is the same as the system arch. In order to produce cross builds we usually spent enough effort. 😀

Reply 14 of 14, by dbgl-user

User metadata
Rank Newbie
Rank
Newbie
sergm wrote on 2020-03-24, 16:41:
Also, what may help is something like […]
Show full quote

Also, what may help is something like

objdump -a dosbox

which should show "file format elf64-x86-64" for 64-bit builds.

all 's well, thanks.