Skip to contentSkip to conversation

Dosemu 1.3.2 and linux 2.6.7 headers

DISCUSSION Hufnus 4 participants 10 messages Jul 12, 2005 – Jul 13, 2005

lore
Share & tools
lore

Hufnus

author
#0 lore raw

Anybody runing 1.3.2 or trying with Linux 2.6 ????

I can compile 1.3.2 with gcc 3.3.4 and Linux 2.4 headers, and run it on Linux 2.6.7, but it has some keyboard press problems. The same dosemu.bin works fine with our apps in 2.4.31, though!

So I tried to compile with Linux 2.6.7 headers, but the make gets some obsolete warnings and then fails with many parse errors in /usr/include/linux/mod_devicetable.h related to symbols like __u32 etc....

Now, if I relink 'ln -sf linux-2.4.31 linux' it still complains about using -malign-????? is obsolete to use -falign-????? but it builds fine.

Thanks
TonyB

--
__ __ _ I N C. http://www.sysdev.org

/ __|\\// __||  \  __   __          /         [email protected]
\__ \ \/\__ \||)|/ O_)\/ /        \/  System Tools / Utilities
|___/ || ___/|_ /\___|\_/        WIntel / Linux Device Drivers
#1 lore raw
Quoted 7 lines · Hufnus

Anybody runing 1.3.2 or trying with Linux 2.6 ????

I can compile 1.3.2 with gcc 3.3.4 and Linux 2.4 headers, and run it on Linux 2.6.7, but it has some keyboard press problems. The same dosemu.bin works fine with our apps in 2.4.31, though!

Quoted 9 lines

So I tried to compile with Linux 2.6.7 headers, but the make gets some obsolete warnings and then fails with many parse errors in /usr/include/linux/mod_devicetable.h related to symbols like __u32 etc....

Now, if I relink 'ln -sf linux-2.4.31 linux' it still complains about using -malign-????? is obsolete to use -falign-????? but it builds fine.

I run it on 2.6.12 from kernel.org, just linked ln -s /usr/src/linux-2.6.12 /usr/src/linux
I had similar problems when compiling with different headers than running kernel, and also enabling additional optimizations to gcc also gave compilation errors, so i used pure 1.3.2 without my modifications and 2.6.12 form kernel.org and it works for me.

oh.... sorry i forgot, i had to insert "#include <linux/types.h>" in some places... but i don't remember where, also

# diff /usr/src/linux/include/linux/mod_devicetable.h /usr/src/linux/include/linux/mod_devicetable.h_bak
10,12d9
< #include <linux/types.h>
<
< //#ifdef __KERNEL__
13a11,13
Quoted 3 lines

#ifdef __KERNEL__
#include <linux/types.h>

15c15
< //#endif
---

Quoted 1 line

#endif

simply hashed the __KERNEL__ variable and always included <linux/types.h> there

i dont really remember what was the real problem, but first try to modify the mod_devicetable.h

Maciek Stopa

author
#2 lore raw
In reply to Hufnus
Quoted 10 lines · On Tue, 12 Jul 2005 12:07:21 -0800 Hufnus <[email protected]> wrote:

Anybody runing 1.3.2 or trying with Linux 2.6 ????

So I tried to compile with Linux 2.6.7 headers, but the make gets some obsolete warnings and then fails with many parse errors in /usr/include/linux/mod_devicetable.h related to symbols like __u32 etc....

Now, if I relink 'ln -sf linux-2.4.31 linux' it still complains about using -malign-????? is obsolete to use -falign-????? but it builds fine.

I know I am using Skackware's default symbolic link /usr/include/linux -> /usr/src/linux-2.6.7/include/linux !!!

My question is what should I do ....

Delete the link?
Copy that directory over to /usr/include/linux?
or what???

Thanks
TonyB

--
__ __ _ I N C. http://www.sysdev.org

/ __|\\// __||  \  __   __          /         [email protected]
\__ \ \/\__ \||)|/ O_)\/ /        \/  System Tools / Utilities
|___/ || ___/|_ /\___|\_/        WIntel / Linux Device Drivers
#3 lore raw
Quoted 18 lines · Hufnus
Quoted 12 lines · On Tue, 12 Jul 2005 12:07:21 -0800 Hufnus <[email protected]> wrote:

Anybody runing 1.3.2 or trying with Linux 2.6 ????

So I tried to compile with Linux 2.6.7 headers, but the make gets some obsolete warnings and then fails with many parse errors in /usr/include/linux/mod_devicetable.h related to symbols like __u32 etc....

