public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* BUG in Linux 2.6.16/2.6.16.1 (compilation failure of third party software)
@ 2006-03-28 18:29 Thierry Godefroy
  2006-03-28 22:51 ` Lee Revell
  0 siblings, 1 reply; 6+ messages in thread
From: Thierry Godefroy @ 2006-03-28 18:29 UTC (permalink / raw)
  To: linux-kernel

Paragon_NTFS_3.x.v5.1 fails to compile (with gcc v3.4.3) with the following
errors:

gcc -DMODULE  -fshort-wchar  -DUFSD_NTFS=1 -DUFSD_NTFS_SECURITY -DUFSD_NTFS_OBJECTID -DUFSD_NTFS_WRITE_ENABLE -DNDEBUG -DUFSD_DEVICE=ufsd -DUFSD_READONLY=0 -DKBUILD_BASENAME=_ufsdvfs_ -include fs_conf.h -pipe -Wall -fno-exceptions -Wno-multichar -Wstrict-prototypes -Wno-unknown-pragmas -mpreferred-stack-boundary=2 -march=k8 -I /usr/src/linux/include/asm/mach-default -g0 -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common    -c -I /usr/src/linux/include -I "/include" -I/include ufsdvfs.c -o objfre/vfs/ufsdvfs.o
In file included from /usr/src/linux/include/linux/rwsem.h:27,
                 from /usr/src/linux/include/asm/semaphore.h:42,
                 from /usr/src/linux/include/linux/sched.h:20,
                 from /usr/src/linux/include/linux/module.h:10,
                 from ufsdvfs.c:30:
/usr/src/linux/include/asm/rwsem.h: In function `__down_read':
/usr/src/linux/include/asm/rwsem.h:105: error: syntax error before "_ufsdvfs_"
/usr/src/linux/include/asm/rwsem.h: In function `__down_write':
/usr/src/linux/include/asm/rwsem.h:157: error: syntax error before "_ufsdvfs_"
/usr/src/linux/include/asm/rwsem.h: In function `__up_read':
/usr/src/linux/include/asm/rwsem.h:194: error: syntax error before "_ufsdvfs_"
/usr/src/linux/include/asm/rwsem.h:188: warning: unused variable `tmp'
/usr/src/linux/include/asm/rwsem.h: In function `__up_write':
/usr/src/linux/include/asm/rwsem.h:220: error: syntax error before "_ufsdvfs_"
/usr/src/linux/include/asm/rwsem.h: In function `__downgrade_write':
/usr/src/linux/include/asm/rwsem.h:245: error: syntax error before "_ufsdvfs_"
In file included from /usr/src/linux/include/linux/sched.h:20,
                 from /usr/src/linux/include/linux/module.h:10,
                 from ufsdvfs.c:30:
/usr/src/linux/include/asm/semaphore.h: In function `down':
/usr/src/linux/include/asm/semaphore.h:105: error: syntax error before "_ufsdvfs_"
/usr/src/linux/include/asm/semaphore.h: In function `down_interruptible':
/usr/src/linux/include/asm/semaphore.h:130: error: syntax error before "_ufsdvfs_"
/usr/src/linux/include/asm/semaphore.h: In function `down_trylock':
/usr/src/linux/include/asm/semaphore.h:155: error: syntax error before "_ufsdvfs_"
/usr/src/linux/include/asm/semaphore.h: In function `up':
/usr/src/linux/include/asm/semaphore.h:179: error: syntax error before "_ufsdvfs_"
ufsdvfs.c: In function `ufsd_readdir':
ufsdvfs.c:864: warning: implicit declaration of function `update_atime'
ufsdvfs.c: At top level:
ufsdvfs.c:2219: warning: initialization from incompatible pointer type
make: *** [objfre/vfs/ufsdvfs.o] Erreur 1

------

I tracked down the problem to a patch of include/linux/spinlock.h which was
introduced somewhere in 2.6.16:
diff -urN linux-2.6.15/include/linux/spinlock.h linux-2.6.16.1/include/linux/spinlock.h
gives:

--- linux-2.6.15/include/linux/spinlock.h       2006-03-28 19:52:29.000000000 +0200
+++ linux-2.6.16.1/include/linux/spinlock.h     2006-03-24 19:55:28.000000000 +0100
@@ -59,8 +59,7 @@
 /*
  * Must define these before including other files, inline functions need them
  */
-#define LOCK_SECTION_NAME                       \
-        ".text.lock." __stringify(KBUILD_BASENAME)
+#define LOCK_SECTION_NAME ".text.lock."KBUILD_BASENAME
 
 #define LOCK_SECTION_START(extra)               \
         ".subsection 1\n\t"                     \

Reverting this patch fixes the compilation problem.

Thierry Godefroy.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: BUG in Linux 2.6.16/2.6.16.1 (compilation failure of third party software)
  2006-03-28 18:29 Thierry Godefroy
@ 2006-03-28 22:51 ` Lee Revell
  2006-03-28 23:21   ` Thierry Godefroy
  0 siblings, 1 reply; 6+ messages in thread
From: Lee Revell @ 2006-03-28 22:51 UTC (permalink / raw)
  To: Thierry Godefroy; +Cc: linux-kernel

On Tue, 2006-03-28 at 20:29 +0200, Thierry Godefroy wrote:
> Paragon_NTFS_3.x.v5.1 fails to compile (with gcc v3.4.3) with the following
> errors:

It's not a bug when an upgrade causes third party kernel modules not to
compile - your code needs to be updated to work with 2.6.16.

Linux makes no effort to guarantee source or binary compatibility with
out of tree kernel modules, or userspace code that includes kernel
headers.

Lee


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: BUG in Linux 2.6.16/2.6.16.1 (compilation failure of third party software)
       [not found] <5Vr7d-4VR-15@gated-at.bofh.it>
@ 2006-03-28 23:03 ` Robert Hancock
       [not found] ` <5Vvkv-2MB-27@gated-at.bofh.it>
  1 sibling, 0 replies; 6+ messages in thread
From: Robert Hancock @ 2006-03-28 23:03 UTC (permalink / raw)
  To: linux-kernel; +Cc: thgodef

Thierry Godefroy wrote:
> Paragon_NTFS_3.x.v5.1 fails to compile (with gcc v3.4.3) with the following
> errors:

I don't think compilation failures of out-of-tree drivers is considered 
a bug. It's the responsibility of those drivers to keep up to date with 
kernel changes.

-- 
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: BUG in Linux 2.6.16/2.6.16.1 (compilation failure of third party software)
  2006-03-28 22:51 ` Lee Revell
