VOGONS


First post, by mr_bigmouth_502

User metadata
Rank Oldbie
Rank
Oldbie

I just recently wiped my laptop and installed Linux Mint, since I was getting absolutely sick of Windows 7, and I couldn't get XP to work properly. 🤣 So far it's been freaking awesome, probably the best Linux distro I've ever used next to Crunchbang. I installed DosBox from the Software Manager, and it works fine, but then I loaded Carmageddon and I realized that I'm running a 64-bit build of DosBox, as evidenced by the infamous verticle line glitch.

How would I build DosBox in such a way that I end up with a 32bit version rather than a 64bit version? Normally when I have to compile programs, I just do the whole "./configure, make, make install" thing, but I know that compiling DosBox is a bit more involved, especially when it comes to creating a 32bit build on a 64bit OS.

Reply 1 of 15, by mr_bigmouth_502

User metadata
Rank Oldbie
Rank
Oldbie

I also tried compiling the source that came with the GoG version of Carmageddon, and it gave me this error about being unable to find libSDL_sound, despite the fact that I installed it in Synaptic. It shouldn't be an issue, since I know that the normal build of DosBox that I can get from the software center works fine, aside from the vertical lines in Carmageddon if I use the 64 bit version, and the lack of music in either version if I mount the "GAME.DAT" (which is really a cuesheet) file.

Reply 2 of 15, by dougdahl

User metadata
Rank Member
Rank
Member

I'm afraid I don't know what the switches are to compile 32-bit in 64 or else I'd tell you.

I presume that you have the libSDL_sound dev package needed for compiling installed, so I suspect that the compiler may be looking for the 32-bit version instead and not finding it.
The problem is that since you're using Mint which is based on Ubuntu, which I've heard isn't as good as other distros about allowing people to have 32-bit libraries co-exist with the 64 bit versions.

As far as I can tell you will need to install a package called ia32-libs (and probably ia32libs-multiarch) and the 32 bit version of libSDL_sound and the dev package.

-----
As an aside, have you tried from a terminal
dpkg --add-architecture i386
apt-get install dosbox:i386
(both of which will probably have to be run as sudo if you can't log in as root)
That might be a way for you to easily get the 32-bit package of dosbox
if it works, but you'll probably need to remove the 64-bit version first.
(I've never tried this myself as I've always used a 32-bit distro of Ubuntu and Mint on my 64 bit system, so no guarantees that there won't be any problems.)

Reply 4 of 15, by mr_bigmouth_502

User metadata
Rank Oldbie
Rank
Oldbie
Pickle wrote:

to compile a 32 bit build with 64 bit compilier add -m32 to the CC flags and to the LD flags.

How would I do that? I'm a Linux n00b. 🤣

Reply 5 of 15, by mr_bigmouth_502

User metadata
Rank Oldbie
Rank
Oldbie
dougdahl wrote:
I'm afraid I don't know what the switches are to compile 32-bit in 64 or else I'd tell you. […]
Show full quote

I'm afraid I don't know what the switches are to compile 32-bit in 64 or else I'd tell you.

I presume that you have the libSDL_sound dev package needed for compiling installed, so I suspect that the compiler may be looking for the 32-bit version instead and not finding it.
The problem is that since you're using Mint which is based on Ubuntu, which I've heard isn't as good as other distros about allowing people to have 32-bit libraries co-exist with the 64 bit versions.

As far as I can tell you will need to install a package called ia32-libs (and probably ia32libs-multiarch) and the 32 bit version of libSDL_sound and the dev package.

-----
As an aside, have you tried from a terminal
dpkg --add-architecture i386
apt-get install dosbox:i386
(both of which will probably have to be run as sudo if you can't log in as root)
That might be a way for you to easily get the 32-bit package of dosbox
if it works, but you'll probably need to remove the 64-bit version first.
(I've never tried this myself as I've always used a 32-bit distro of Ubuntu and Mint on my 64 bit system, so no guarantees that there won't be any problems.)

I already installed the normal 32-bit build of DosBox from the software center, but it doesn't support cuesheets which refer to ogg files (like the ones used by the GoG release of Carmageddon).

Just to make things easier for everybody, here's my ./configure output, even after installing ia32-libs

checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/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.out
checking for suffix of executables...
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... /usr/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... 8
checking size of unsigned long long... 8
checking size of int *... 8
checking for stdlib.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/socket.h... yes
checking for netinet/in.h... yes
checking for pwd.h... yes
checking if environ can be included... yes
checking if environ can be linked... yes
checking if dirent includes d_type... yes
checking for powf in libm... yes
checking if compiler allows __attribute__... yes
Show last 73 lines
checking if compiler allows __attribute__((always_inline)) ... no
checking if compiler allows __attribute__((fastcall)) ... no
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... found.
checking for snd_ctl_open in -lasound... yes
checking whether byte ordering is bigendian... no
checking for target cpu type... x86-64 bit compatible
checking whether x86 dynamic cpu core will be enabled... no
checking whether recompiling cpu core will be enabled... yes
checking whether fpu emulation will be enabled... yes
checking whether x86 assembly fpu core will be enabled... no
checking whether to enable unaligned memory access... yes
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
checking for png_get_io_ptr in -lpng... yes
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... yes
checking for main in -lX11... no
checking X11/XKBlib.h usability... yes
checking X11/XKBlib.h presence... yes
checking for X11/XKBlib.h... yes
checking for XKBlib support... no
checking for main in -lGL... no
checking for main in -lopengl32... no
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... no
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... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking for mprotect... no
checking for setpriority support... no
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: config.h is unchanged
config.status: executing depfiles commands

Reply 6 of 15, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

For cue files with ogg/mp3 you need libsdl_sound (or sdl_sound) in both dev and normal

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 7 of 15, by mr_bigmouth_502

User metadata
Rank Oldbie
Rank
Oldbie
Dominus wrote:

For cue files with ogg/mp3 you need libsdl_sound (or sdl_sound) in both dev and normal

I already have those installed, at least the 64-bit versions. I'm guessing that I'll have to install the 32-bit versions?

EDIT: just found out how to install the 32bit version of libsdl-sound1.2. For some reason it decided to remove a bunch of important packages as well, including my window manager! 😳 I only found out about this after I pressed Y. 🤣

Reply 8 of 15, by mr_bigmouth_502

User metadata
Rank Oldbie
Rank
Oldbie

Well, it looks like the 64bit and 32bit packages can't coexist on the same system, which is fucking stupid if you ask me. I'm going to install Crunchbang, or maybe even *bleh* Windows 7. 🤣

EDIT: is there any way for me to force libsdl-sound1.2-dev:i386 to install WITHOUT removing most of the packages on my system? Every time I try to install it it nearly fucks over my system and I have to reinstall every package it removes.

Reply 9 of 15, by dougdahl

User metadata
Rank Member
Rank
Member

Theoretically, you could use dpkg and the --force-depends option to force the install of a .deb file, but it can be a very, very dangerous thing to do. And should definitely not be done lightly. As in potentially breaking your system, or anything that depends on the package that is being replaced. On Ubuntu, I've NEVER used this command, and on Fedora the very few times I've used the equivalent it has been done only for very minor files, and even then with a lot of concern. (And if I were reckless enough to try this, probably remove the file immediately after compiling just to make sure it doesn't cause problems down the line)
And as the dev library lacks the libsdl-sound, libsdl-dev, and pretty much most of their dependencies' 32 bit versions, dosbox might not compile, or might not work right even if you do manage to compile it.

WARNING
If you do this, do not blame me if, or much more likely when, something goes wrong with your system.

Personally, I'd be tempted to try setting up a bootable USB with a 32-bit distro of Mint if you only needed the 32-bit version of dosbox just for Carmaggedon. Though you'd probably want to put as many of the files, espcially the game files, on the hard drive instead of the USB drive as the system can be a little slow if it needs to load files on USB.
Though I've had problems using more recent versions of Mint with certain usb creators, and think that I had to use UNetbootin to create a persistent image.

Reply 10 of 15, by NY00123

User metadata
Rank Member
Rank
Member

What I know:

1. Many packages were converted for multiarch, meaning that, at least for specific versions of various Linux distros (say Ubuntu 12.10 and up), you can install the 64-bit and 32-bit variants of such packages, side-by-side, with no conflict. For instance, this can be done with the libsdl-sound1.2 package beginning from Ubuntu 12.10. I have no idea in regards to the development packages, though.
2. While much less user friendly in a way, when I do want to build a 32-bit executable while using the current 64-bit environment, I'm using a 32-bit chroot. If you go that path, it is really better that you know what you're doing, at least sometimes, if you don't want your current setup to get messed up (say, if you want to share the home dir with the 32-bit chroot).

Reply 11 of 15, by mr_bigmouth_502

User metadata
Rank Oldbie
Rank
Oldbie

I already tried setting up a 32-bit chroot according to some guides I found online, but I could never get them to work properly, so what I'm going to do instead is copy over my 32-bit Crunchbang virtual machine from my main box, and use it to compile a static binary with the 32-bit SDL libs included.

Speaking of which, how would I go about doing this? I know I'm kind of opening up another can of worms here, but I just want to be able to seamlessly run Carmageddon alongside my other programs, without rebooting. 🤣 I could also just run it from within the VM, but that would probably reduce performance.

Reply 12 of 15, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

I'm doing this for my OS X snapshots.
You will have to make a prefix ONLY for 32bit libraries and binaries.
For example /opt/32
Now begin with the autotools (automake, autoconf),, libtool, pkgconfig. Download their releases, unpack, run ./configure --help and look at the options, definitely use --prefix=/opt/32, set cflags, lfflags correctly to only use this prefix, put the prefix in front of your path and so on.
Look at recent posts by me and emendelson to see how I do that and you can start 😉

Edit: for example this post Building under OS X and Xcode 5.0
You don't have sdk and other mac specific stuff, also instead of arch i386, you have to use -m32 I think.

AND this is all theory, I didn't try this on linux but at least it should get you started 😉

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 13 of 15, by mr_bigmouth_502

User metadata
Rank Oldbie
Rank
Oldbie
Dominus wrote:
I'm doing this for my OS X snapshots. You will have to make a prefix ONLY for 32bit libraries and binaries. For example /opt/32 […]
Show full quote

I'm doing this for my OS X snapshots.
You will have to make a prefix ONLY for 32bit libraries and binaries.
For example /opt/32
Now begin with the autotools (automake, autoconf),, libtool, pkgconfig. Download their releases, unpack, run ./configure --help and look at the options, definitely use --prefix=/opt/32, set cflags, lfflags correctly to only use this prefix, put the prefix in front of your path and so on.
Look at recent posts by me and emendelson to see how I do that and you can start 😉

Edit: for example this post Building under OS X and Xcode 5.0
You don't have sdk and other mac specific stuff, also instead of arch i386, you have to use -m32 I think.

AND this is all theory, I didn't try this on linux but at least it should get you started 😉

how do I specify -m32?

Reply 14 of 15, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

See what I linked and then "instead of arch i386 use -m32" should make sense...

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 15 of 15, by mr_bigmouth_502

User metadata
Rank Oldbie
Rank
Oldbie

So I just copied over my 32-bit Crunchbang virtual machine, and I've gotten the libraries I need to compile DosBox installed, but I still can't figure out how to point it towards my libsdl-sound1.2 library. Keep in mind, this is under a 32-bit environment, so having coexisting 32 and 64-bit libraries shouldn't be an issue.

I just want to know what exact files I need to edit, where those files can be located, how I'm supposed to edit them, and where I need to place certain files.

EDIT: Mark this as solved, since I just found another solution to my problem. 😁 Converting .DAT/.GOG/.OGG to .BIN/.CUE