Now, if I relink 'ln -sf linux-2.4.31 linux' it still complains about using -malign-????? is obsolete to use -falign-????? but it builds fine.

Quoted 12 lines

I know I am using Skackware's default symbolic link /usr/include/linux -> /usr/src/linux-2.6.7/include/linux !!!

My question is what should I do ....

Delete the link?
Copy that directory over to /usr/include/linux?
or what???

leave the link, and try to comment those lines in /usr/include/linux/mod_devicetable.h or simply add #include <linux/types.h> there, because compiler doesn't recognize data types.

Quoted 12 lines

--

 __      __  _     I N C.               http://www.sysdev.org
/ __|\\// __||  \  __   __          /         [email protected]
\__ \ \/\__ \||)|/ O_)\/ /        \/  System Tools / Utilities
|___/ || ___/|_ /\___|\_/        WIntel / Linux Device Drivers

-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 1 line
"EVIL is just LIVE spelled backwards"
author
#4 lore raw
Quoted 9 lines · On Tue, 12 Jul 2005 22:58:32 +0200 Maciek Stopa <[email protected]> wrote:
Quoted 7 lines · Hufnus

On Tue, 12 Jul 2005 12:07:21 -0800

Quoted 4 lines

So I tried to compile with Linux 2.6.7 headers, but the make gets some obsolete warnings and then fails with many parse errors in /usr/include/linux/mod_devicetable.h related to symbols like __u32 etc....

Quoted 4 lines

leave the link, and try to comment those lines in /usr/include/linux/mod_devicetable.h or simply add #include <linux/types.h> there, because compiler doesn't recognize data types.

Let me play with adding <linux/types.h> tonight and see if build finishes. I am running 2.6.12.2 also, except I am building for an embedded system running 2.6.7

Thanks for the pointer
TonyB

--
__ __ _ I N C. http://www.sysdev.org

/ __|\\// __||  \  __   __          /         [email protected]
\__ \ \/\__ \||)|/ O_)\/ /        \/  System Tools / Utilities
|___/ || ___/|_ /\___|\_/        WIntel / Linux Device Drivers
#5 lore raw
In reply to Hufnus
Quoted 10 lines · Hufnus
Quoted 7 lines · On Tue, 12 Jul 2005 12:07:21 -0800 Hufnus <[email protected]> wrote:

Anybody runing 1.3.2 or trying with Linux 2.6 ????

So I tried to compile with Linux 2.6.7 headers, but the make gets some obsolete warnings and then fails with many parse errors in /usr/include/linux/mod_devicetable.h related to symbols like __u32 etc....

Quoted 6 lines
Quoted 3 lines

Now, if I relink 'ln -sf linux-2.4.31 linux' it still complains about using -malign-????? is obsolete to use -falign-????? but it builds fine.

I know I am using Skackware's default symbolic link /usr/include/linux -> /usr/src/linux-2.6.7/include/linux !!!

This is not its default symbolic link. You must have created it yourself, manually.

Quoted 3 lines

My question is what should I do ....

Delete the link?

yes!

Quoted 1 line

Copy that directory over to /usr/include/linux?

no!

Quoted 1 line

or what???

I've go a deja vu feeling here, this has been discussed before.
You need to install Slackware's kernel-headers package (it's in the d
series, over here for instance:
ftp://ftp.slackware.com/pub/slackware/slackware-current/slackware/d/kernel-headers-2.4.31-i386-1.tgz They contain sanitized 2.4.31 headers that were used to compile
glibc, and that is what user space (incl dosemu) sometimes sees
indirectly.

Just don't mess with /usr/include/linux, unless you really know what you are doing and are willing to recompile glibc.

Bart

#6 lore raw
Quoted 2 lines · Bart Oldeman

This is not its default symbolic link. You must have created it yourself, manually.

I had a problem with compiling Dosemu on Slackware also at some point. That symlink turned out to be the problem. I believe Stas Sergeev pointed me at it. It hadn't created the symlink myself either, so it seems there are instances where that link is somehow created automaticly on Slackware.

Removing the symlink and installing the proper version of the kernel headers that came with the version fixes all the problems.

Julius

author
#7 lore raw
In reply to Bart Oldeman
Quoted 32 lines · On Wed, 13 Jul 2005 11:35:03 +1200 (NZST) Bart Oldeman…
Quoted 10 lines · Hufnus
Quoted 7 lines · On Tue, 12 Jul 2005 12:07:21 -0800 Hufnus <[email protected]> wrote:

