Skip to contentSkip to conversation

Problems with 2.5.*'s SCSI headers and cdrtools

PATCH Sahara Workshop 4 participants 8 messages Feb 14, 2003

lore
Share & tools
lore
#0 lore raw

Kernel 2.5.5x (have not tried earlier) and 2.5.60 's scsi/scsi.h do not have like in 2.4 the 'include <features.h>', or as it may seem to need an 'include <types.h>', and thus cdrtools for one do not compile.

The take I get on this from Jorg is that he feels its a problem kernel side. Comments ?

Attached is a patch that get cdrtools-2.01a2 to compile.

Regards,

Signature · 23 lines
Martin Schlemmer
Gentoo Linux Developer, Desktop Team
Cape Town, South Africa



-  PLEASE NOTE -

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager. Please note that any views or opinions presented
in this email are solely those of the author and do not necessarily
represent those of Sahara Distribution (Pty) Ltd. Finally, while Sahara
Distribution attempts to ensure that all email is virus-free, Sahara
Distribution accepts no liability for any damage caused by any virus
transmitted by this email.

Sahara Distribution (PTY) Ltd
Unit G5-G12, Centurion Business Park, Milnerton, Cape Town, South Africa
Private Bag X180, Halfway House, 1685, South Africa

Scanned and protected by Sistech Viruswall 2.3
libscg/scsi-linux-sg.c renamed from libscg/scsi-linux-sg.c.orig +5 -0
@@ -66,6 +66,11 @@
 #if LINUX_VERSION_CODE >= 0x01031a /* <linux/scsi.h> introduced in 1.3.26 */
 #if LINUX_VERSION_CODE >= 0x020000 /* <scsi/scsi.h> introduced somewhere. */
 /* Need to fine tune the ifdef so we get the transition point right. */
+#if LINUX_VERSION_CODE >= 0x020500 /* 2.5.x breaks things again */
+#define __KERNEL__
+#include <asm/types.h>
+#undef __KERNEL__
+#endif
 #include <scsi/scsi.h>
 #else
 #include <linux/scsi.h>
#1 lore raw
Quoted 8 lines · Sahara Workshop

Kernel 2.5.5x (have not tried earlier) and 2.5.60 's scsi/scsi.h do not have like in 2.4 the 'include <features.h>', or as it may seem to need an 'include <types.h>', and thus cdrtools for one do not compile.

The take I get on this from Jorg is that he feels its a problem kernel side. Comments ?

The problem is in cdrtools. It should not include kernel headers.

Quoted 9 lines

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Sahara Distribution (Pty) Ltd. Finally, while Sahara Distribution attempts to ensure that all email is virus-free, Sahara Distribution accepts no liability for any damage caused by any virus transmitted by this email.

Blah. You sent this mail to a public list so this statement is void.

#2 lore raw
Quoted 5 lines · Christoph Hellwig
Quoted 2 lines

The take I get on this from Jorg is that he feels its a problem kernel side. Comments ?

The problem is in cdrtools. It should not include kernel headers.

Ok, so what should it include ?

Quoted 3 lines

Blah. You sent this mail to a public list so this statement is void.

Yeah, yeah, just disregard. LKML is too high traffic for my home 56.6k dialup, so have to subscribe at work, and the stupid MTA/virus scanner adds that by default.

Regards,

Signature · 3 lines
Martin Schlemmer
Gentoo Linux Developer, Desktop Team
Cape Town, South Africa
#3 lore raw
Quoted 4 lines · Martin Schlemmer
Quoted 2 lines

The problem is in cdrtools. It should not include kernel headers.

Ok, so what should it include ?

Glibc's <scsi/scsi.h>

#4 lore raw
Quoted 1 line · Christoph Hellwig

Glibc's <scsi/scsi.h>

If you looked at the patch, you would have seen that it does include 'scsi/scsi.h', but I'm guessing its changing the search order of includes then. Ill have a look.

Signature · 21 lines
Sahara Workshop <[email protected]>



-  PLEASE NOTE -

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager. Please note that any views or opinions presented
in this email are solely those of the author and do not necessarily
represent those of Sahara Distribution (Pty) Ltd. Finally, while Sahara
Distribution attempts to ensure that all email is virus-free, Sahara
Distribution accepts no liability for any damage caused by any virus
transmitted by this email.

Sahara Distribution (PTY) Ltd
Unit G5-G12, Centurion Business Park, Milnerton, Cape Town, South Africa
Private Bag X180, Halfway House, 1685, South Africa

Scanned and protected by Sistech Viruswall 2.3
#5 lore raw
Quoted 6 lines · Sahara Workshop
Quoted 1 line

Glibc's <scsi/scsi.h>

If you looked at the patch, you would have seen that it does include 'scsi/scsi.h', but I'm guessing its changing the search order of includes then. Ill have a look.

Either your distributions setup is broken and overwrites /usr/include/scsi/scsi.h (check whether it has the FSF copyright, they took the kernel header verbatim and just slapped their copyright boilerplate over it..) or cdrtools is broken enough to explicitly add the kernel source to it's include dirs. Both would need fixing, the first is easy, the second needs conviencing Joerg which might become difficult :)

#6 lore raw
Quoted 8 lines · Christoph Hellwig

Either your distributions setup is broken and overwrites /usr/include/scsi/scsi.h (check whether it has the FSF copyright, they took the kernel header verbatim and just slapped their copyright boilerplate over it..) or cdrtools is broken enough to explicitly add the kernel source to it's include dirs. Both would need fixing, the first is easy, the second needs conviencing Joerg which might become difficult :)

Thanks. Ill look into this, and also check with Joerg why it have to use the current kernel headers if it is what its doing. I just basically wanted the opinion of what should be the right way to handle it before I submit a bug report to the correct people.

Are scsi stuff in 2.5 going to change drastically in the future ?

Regards,

Signature · 3 lines
Martin Schlemmer
Gentoo Linux Developer, Desktop Team
Cape Town, South Africa
#7 lore raw
In reply to Sahara Workshop
Quoted 10 lines · Sahara Workshop

Kernel 2.5.5x (have not tried earlier) and 2.5.60 's scsi/scsi.h do not have like in 2.4 the 'include <features.h>', or as it may seem to need an 'include <types.h>', and thus cdrtools for one do not compile.

The take I get on this from Jorg is that he feels its a problem kernel side. Comments ?

Attached is a patch that get cdrtools-2.01a2 to compile.

Good heavens that's ugly, shouldn't you be using userland header files and not the ones from 'Kernel du jour'? Is your /usr/include/linux pointing to your current kernel? If that's the case.. don't do that.

What were Joerg's justifications again?

Zwane

Aside: Are Sahara shipping computers with bleeding edge Linux configurations? ;)

Signature · 1 line
function.linuxpower.ca