VOGONS


Yet another win32 DOSBox SVN compiling thread

Topic actions

Reply 20 of 70, by marooned_on_mars

User metadata
Rank Member
Rank
Member

Same error, apparently when I configure it does not create a Makefile in the lib folder.

Reply 21 of 70, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

You need the *lib*in the lib folder that your compiler uses (c:/mingw/libs probably).
You get the lib when you compile the mt32emulib.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 22 of 70, by marooned_on_mars

User metadata
Rank Member
Rank
Member

I only got source files when I used cmake. And I said earlier that when trying to run ./configure in MinGW on the source files and it crashes to cmd.

Reply 23 of 70, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

You don't run configure on mt32lib. You need to run cmake and then make. Cmake is an alternative to the autotools (autogen, configure... Etc).
If you dont have anything compiled don't expect anything that depends on it to compile...

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 24 of 70, by marooned_on_mars

User metadata
Rank Member
Rank
Member
Dominus wrote:

You don't run configure on mt32lib. You need to run cmake and then make. Cmake is an alternative to the autotools (autogen, configure... Etc).
If you dont have anything compiled don't expect anything that depends on it to compile...

I ran cmake, got the source files with it, then tried to make in MinGW. As opposed to what you said, I didn't configure in MinGW. In cmake I tried both CLI and GUI, in GUI I did both Configure and Generate. After that I got the MUNT source files and afterwards I went to compile with MinGW since CMake does not do that (at least here) and this results in MinGW crashing. I don't know what I'm doing wrong here. 😐

Reply 26 of 70, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Other than that you are on your own since I haven't used mingw/msys in ages and never had to do anything with cmake back then. Try to google it

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 27 of 70, by bloodbat

User metadata
Rank Oldbie
Rank
Oldbie

Out of sick, masochistic curiosity I just tried building mt32emu under MinGW, it built with no problems, using their provided MinGW shell and command line cmake.
Sure enough, it produced libmt32emu.a.
The only problem I can think of is a poorly configured cmake, so...my recommendations:
-Run CMake within the MinGW shell (it whines if sh is in your path).
-Make the source path is the one for mt32emu, you probably don't want other stuff it builds (i.e change to said path and run 'cmake -G "MSYS Makefiles" ./' sans the single quotes)
-Make
Done.
I'm posting here the compiled binary built with gcc version 4.7.0 (GCC) just now, it may or may not be of use to you.

Reply 28 of 70, by marooned_on_mars

User metadata
Rank Member
Rank
Member

Thanks to both of you, I finally got it to work and compiled my own library. Sorry for the masochistic tendencies and for the pulled hair through out this thread, haha =D

Reply 29 of 70, by marooned_on_mars

User metadata
Rank Member
Rank
Member

I have to come back to this thread (for more hair pulling, I'm such a sadistic bastard I know... 😁 ) since I'm having problems again, and this time it's
MinGW not compiling DosBox with Munt. The entries for mt32 emulation are present in the .conf, but when I choose it, this message shows up in the DosBox status window:

"mt32" is not a valid value for variable: mididevice.
It might now be reset it to default value: default

I don't know what went wrong this time, I made 2 successful builds by now and they both had mt-32 built in them. I recently had to reinstall Windows so I had to gather the compiling environment back. I don't think I missed anything much, I got SDL, got most of the optional libs suggested by the readme (which some don't get detected even when they're in the right place like png.h or in.h for instance). Also, the config.log (that I'll attach at the bottom) doesn't have any entries to either mt32emu, munt or simply mt32, so I start to wonder what went wrong 😐

Reply 31 of 70, by marooned_on_mars

User metadata
Rank Member
Rank
Member

That's weird, how can that be when there's the mt32 entries/descriptions in the dosbox.conf file?

Anyway, I'll try to compile DosBox again from scratch and see if that makes any difference and I'll edit this post with the results.

Reply 32 of 70, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Because you are using your old conf? If configure doesn't look for libmt32 then it's probably not patched to do so...

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 33 of 70, by marooned_on_mars

User metadata
Rank Member
Rank
Member

This is what patching outputs:

$ patch -p1 < mt32.diff
patching file src/Makefile.am
patching file src/dosbox.cpp
Hunk #1 succeeded at 483 (offset 16 lines).
Hunk #2 succeeded at 499 with fuzz 1 (offset 19 lines).
patching file src/gui/Makefile.am
patching file src/gui/midi.cpp
Hunk #1 succeeded at 103 (offset 5 lines).
patching file src/gui/midi_mt32.h

Configure

$ ./configure
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make sets $(MAKE)... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for ranlib... ranlib
checking for sdl-config... /mingw/bin/sdl-config
checking for SDL - version >= 1.2.0... yes
checking SDL version only being 1.2.X... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking size of unsigned char... 1
checking size of unsigned short... 2
checking size of unsigned int... 4
checking size of unsigned long... 4
checking size of unsigned long long... 8
checking size of int *... 4
checking for stdlib.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/socket.h... no
checking for netinet/in.h... no
checking for pwd.h... no
checking if environ can be included... yes
checking if environ can be linked... yes
checking if dirent includes d_type... no
checking for powf in libm... yes
Show last 77 lines
checking if compiler allows __attribute__... yes
checking if compiler allows __attribute__((always_inline)) ... yes
checking if compiler allows __attribute__((fastcall)) ... yes
checking if compiler allows __builtin_expect... yes
checking for ALSA CFLAGS...
checking for ALSA LDFLAGS... -lasound -lm -ldl -lpthread
checking for libasound headers version >= 0.9.0... not present.
checking for snd_ctl_open in -lasound... no
checking whether byte ordering is bigendian... no
checking for target cpu type... x86 compatible
checking whether x86 dynamic cpu core will be enabled... yes
checking whether recompiling cpu core will be enabled... no, using dynamic-x86
checking whether fpu emulation will be enabled... yes
checking whether x86 assembly fpu core will be enabled... yes
checking whether to enable unaligned memory access... yes
checking png.h usability... no
checking png.h presence... no
checking for png.h... no
checking for png_get_io_ptr in -lpng... no
configure: WARNING: Can't find libpng, screenshot support disabled
checking SDL_net.h usability... yes
checking SDL_net.h presence... yes
checking for SDL_net.h... yes
checking for SDLNet_Init in -lSDL_net... no
configure: WARNING: Can't find SDL_net, internal modem and ipx disabled
checking for main in -lX11... no
checking X11/XKBlib.h usability... no
checking X11/XKBlib.h presence... no
checking for X11/XKBlib.h... no
checking for XKBlib support... no
checking for main in -lGL... no
checking for main in -lopengl32... yes
checking GL/gl.h usability... yes
checking GL/gl.h presence... yes
checking for GL/gl.h... yes
checking whether opengl display output will be enabled... yes
checking SDL_sound.h usability... yes
checking SDL_sound.h presence... yes
checking for SDL_sound.h... yes
checking for Sound_Init in -lSDL_sound... no
checking for Sound_Seek in -lSDL_sound... no
configure: WARNING: Can't find libSDL_sound, libSDL_sound support disabled
checking sys/mman.h usability... no
checking sys/mman.h presence... no
checking for sys/mman.h... no
checking for setpriority support... no
checking ddraw.h usability... yes
checking ddraw.h presence... yes
checking for ddraw.h... yes
checking for windres... windres
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/cpu/Makefile
config.status: creating src/cpu/core_full/Makefile
config.status: creating src/cpu/core_normal/Makefile
config.status: creating src/cpu/core_dyn_x86/Makefile
config.status: creating src/cpu/core_dynrec/Makefile
config.status: creating src/debug/Makefile
config.status: creating src/dos/Makefile
config.status: creating src/fpu/Makefile
config.status: creating src/gui/Makefile
config.status: creating src/hardware/Makefile
config.status: creating src/hardware/serialport/Makefile
config.status: creating src/ints/Makefile
config.status: creating src/libs/Makefile
config.status: creating src/libs/zmbv/Makefile
config.status: creating src/libs/gui_tk/Makefile
config.status: creating src/misc/Makefile
config.status: creating src/shell/Makefile
config.status: creating src/platform/Makefile
config.status: creating src/platform/visualc/Makefile
config.status: creating visualc_net/Makefile
config.status: creating include/Makefile
config.status: creating docs/Makefile
config.status: creating config.h
config.status: executing depfiles commands

No signs of libmt32emu.a (it is compiled and present in MinGW/libs/ folder) also configure.log shows no sign of munt/mt32/libmt32

Make stops with an error:

make[3]: Entering directory `/c/dosbox/src/gui'
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/c/MinGW/include/SDL -D_GNU_S
OURCE=1 -Dmain=SDL_main -g -O2 -MT midi.o -MD -MP -MF .deps/midi.Tpo -c -o mid
i.o midi.cpp
In file included from midi.cpp:106:0:
midi_mt32.h:1:29: fatal error: mt32emu/mt32emu.h: No such file or directory
compilation terminated.
make[3]: *** [midi.o] Error 1
make[3]: Leaving directory `/c/dosbox/src/gui'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/c/dosbox/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/c/dosbox'
make: *** [all] Error 2

I have no idea why it doesn't pick up mt32emu.h that's in the /src/gui folder (where the compiler was when it encountered the error). I also tried making a sub-folder so it would be /src/gui/mt32emu/mt32emu.h and still doesn't work. Tried that also in /src/libs and /includes but no go.
It's the same error I had before somebody suggested me what to do to compile libmt32emu. (didn't mention it as it compiled fine after making the library)

Also previously I never patched after configuring, so I have no idea how that happened.

Reply 34 of 70, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Your mt32 stuff needs to be in the mingw fokder structure. You shot your working mingw thing and now you need to build it up again as it was previously...

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 35 of 70, by marooned_on_mars

User metadata
Rank Member
Rank
Member
Dominus wrote:

Your mt32 stuff needs to be in the mingw fokder structure. You shot your working mingw thing and now you need to build it up again as it was previously...

Which "mt32 stuff" and where, MinGW/lib/? I thought they were automatically placed when I issued "make install" after finishing compiling munt.

Reply 36 of 70, by marooned_on_mars

User metadata
Rank Member
Rank
Member

Sorry for the double post, I haven't changed anything from previously except that I installed automake through MinGW (mingw-get) and it worked. I noticed it was complaining that it's missing when configuring. Another issue arose, seems I can't use the ddraw output, it tells me this in DosBox status window: "Failed to create ddraw surface, back to normal surface."
Also mt-32 output is seriously slow and choppy even on 4000 cycles (that gives me speeds close to a low-end 386 CPU). But I'll have to ask about this in it's development thread. It's a big difference compared to previous munt versions as earlier I was able to achieve double the cycles with no choppiness.

Reply 37 of 70, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

I think you need to *hack* SDL for ddraw...

And *seriously*, automake missing and you go on? Pay attention to that stuff...

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 38 of 70, by marooned_on_mars

User metadata
Rank Member
Rank
Member

And what exactly would that "hacking" require?

As I said earlier in the thread I'm a newbie to compiling, and I've only done it in an UNIX environment once or twice where it was a given that automake was integrated. I need things to be spelled out even if it seems redundant to you. Also I had no idea what automake is for, and proceeded since the compiling didn't stop at that point.