Reply 20 of 70, by marooned_on_mars
- Rank
- Member
Same error, apparently when I configure it does not create a Makefile in the lib folder.
Same error, apparently when I configure it does not create a Makefile in the lib folder.
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.
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.
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...
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. 😐
You probably need to run cmake in mingw/msys
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
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.
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
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 😐
Seems you didn't apply the patch
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.
Because you are using your old conf? If configure doesn't look for libmt32 then it's probably not patched to do so...
This is what patching outputs:
$ patch -p1 < mt32.diffpatching file src/Makefile.ampatching file src/dosbox.cppHunk #1 succeeded at 483 (offset 16 lines).Hunk #2 succeeded at 499 with fuzz 1 (offset 19 lines).patching file src/gui/Makefile.ampatching file src/gui/midi.cppHunk #1 succeeded at 103 (offset 5 lines).patching file src/gui/midi_mt32.h
Configure
$ ./configurechecking build system type... i686-pc-mingw32checking host system type... i686-pc-mingw32checking for a BSD-compatible install... /bin/install -cchecking whether build environment is sane... yeschecking for a thread-safe mkdir -p... /bin/mkdir -pchecking for gawk... gawkchecking whether make sets $(MAKE)... yeschecking whether make sets $(MAKE)... (cached) yeschecking for gcc... gccchecking whether the C compiler works... yeschecking for C compiler default output file name... a.exechecking for suffix of executables... .exechecking whether we are cross compiling... nochecking for suffix of object files... ochecking whether we are using the GNU C compiler... yeschecking whether gcc accepts -g... yeschecking for gcc option to accept ISO C89... none neededchecking for style of include used by make... GNUchecking dependency style of gcc... gcc3checking how to run the C preprocessor... gcc -Echecking for g++... g++checking whether we are using the GNU C++ compiler... yeschecking whether g++ accepts -g... yeschecking dependency style of g++... gcc3checking for ranlib... ranlibchecking for sdl-config... /mingw/bin/sdl-configchecking for SDL - version >= 1.2.0... yeschecking SDL version only being 1.2.X... yeschecking for an ANSI C-conforming const... yeschecking for inline... inlinechecking for grep that handles long lines and -e... /bin/grepchecking for egrep... /bin/grep -Echecking for ANSI C header files... yeschecking for sys/types.h... yeschecking for sys/stat.h... yeschecking for stdlib.h... yeschecking for string.h... yeschecking for memory.h... yeschecking for strings.h... yeschecking for inttypes.h... yeschecking for stdint.h... yeschecking for unistd.h... yeschecking for size_t... yeschecking whether struct tm is in sys/time.h or time.h... time.hchecking size of unsigned char... 1checking size of unsigned short... 2checking size of unsigned int... 4checking size of unsigned long... 4checking size of unsigned long long... 8checking size of int *... 4checking for stdlib.h... (cached) yeschecking for sys/types.h... (cached) yeschecking for sys/socket.h... nochecking for netinet/in.h... nochecking for pwd.h... nochecking if environ can be included... yeschecking if environ can be linked... yeschecking if dirent includes d_type... nochecking for powf in libm... yes
checking if compiler allows __attribute__... yeschecking if compiler allows __attribute__((always_inline)) ... yeschecking if compiler allows __attribute__((fastcall)) ... yeschecking if compiler allows __builtin_expect... yeschecking for ALSA CFLAGS...checking for ALSA LDFLAGS... -lasound -lm -ldl -lpthreadchecking for libasound headers version >= 0.9.0... not present.checking for snd_ctl_open in -lasound... nochecking whether byte ordering is bigendian... nochecking for target cpu type... x86 compatiblechecking whether x86 dynamic cpu core will be enabled... yeschecking whether recompiling cpu core will be enabled... no, using dynamic-x86checking whether fpu emulation will be enabled... yeschecking whether x86 assembly fpu core will be enabled... yeschecking whether to enable unaligned memory access... yeschecking png.h usability... nochecking png.h presence... nochecking for png.h... nochecking for png_get_io_ptr in -lpng... noconfigure: WARNING: Can't find libpng, screenshot support disabledchecking SDL_net.h usability... yeschecking SDL_net.h presence... yeschecking for SDL_net.h... yeschecking for SDLNet_Init in -lSDL_net... noconfigure: WARNING: Can't find SDL_net, internal modem and ipx disabledchecking for main in -lX11... nochecking X11/XKBlib.h usability... nochecking X11/XKBlib.h presence... nochecking for X11/XKBlib.h... nochecking for XKBlib support... nochecking for main in -lGL... nochecking for main in -lopengl32... yeschecking GL/gl.h usability... yeschecking GL/gl.h presence... yeschecking for GL/gl.h... yeschecking whether opengl display output will be enabled... yeschecking SDL_sound.h usability... yeschecking SDL_sound.h presence... yeschecking for SDL_sound.h... yeschecking for Sound_Init in -lSDL_sound... nochecking for Sound_Seek in -lSDL_sound... noconfigure: WARNING: Can't find libSDL_sound, libSDL_sound support disabledchecking sys/mman.h usability... nochecking sys/mman.h presence... nochecking for sys/mman.h... nochecking for setpriority support... nochecking ddraw.h usability... yeschecking ddraw.h presence... yeschecking for ddraw.h... yeschecking for windres... windresconfigure: creating ./config.statusconfig.status: creating Makefileconfig.status: creating src/Makefileconfig.status: creating src/cpu/Makefileconfig.status: creating src/cpu/core_full/Makefileconfig.status: creating src/cpu/core_normal/Makefileconfig.status: creating src/cpu/core_dyn_x86/Makefileconfig.status: creating src/cpu/core_dynrec/Makefileconfig.status: creating src/debug/Makefileconfig.status: creating src/dos/Makefileconfig.status: creating src/fpu/Makefileconfig.status: creating src/gui/Makefileconfig.status: creating src/hardware/Makefileconfig.status: creating src/hardware/serialport/Makefileconfig.status: creating src/ints/Makefileconfig.status: creating src/libs/Makefileconfig.status: creating src/libs/zmbv/Makefileconfig.status: creating src/libs/gui_tk/Makefileconfig.status: creating src/misc/Makefileconfig.status: creating src/shell/Makefileconfig.status: creating src/platform/Makefileconfig.status: creating src/platform/visualc/Makefileconfig.status: creating visualc_net/Makefileconfig.status: creating include/Makefileconfig.status: creating docs/Makefileconfig.status: creating config.hconfig.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_SOURCE=1 -Dmain=SDL_main -g -O2 -MT midi.o -MD -MP -MF .deps/midi.Tpo -c -o midi.o midi.cppIn file included from midi.cpp:106:0:midi_mt32.h:1:29: fatal error: mt32emu/mt32emu.h: No such file or directorycompilation terminated.make[3]: *** [midi.o] Error 1make[3]: Leaving directory `/c/dosbox/src/gui'make[2]: *** [all-recursive] Error 1make[2]: Leaving directory `/c/dosbox/src'make[1]: *** [all-recursive] Error 1make[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.
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...
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.
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.
I think you need to *hack* SDL for ddraw...
And *seriously*, automake missing and you go on? Pay attention to that stuff...
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.
Since I'm no longer on Windows, I don't know anymore what you need to do to SDL...