Linux module compilation prob

From: gokul (gokul_svuce_at_yahoo.com)
Date: 01/08/04

  • Next message: Sybren Stüvel: "Re: Sound, dual soundcards, second attempt (better I hope)"
    Date: 7 Jan 2004 22:27:21 -0800
    
    

    Hi all,
             I am writing a simple kernel module dd for a
    memory device for a i386 redhat 8.0 .However i am
    getting a lot of errors when i compile it.

    Here are the compilation flags i have used

    CC=gcc
    KERNELDIR = /usr/src/linux-2.4

    -c -D__KERNEL__ -DMODULE -DLINUX -I
    $(KERNELDIR)/include -O
    Here are the errors i get:

    In file included from memdrv.c:47:
    /usr/src/linux-2.4/include/asm/uaccess.h:35: invalid
    suffix on integer constant
    /usr/src/linux-2.4/include/asm/uaccess.h:35: parse
    error before numeric constant
    /usr/src/linux-2.4/include/asm/uaccess.h:35:
    `__verify_write_R_ver_str' declared as function
    returning a function

    I get a lot of errors like this

    Other than the errors in uacces.h(its the only header
    giving errors),i get the following errors in my code
    wherever i have used kernel specific functions like
    kmalloc ,kfree,printk etc.

    memdrv.c:75: invalid suffix on integer constant
    memdrv.c:75: called object is not a function

    I am using gcc version 3.2.Also i am running kernel
    2.6.0 while i am trying to compile for 2.4.18(i have
    the sources for both)

    Thanks in Advance,
    P.Gokul Krishna.


  • Next message: Sybren Stüvel: "Re: Sound, dual soundcards, second attempt (better I hope)"

    Relevant Pages

    • Compiling Dsniff on Fedora Core 2 (Solution)
      ... A lot of people have complained that they can't get dsniff to compile on FC2. ... checksum.c:33:12: invalid suffix "f" on integer constant ... checksum.c:106:24: missing terminating " character ...
      (Fedora)
    • Re: Distributions
      ... | general there are a lot of packages for people to use. ... kernel, have to run on a multitude of different systems, they tend to be ... and slower than if you compile those packages, ... can have that stability with virtually any distro. ...
      (Debian-User)
    • Re: Distributions
      ... Ubuntu is based on Debian, ... | general there are a lot of packages for people to use. ... kernel, have to run on a multitude of different systems, they tend to be larger ... and slower than if you compile those packages, ...
      (Debian-User)
    • Problems with custom kernel fbsd 6.2
      ... My kernel for freebsd 6.2 is not compiling but only with my custom config. ... I was able to compile it with the GENERIC kernel included, but my modified one will not compile. ... # Power management support ...
      (freebsd-questions)
    • Re: [PATCH] 2.6 workaround for Athlon/Opteron prefetch errata
      ... >optimisations independently of each other', is fairly simple, (in ... >concept), and elegant, (as it lets you compile the most finely tuned ... >Up to now, selecting a CPU to compile for basically means, "Use ... it's silly to include them all in a kernel for a 386. ...
      (Linux-Kernel)