Anybody runing 1.3.2 or trying with Linux 2.6 ????

So I tried to compile with Linux 2.6.7 headers, but the make gets some obsolete warnings and then fails with many parse errors in /usr/include/linux/mod_devicetable.h related to symbols like__u32 etc....

Quoted 6 lines
Quoted 3 lines

Now, if I relink 'ln -sf linux-2.4.31 linux' it still complains about using -malign-????? is obsolete to use -falign-????? but it builds fine.

I know I am using Skackware's default symbolic link /usr/include/linux -> /usr/src/linux-2.6.7/include/linux !!!

This is not its default symbolic link. You must have created it yourself, manually.

Quoted 2 lines

My question is what should I do ....

I've go a deja vu feeling here, this has been discussed before.
You need to install Slackware's kernel-headers package (it's in the
d series, over here for instance:
ftp://ftp.slackware.com/pub/slackware/slackware-current/slackware/d/kernel-headers-2.4.31-i386-1.tgz They contain sanitized 2.4.31 headers that were used to compile
glibc, and that is what user space (incl dosemu) sometimes sees
indirectly.

Quoted 4 lines

Just don't mess with /usr/include/linux, unless you really know what you are doing and are willing to recompile glibc.

Bart

Looking at those kernel headers vs the kernel distribution ones, I guess that should work. Unfortunately I am usually in a higher kernel than Slackware-current is, so always get in trouble.

Looking at /usr/include/linux headers, I think there is a bug in <linux/pci.h>. It #includes <linux/mod_devicetable.h>, at the top and outside of an #ifdef __KERNEL__ which is located further down, where #include <linux/types.h> is also present. It seems to me that inside the #ifdef __KERNEL__ is where it should be placed.

I tested just modifying <linux pci.h>, rather than having to modify /usr/include/linux/mod_devicetable.h and dosemu's src/emu.c to add the types.h and make it compile correctly and it worked too!

Maybe the kernel guys will pick that change up, if it carries no other implications ...

TonyB

--
__ __ _ I N C. http://www.sysdev.org

/ __|\\// __||  \  __   __          /         [email protected]
\__ \ \/\__ \||)|/ O_)\/ /        \/  System Tools / Utilities
|___/ || ___/|_ /\___|\_/        WIntel / Linux Device Drivers
#8 lore raw
Quoted 3 lines · Hufnus

Looking at those kernel headers vs the kernel distribution ones, I guess that should work. Unfortunately I am usually in a higher kernel than Slackware-current is, so always get in trouble.

Yes, but the deal is: that should not matter! In Slackware you should install kernel-headers-2.4.31 no matter what (independent of!) the kernel you happen to be running at any time, whether 2.2.22, 2.4.31, 2.4.32, 2.6.7 or 2.6.12. At least as long as you don't recompile glibc.

Quoted 5 lines

Looking at /usr/include/linux headers, I think there is a bug in <linux/pci.h>. It #includes <linux/mod_devicetable.h>, at the top and outside of an #ifdef __KERNEL__ which is located further down, where #include <linux/types.h> is also present. It seems to me that inside the #ifdef __KERNEL__ is where it should be placed.

No, those are not the /usr/include/linux headers, the ones you are talking about are those in include/linux in the kernel source code.

Quoted 2 lines

Maybe the kernel guys will pick that change up, if it carries no other implications ...

they won't, as they know that include/linux headers are broken beyond repair for user space inclusion.

see here:
http://lkml.org/lkml/2005/5/3/173

Bart

author
#9 lore raw
Quoted 8 lines · On Wed, 13 Jul 2005 13:44:33 +1200 (NZST) Bart Oldeman…

No, those are not the /usr/include/linux headers, the ones you are talking about are those in include/linux in the kernel source code.

Quoted 2 lines

Maybe the kernel guys will pick that change up, if it carries no other implications ...

they won't, as they know that include/linux headers are broken beyond repair for user space inclusion.

Thanks, I found the latest official linux-libc-headers at:

http://ep09.pld-linux.org/~mmazur/linux-libc-headers/

TonyB

--
__ __ _ I N C. http://www.sysdev.org

/ __|\\// __||  \  __   __          /         [email protected]
\__ \ \/\__ \||)|/ O_)\/ /        \/  System Tools / Utilities
|___/ || ___/|_ /\___|\_/        WIntel / Linux Device Drivers