LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   gcc march (https://www.linuxquestions.org/questions/programming-9/gcc-march-185206/)

agdepus 05-24-2004 09:03 AM

gcc march
 
Hello,
Using suse 8.2 i am trying to develop a driver for a card (plx 9030 chip).
I am running an athlon 2400.

When i try to load the driver using insmod this happens:

kernel-module version mismatch
driver.o was compiled for kernel version 2.4.20-4GB while this kernel is version
2.4.20.GB-athlon.

I have set march=athlon.
And inlude files to /lib/modules/2.4.20-4GB-athlon/build/include

Any ideas?
I am a hardware developer gone mad......:-)

agdepus

keefaz 05-24-2004 11:27 AM

Did you compile the kernel 2 times or maybe you set the wrong EXTRAVERSION parameter in Makefile from kernel source tree.

agdepus 05-24-2004 01:05 PM

I did not compile the kernel at all. Do I have to do that in order to
build an installable module??? :-)

keefaz 05-24-2004 02:08 PM

No lol, I asked this because the difference between kernel names.
And what output does the uname -r give ?

agdepus 05-25-2004 03:11 AM

2.4.20-4GB-athlon.....

keefaz 05-25-2004 07:45 AM

Does the error happen if you don't set the -march parameter ?

And do you have these lines in your source code :
Code:

/* Deal with CONFIG_MODVERSIONS */
#if CONFIG_MODVERSIONS==1
#define MODVERSIONS
#include <linux/modversions.h>
#endif


agdepus 05-25-2004 08:37 AM

I included the output from gcc below. Including the modversions did not fix it....
My problem is that i know too little about this stufffff...

I'll never give up...:-)

compiling: SupportFunc.c
Reading specs from /usr/lib/gcc-lib/i486-suse-linux/3.3/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libd
ir=/usr/lib --enable-languages=c,c++,f77,objc,java,ada --disable-checking --enable-libgcj --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --wi
th-system-zlib --enable-shared --enable-__cxa_atexit i486-suse-linux
Thread model: posix
gcc version 3.3 20030226 (prerelease) (SuSE Linux)
/usr/lib/gcc-lib/i486-suse-linux/3.3/cc1 -quiet -v -I/usr/src/PlxLinux/include -I. -I../common -I../common/PlxChip/Pci9030 -I/lib/modules/2.4.20-4GB-athl
on/build/include -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=0 -DGCC -DPCI_CODE -DPLX_LITTLE_ENDIAN -D__KERNEL__ -DMODULE -D__NO_VERSION__ -DPCI
9030 -DLINUX_DRIVER ../common/SupportFunc.c -quiet -dumpbase SupportFunc.c -march=athlon -auxbase-strip Driver/Obj/SupportFunc.o -O2 -Wall -version -o - |
/usr/lib/gcc-lib/i486-suse-linux/3.3/../../../../i486-suse-linux/bin/as -V -Qy -o Driver/Obj/SupportFunc.o -
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64355
GNU C version 3.3 20030226 (prerelease) (SuSE Linux) (i486-suse-linux)
compiled by GNU C version 3.3 20030226 (prerelease) (SuSE Linux).
#include "..." search starts here:
#include <...> search starts here:
/usr/src/PlxLinux/include
.
../common
../common/PlxChip/Pci9030
/lib/modules/2.4.20-4GB-athlon/build/include
/usr/local/include
/usr/lib/gcc-lib/i486-suse-linux/3.3/include
/usr/i486-suse-linux/include
/usr/include
End of search list.
GNU assembler version 2.13.90.0.18 (i486-suse-linux) using BFD version 2.13.90.0.18 20030121 (SuSE Linux)
In file included from /lib/modules/2.4.20-4GB-athlon/build/include/linux/tqueue.h:19,
from /lib/modules/2.4.20-4GB-athlon/build/include/linux/aio.h:4,
from /lib/modules/2.4.20-4GB-athlon/build/include/linux/fs.h:201,
from /lib/modules/2.4.20-4GB-athlon/build/include/linux/capability.h:17,
from /lib/modules/2.4.20-4GB-athlon/build/include/linux/binfmts.h:5,
from /lib/modules/2.4.20-4GB-athlon/build/include/linux/sched.h:10,
from /lib/modules/2.4.20-4GB-athlon/build/include/linux/mm.h:4,
from /lib/modules/2.4.20-4GB-athlon/build/include/linux/iobuf.h:11,
from ../common/SupportFunc.c:42:
/lib/modules/2.4.20-4GB-athlon/build/include/asm/system.h: In function `__set_64bit_var':
/lib/modules/2.4.20-4GB-athlon/build/include/asm/system.h:189: warning: dereferencing type-punned pointer will break strict-aliasing rules
/lib/modules/2.4.20-4GB-athlon/build/include/asm/system.h:189: warning: dereferencing type-punned pointer will break strict-aliasing rules


Linking driver: Pci9030.o


Device driver "Pci9030/Driver/Pci9030.o" built sucessfully.

keefaz 05-25-2004 11:55 AM

Maybe a tip :

edit /lib/modules/2.4.20-4GB-athlon/build/include/linux/version.h

Look at the value for UTS_RELEASE, if it is set it to 2.4.20-4GB-athlon if not set the value

agdepus 05-26-2004 09:11 AM

That's it. Thanks :-)
Back to curses......


All times are GMT -5. The time now is 04:08 AM.