VOGONS

Common searches


First post, by ahaning

User metadata
Rank Newbie
Rank
Newbie

Hello.

I'm trying to build DOSBox 0.73 on Linux 2.6.29.1, Slackware 11 and gcc 3.4.6. I'm running into an error that I've been so far unable to solve. The build stops with:

g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -g -O2 -MT cdrom_ioctl_linux.o -MD -MP -MF .deps/cdrom_ioctl_linux.Tpo -c -o cdrom_ioctl_linux.o cdrom_ioctl_linux.cpp
In file included from /usr/include/linux/byteorder/little_endian.h:12,
from /usr/include/asm/byteorder.h:65,
from /usr/include/linux/cdrom.h:15,
from cdrom_ioctl_linux.cpp:27:
/usr/include/linux/swab.h:6:22: asm/swab.h: No such file or directory
make[3]: *** [cdrom_ioctl_linux.o] Error 1
make[3]: Leaving directory `/usr/src/dosbox-0.73/src/dos'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/dosbox-0.73/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/dosbox-0.73'
make: *** [all] Error 2

What confuses me is that, after some symlinking, asm/swab.h does exist:

-rw-rw-r-- 1 root root 1214 2009-04-02 16:55 /usr/include/linux/asm/swab.h

Maybe this is the wrong version or my symlinks are still hosed?

Prior to building DOSBox, I unpacked the kernel and confirmed that it would build successfully. My /usr/include/linux is a symlink to my kernel source:

lrwxrwxrwx 1 root root 37 2009-05-28 02:31 linux -> /usr/src/linux-2.6.29.1/include/linux

I've tried making symlinks within my kernel source tree but

1) I tend to get confused about which swab.h and asm directories it is looking at out of the ~3000 available that all seem to link to each other like spaghetti.
2) Last time I did it, my kernel wouldn't build afterward due to so many out-of-whack symlinks.

From what little I can find on the web about this, there seem to be some other packages that have produced similar errors, but not lots of chatter about it, so maybe I'm alone? Any ideas on getting a successful build? Thanks! (Edit: Whoops. DOSBox 0.73, not 7.3)

Update: When I downloaded the latest Linux-2.4.37.1 and linked /usr/include/linux to /usr/src/linux-2.4.37.1/include/linux, and reran make to continue my build, the build completed successfully and I'm able to play Lemmings successfully. Any chance DOSBox could be made to build with Linux-2.6.29?

Update2: Heh, sound now works in Lemmings and Scream Tracker 3 since I plugged in my speakers :-|. So far, I'm very impressed! Alt-Enter even worked on Linux for Lemmings full-screen. It's just a little choppier than playing it in native FreeDOS but maybe it can be sped up with some tweaking. Well Done and Thanks!

Update3: I resolved my problem by making symlinks in /usr/include to the asm and asm-generic directories in my kernel source include directories. So:

ahaning@box:/usr/include$ ls -l asm asm-generic
lrwxrwxrwx 1 root root 41 2009-05-29 21:34 asm -> /usr/src/linux-2.6.29.1/include/linux/asm/
lrwxrwxrwx 1 root root 44 2009-05-29 21:48 asm-generic -> /usr/src/linux-2.6.29.1/include/asm-generic//

Last edited by ahaning on 2009-05-30, 02:36. Edited 1 time in total.

Reply 1 of 5, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

the error originates from
/usr/include/linux/cdrom.h:15,
which isn't a dosbox header. So DOSBox would probably compile fine. Somehow your own kernel/libc headers are broken.

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

Reply 2 of 5, by grete

User metadata
Rank Newbie
Rank
Newbie

when i was compiling dosbox 0.72 on slackware 12.2,
i needed to get myself a patch from the debian site.
Even if you have slackware 11, you may browse the
debian diffs if something fits your problem.

Reply 5 of 5, by ahaning

User metadata
Rank Newbie
Rank
Newbie
Qbix wrote:

the error originates from
/usr/include/linux/cdrom.h:15,
which isn't a dosbox header. So DOSBox would probably compile fine. Somehow your own kernel/libc headers are broken.

Thanks. I was misunderstanding the compiler errors. From:

/usr/include/linux/swab.h:6:22: asm/swab.h: No such file or directory

I thought it meant that /usr/include/linux/asm/swab.h could not be found. However, it means that /usr/include/asm/swab.h could not be found.

I made symlinks in /usr/include to the asm and asm-generic in my kernel source and DOSBox-0.73 compiled fine on Linux 2.6.29.1

Again, nice work!