@ 2006-03-28 23:21   ` Thierry Godefroy
  2006-03-29  4:42     ` Arjan van de Ven
  0 siblings, 1 reply; 6+ messages in thread
From: Thierry Godefroy @ 2006-03-28 23:21 UTC (permalink / raw)
  To: Lee Revell; +Cc: linux-kernel

On Tue, 28 Mar 2006 17:51:11 -0500, Lee Revell wrote:

> On Tue, 2006-03-28 at 20:29 +0200, Thierry Godefroy wrote:
> > Paragon_NTFS_3.x.v5.1 fails to compile (with gcc v3.4.3) with the following
> > errors:
> 
> It's not a bug when an upgrade causes third party kernel modules not to
> compile - your code needs to be updated to work with 2.6.16.

Oh, yeah ?... Really ?... Please, read the errors before drawing hasted conclusions...
The errors occur after the mere #inclusion of Linux headers. Here is a simple "code"
which will trigger the error:

#ifndef __KERNEL__
#define __KERNEL__
#endif

#include <linux/module.h>

int main() {
	return 0;
}

And I don't see anything wrong in that code...

> Linux makes no effort to guarantee source or binary compatibility with
> out of tree kernel modules, or userspace code that includes kernel
> headers.

That's a pity... Non-regression should be guaranteed. The problem with Linux
is that each new version brings a load of incompatibilities with third parties
drivers (graphic cards, win/smart modems, wifi cards, etc, etc), most of which
using proprietary code which sources are unavailable to the end user. The fact
that Linux keeps breaking those drivers code is not going to encourage hardware
vendors to make Linux drivers for their products. For example, ATI takes a
couple of months to catchup with the kernel changes, and each time they release
a new driver the next Linux release breaks it. :-(

Thierry Godefroy.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: BUG in Linux 2.6.16/2.6.16.1 (compilation failure of third  party software)
       [not found]   ` <5VvNw-3B1-3@gated-at.bofh.it>
@ 2006-03-29  2:20     ` Robert Hancock
  0 siblings, 0 replies; 6+ messages in thread
From: Robert Hancock @ 2006-03-29  2:20 UTC (permalink / raw)
  To: linux-kernel

Thierry Godefroy wrote:
> Oh, yeah ?... Really ?... Please, read the errors before drawing hasted conclusions...
> The errors occur after the mere #inclusion of Linux headers. Here is a simple "code"
> which will trigger the error:
> 
> #ifndef __KERNEL__
> #define __KERNEL__
> #endif
> 
> #include <linux/module.h>
> 
> int main() {
> 	return 0;
> }
> 
> And I don't see anything wrong in that code...

Sure there is, it's a userspace program that's including kernel headers 
for one thing.. Also what makefiles are being used to compile this? You 
can't just use any old makefile on a kernel module in 2.6 and expect it 
to work properly.

Given that the kernel doesn't produce such errors in its own 
compilation, that pretty much automatically makes it the problem of the 
3rd-party code.

>> Linux makes no effort to guarantee source or binary compatibility with
>> out of tree kernel modules, or userspace code that includes kernel
>> headers.
> 
> That's a pity... Non-regression should be guaranteed. The problem with Linux
> is that each new version brings a load of incompatibilities with third parties
> drivers (graphic cards, win/smart modems, wifi cards, etc, etc), most of which
> using proprietary code which sources are unavailable to the end user. The fact
> that Linux keeps breaking those drivers code is not going to encourage hardware
> vendors to make Linux drivers for their products. For example, ATI takes a
> couple of months to catchup with the kernel changes, and each time they release
> a new driver the next Linux release breaks it. :-(

This has been covered time and again. If drivers don't want to be broken 
by kernel changes, the best solution is to get them included in the 
kernel source tree where they will be kept up to date automatically. And 
there is very little interest in the community in helping binary drivers 
work any better, they're not something people want to encourage, for 
good reason.

-- 
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: BUG in Linux 2.6.16/2.6.16.1 (compilation failure of third party software)
  2006-03-28 23:21   ` Thierry Godefroy
@ 2006-03-29  4:42     ` Arjan van de Ven
  0 siblings, 0 replies; 6+ messages in thread
From: Arjan van de Ven @ 2006-03-29  4:42 UTC (permalink / raw)
  To: Thierry Godefroy; +Cc: Lee Revell, linux-kernel

On Wed, 2006-03-29 at 01:21 +0200, Thierry Godefroy wrote:
> On Tue, 28 Mar 2006 17:51:11 -0500, Lee Revell wrote:
> 
> > On Tue, 2006-03-28 at 20:29 +0200, Thierry Godefroy wrote:
> > > Paragon_NTFS_3.x.v5.1 fails to compile (with gcc v3.4.3) with the following
> > > errors:
> > 
> > It's not a bug when an upgrade causes third party kernel modules not to
> > compile - your code needs to be updated to work with 2.6.16.
> 
> Oh, yeah ?... Really ?... Please, read the errors before drawing hasted conclusions...
> The errors occur after the mere #inclusion of Linux headers. Here is a simple "code"
> which will trigger the error:
> 
> #ifndef __KERNEL__
> #define __KERNEL__
> #endif
> 
> #include <linux/module.h>
> 
> int main() {
> 	return 0;
> }
> 
> And I don't see anything wrong in that code...


then look again. Userspace that defines __KERNEL__ .... man that isn't
going ot work. __KERNEL__ is the ONLY safeguard we have to protect
userspace from miscompiling, and we highly assume userspace doesn't set
it. If this program does that then it really deserves all it gets.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-03-29  4:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <5Vr7d-4VR-15@gated-at.bofh.it>
2006-03-28 23:03 ` BUG in Linux 2.6.16/2.6.16.1 (compilation failure of third party software) Robert Hancock
     [not found] ` <5Vvkv-2MB-27@gated-at.bofh.it>
     [not found]   ` <5VvNw-3B1-3@gated-at.bofh.it>
2006-03-29  2:20     ` Robert Hancock
2006-03-28 18:29 Thierry Godefroy
2006-03-28 22:51 ` Lee Revell
2006-03-28 23:21   ` Thierry Godefroy
2006-03-29  4:42     ` Arjan van de Ven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox