All of lore.kernel.org
 help / color / mirror / Atom feed
* gcc version conflict
@ 2003-01-10  3:30 Jonathan Kallay
  2003-01-10  4:01 ` whitnl73
  2003-01-10  7:00 ` pa3gcu
  0 siblings, 2 replies; 3+ messages in thread
From: Jonathan Kallay @ 2003-01-10  3:30 UTC (permalink / raw)
  To: linux-newbie

Hi all,
  I'm trying to compile the kernel module for some NVidia drivers.  I'm
getting an error message saying that I'm compiling a module with a different
version of the compiler than the one used to compile the kernel (gcc 2.95.4
is what's installed; the kernel version is 2.2.20 and at one point I was
able to check the compiler version that compiled it but I can't remember how
I did it).  What's the best way to work around this problem?

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

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

* Re: gcc version conflict
  2003-01-10  3:30 gcc version conflict Jonathan Kallay
@ 2003-01-10  4:01 ` whitnl73
  2003-01-10  7:00 ` pa3gcu
  1 sibling, 0 replies; 3+ messages in thread
From: whitnl73 @ 2003-01-10  4:01 UTC (permalink / raw)
  To: yoni; +Cc: linux-newbie

On Thu, 9 Jan 2003, Jonathan Kallay wrote:

> Hi all,
>   I'm trying to compile the kernel module for some NVidia drivers.  I'm
> getting an error message saying that I'm compiling a module with a different
> version of the compiler than the one used to compile the kernel (gcc 2.95.4
> is what's installed; the kernel version is 2.2.20 and at one point I was
> able to check the compiler version that compiled it but I can't remember how
> I did it).  What's the best way to work around this problem?
>
[whit@giftie whit]$ cat /proc/version
Linux version 2.4.13 (whit@giftie) (gcc version 2.95.3 20010315 (release)) #1 Tu
e Oct 30 22:04:20 EST 2001
[whit@giftie whit]$ tty
/dev/vc/5
[whit@giftie whit]$ cat /usr/local/bin/trail
#!/bin/sh
/bin/sed 's/ *$//g' $@
[whit@giftie whit]$ cat /dev/vcs5|fold|trail>oops

I have devfs and devfsd, so I can use either /dev/vcc/<n> or /dev/vcs<n>
but the tty command reports the real (devfs) device name.  Please don't
be confused if tty reports /dev/vcs<n>

I guess the easiest way to work around it would be to recompile the
kernel and modules with the gcc you have installed.

Lawson
--
---oops---
There are many ways.  Some day we will write all the ways in a big
book.  We will then burn the big book.  - M. K. Tulley



________________________________________________________________
Sign Up for Juno Platinum Internet Access Today
Only $9.95 per month!
Visit www.juno.com
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

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

* Re: gcc version conflict
  2003-01-10  3:30 gcc version conflict Jonathan Kallay
  2003-01-10  4:01 ` whitnl73
@ 2003-01-10  7:00 ` pa3gcu
  1 sibling, 0 replies; 3+ messages in thread
From: pa3gcu @ 2003-01-10  7:00 UTC (permalink / raw)
  To: Jonathan Kallay, linux-newbie

On Friday 10 January 2003 03:30, Jonathan Kallay wrote:
> Hi all,
>   I'm trying to compile the kernel module for some NVidia drivers.  I'm
> getting an error message saying that I'm compiling a module with a
> different version of the compiler than the one used to compile the kernel
> (gcc 2.95.4 is what's installed; the kernel version is 2.2.20 and at one
> point I was able to check the compiler version that compiled it but I can't
> remember how I did it).  What's the best way to work around this problem?

This is a FAQ and is in the README you received with the driver/source.
Here is an excrpt;


Q: Compiling the NVdriver kernel module gives this error:

        You appear to be compiling the NVdriver kernel module with
        a compiler different from the one that was used to compile
        the running kernel. This may be perfectly fine, but there
        are cases where this can lead to unexpected behaviour and
        system crashes.

        If you know what you are doing and want to override this
        check, you can do so by setting IGNORE_CC_MISMATCH.

        In any other case, set the CC environment variable to the
        name of the compiler that was used to compile the kernel.

A: You should compile the NVdriver kernel module with the same compiler
   version that was used to compile your kernel.  Some Linux kernel data
   structures are dependent on the version of gcc used to compile it;
   for example, in include/linux/spinlock.h:

        ...
        * Most gcc versions have a nasty bug with empty initializers.
        */
        #if (__GNUC__ > 2)
          typedef struct { } rwlock_t;
          #define RW_LOCK_UNLOCKED (rwlock_t) { }
        #else
          typedef struct { int gcc_is_buggy; } rwlock_t;
          #define RW_LOCK_UNLOCKED (rwlock_t) { 0 }
        #endif

   If the kernel is compiled with gcc 2.x, but gcc 3.x is used when the
   open files in NVdriver are built (or vice versa), the size of rwlock_t
   will vary, and things like ioremap will fail.

   To check what version of gcc was used to compile your kernel, you
   can examine the output of:

        cat /proc/version

   To check what version of gcc is currently in your $PATH, you can
   examine the output of:

        gcc -v


-- 
Regards Richard
pa3gcu@zeelandnet.nl
http://people.zeelandnet.nl/pa3gcu/

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

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

end of thread, other threads:[~2003-01-10  7:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-10  3:30 gcc version conflict Jonathan Kallay
2003-01-10  4:01 ` whitnl73
2003-01-10  7:00 ` pa3gcu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.