VOGONS


First post, by Rottweiler

User metadata
Rank Newbie
Rank
Newbie

I'm attempting to compile DOSBox Megabuild6 using the instructions at: http://www.dosbox.com/wiki/BuildingDOSBox

It says:

When working on Windows, you might want to save a lot of effort and just use the SDL .DLL files included with the latest official DOSBox release, as compiling SDL with full options is a bit involved.

If you skipped building your own SDL.dll, you can use the one included with the latest official release of DOSBox ...

But if I skip compiling SDL, when I do ./configure on DOSBox it fails with:

*** Could not run SDL test program, checking why... *** The test program failed to compile or link. See the file config.log for […]
Show full quote

*** Could not run SDL test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means SDL was incorrectly installed
*** or that you have moved SDL since it was installed. In the latter case, you
*** may want to edit the sdl-config script: /c/dev/dosbox/SDL-1.2.15/sdl-config
configure: error: *** SDL version 1.2.0 not found!

Obviously I'm missing something ... how do I skip compiling SDL?

Reply 2 of 11, by Rottweiler

User metadata
Rank Newbie
Rank
Newbie

Thanks. Downloaded it and tried again. The error is the same but the log contents changed somewhat:

configure:4708: checking for sdl-config configure:4739: result: /c/dev/dosbox/SDL-1.2.15/bin/sdl-config configure:4748: checking […]
Show full quote

configure:4708: checking for sdl-config
configure:4739: result: /c/dev/dosbox/SDL-1.2.15/bin/sdl-config
configure:4748: checking for SDL - version >= 1.2.0
configure:4833: gcc -o conftest.exe -g -O2 -I/usr/local/cross-tools/i686-w64-mingw32/include/SDL -D_GNU_SOURCE=1 -Dmain=SDL_main conftest.c -L/usr/local/cross-tools/i686-w64-mingw32/lib -lmingw32 -lSDLmain -lSDL -mwindows >&5
conftest.c:15:17: fatal error: SDL.h: No such file or directory

I'd be grateful for any help.

Reply 3 of 11, by Rottweiler

User metadata
Rank Newbie
Rank
Newbie

Made a bit of progress. Had to do this:

export CFLAGS="-I/c/dev/dosbox/SDL-1.2.15/include/SDL"
./configure --disable-sdltest

Now ./configure runs clean.

But make does this:

make all-recursive make[1]: Entering directory `/c/dev/dosbox/dosbox-mb6' Making all in src make[2]: Entering directory `/c/dev […]
Show full quote

make all-recursive
make[1]: Entering directory `/c/dev/dosbox/dosbox-mb6'
Making all in src
make[2]: Entering directory `/c/dev/dosbox/dosbox-mb6/src'
Making all in cpu
make[3]: Entering directory `/c/dev/dosbox/dosbox-mb6/src/cpu'
Making all in core_full
make[4]: Entering directory `/c/dev/dosbox/dosbox-mb6/src/cpu/core_full'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/c/dev/dosbox/dosbox-mb6/src/cpu/core_full'
Making all in core_normal
make[4]: Entering directory `/c/dev/dosbox/dosbox-mb6/src/cpu/core_normal'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/c/dev/dosbox/dosbox-mb6/src/cpu/core_normal'
Making all in core_dyn_x86
make[4]: Entering directory `/c/dev/dosbox/dosbox-mb6/src/cpu/core_dyn_x86'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/c/dev/dosbox/dosbox-mb6/src/cpu/core_dyn_x86'
Making all in core_dynrec
make[4]: Entering directory `/c/dev/dosbox/dosbox-mb6/src/cpu/core_dynrec'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/c/dev/dosbox/dosbox-mb6/src/cpu/core_dynrec'
make[4]: Entering directory `/c/dev/dosbox/dosbox-mb6/src/cpu'
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/usr/local/cross-tools/i686-w64-mingw32/include/SDL -D_GNU_SOURCE=1 -Dmain=SDL_main -g -O2 -MT callback.o -MD -MP -MF .deps/callback.Tpo -c -o callback.o callback.cpp
In file included from ../../include/dosbox.h:24:0,
from callback.cpp:24:
../../config.h:282:4: error: #error "sizeof (unsigned char) != 1"
../../config.h:289:4: error: #error "sizeof (unsigned short) != 2"
../../config.h:302:4: error: #error "can't find sizeof(type) of 4 bytes!"
../../config.h:312:4: error: #error "can't find data type of 8 bytes"
../../config.h:319:11: error: 'Bit64u' does not name a type
../../config.h:320:11: error: 'Bit64s' does not name a type
In file included from callback.cpp:24:0:
../../include/dosbox.h:33:26: error: ISO C++ forbids declaration of 'Bitu' with no type [-fpermissive]
../../include/dosbox.h:33:26: error: typedef 'Bitu' is initialized (use decltype instead)
../../include/dosbox.h:33:15: error: 'LoopHandler' was not declared in this scope
../../include/dosbox.h:36:21: error: variable or field 'DOSBOX_SetLoop' declared void
../../include/dosbox.h:36:21: error: 'LoopHandler' was not declared in this scope
../../include/dosbox.h:36:35: error: 'handler' was not declared in this scope

This goes on for 579 lines. Any suggestions?

Reply 4 of 11, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

use the 32 bit compiler.
64 bit on windows is not supported (and the 32 bit is faster)

Water flows down the stream
How to ask questions the smart way!

Reply 5 of 11, by Rottweiler

User metadata
Rank Newbie
Rank
Newbie

Thanks.

How exactly do I use the 32 bit compiler?

To get MinGW and MSYS I just followed the instructions at: http://www.mingw.org/wiki/Getting_Started . It says not a word about 32 vs 64 bit. I'm running this on Win7 x32 so I can't directly do anything 64 bit related.

Anyways, I removed my MinGW/MSYS and completely reinstalled it, did 'make clean' and tried again with the same results.

Any suggestions?

Reply 6 of 11, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

your log shows
i686-w64-mingw32

you need w32
Can you attach your config.log ?

Water flows down the stream
How to ask questions the smart way!

Reply 7 of 11, by Rottweiler

User metadata
Rank Newbie
Rank
Newbie

I re-downloaded dosbox-mb6 just to make sure I was working from a clean source tree. No change. Attached is the most recent config.log. Thanks for any help.

Reply 9 of 11, by Rottweiler

User metadata
Rank Newbie
Rank
Newbie

Mb6 is not official source.

Here's the 'make' output from compiling 0.74:

make all-recursive make[1]: Entering directory `/c/dev/dosbox/dosbox-0.74' Making all in src make[2]: Entering directory `/c/de […]
Show full quote

make all-recursive
make[1]: Entering directory `/c/dev/dosbox/dosbox-0.74'
Making all in src
make[2]: Entering directory `/c/dev/dosbox/dosbox-0.74/src'
Making all in cpu
make[3]: Entering directory `/c/dev/dosbox/dosbox-0.74/src/cpu'
Making all in core_full
make[4]: Entering directory `/c/dev/dosbox/dosbox-0.74/src/cpu/core_full'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/c/dev/dosbox/dosbox-0.74/src/cpu/core_full'
Making all in core_normal
make[4]: Entering directory `/c/dev/dosbox/dosbox-0.74/src/cpu/core_normal'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/c/dev/dosbox/dosbox-0.74/src/cpu/core_normal'
Making all in core_dyn_x86
make[4]: Entering directory `/c/dev/dosbox/dosbox-0.74/src/cpu/core_dyn_x86'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/c/dev/dosbox/dosbox-0.74/src/cpu/core_dyn_x86'
Making all in core_dynrec
make[4]: Entering directory `/c/dev/dosbox/dosbox-0.74/src/cpu/core_dynrec'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/c/dev/dosbox/dosbox-0.74/src/cpu/core_dynrec'
make[4]: Entering directory `/c/dev/dosbox/dosbox-0.74/src/cpu'
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/usr/local/cross-tools/i686-w64-mingw32/include/SDL -D_GNU_SOURCE=1 -Dmain=SDL_main -g -O2 -MT callback.o -MD -MP -MF .deps/callback.Tpo -c -o callback.o callback.cpp
In file included from ../../include/dosbox.h:24:0,
from callback.cpp:24:
../../config.h:270:4: error: #error "sizeof (unsigned char) != 1"
../../config.h:277:4: error: #error "sizeof (unsigned short) != 2"
../../config.h:290:4: error: #error "can't find sizeof(type) of 4 bytes!"
../../config.h:300:4: error: #error "can't find data type of 8 bytes"
../../config.h:307:11: error: 'Bit64u' does not name a type
../../config.h:308:11: error: 'Bit64s' does not name a type

There are a total of 570 lines like this. Attached is the config.log from 0.74.

Still appears I'm trying to do something 64 bit. But I dunno why. Any suggestions appreciated.

Reply 10 of 11, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

judging from the config.log all test programs fail because the linker can't find the SDL files. (so it can find the header files, but not the libraries)
Are you sure your libsdl is installed correctly ? what does sdl-config tell you (try all options and see if there are files at the pointed locations)

Water flows down the stream
How to ask questions the smart way!

Reply 11 of 11, by Rottweiler

User metadata
Rank Newbie
Rank
Newbie

Are you sure your libsdl is installed correctly ? what does sdl-config tell you (try all options and see if there are files at the pointed locations)

Apologies, I'm obviously missing something really basic as I have no idea what it means to "install" libsdl. The instructions for building DOSBox wrt SDL simply says

DOSBox uses SDL ... so you'll need to download it as well. Grab the latest source ... and extract to a separate directory.

And I'm not finding anything at the libsdl site with respect to "installing" it.

When I run sdl-config it just gives usage options and exits. I have no idea what it is actually for or how to use it.

$ ./sdl-config
Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]

But I seem to have worked my way past the sdl problems that were stopping './configure' from running and am now working on 'make' errors like these:

make[4]: Entering directory `/c/dev/dosbox/dosbox-0.74/src/cpu' g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/usr/local/cr […]
Show full quote

make[4]: Entering directory `/c/dev/dosbox/dosbox-0.74/src/cpu'
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/usr/local/cross-tools/i686-w64-mingw32/include/SDL -D_GNU_SOURCE=1 -Dmain=SDL_main -g -O2 -MT callback.o -MD -MP -MF .deps/callback.Tpo -c -o callback.o callback.cpp
In file included from ../../include/dosbox.h:24:0,
from callback.cpp:24:
../../config.h:270:4: error: #error "sizeof (unsigned char) != 1"

It's not obvious to me that this has anything to do with libsdl. But I'd be grateful for any education on the subject.