Find the answer to your Linux question:
Results 1 to 7 of 7
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    stray error in kernel compilation


    hello friends,
    i try to do the examples programs of "Linux Kernel Module Programming Guide", But most of the programs shows the error messages as shown below, almost all the program shows the same error.How can i rectify this types of error?? pls help me friends
    regrds shabeer


    make -C /lib/modules/2.6.10/build M=/home/shabeer/shabeer/dd/ioctl modules
    make[1]: Entering directory `/usr/src/linux-2.6.10'
    CC [M] /home/shabeer/shabeer/dd/ioctl/syscall.o
    /home/shabeer/shabeer/dd/ioctl/syscall.c: In function `our_sys_open':
    /home/shabeer/shabeer/dd/ioctl/syscall.c:77: error: stray '\226' in program
    /home/shabeer/shabeer/dd/ioctl/syscall.c:77: error: stray '\136' in program
    /home/shabeer/shabeer/dd/ioctl/syscall.c:77: error: stray '\146' in program
    /home/shabeer/shabeer/dd/ioctl/syscall.c:77: warning: comparison between pointer and integer
    make[2]: *** [/home/shabeer/shabeer/dd/ioctl/syscall.o] Error 1
    make[1]: *** [_module_/home/shabeer/shabeer/dd/ioctl] Error 2
    make[1]: Leaving directory `/usr/src/linux-2.6.10'
    make: *** [all] Error 2

  2. #2
    Linux Engineer aliov's Avatar
    Join Date
    Dec 2006
    Location
    Geneva,Beirut
    Posts
    1,078
    Quote Originally Posted by shabeervsm View Post
    /home/shabeer/shabeer/dd/ioctl/syscall.c: In function `our_sys_open':
    /home/shabeer/shabeer/dd/ioctl/syscall.c:77: error: stray '\226' in program
    /home/shabeer/shabeer/dd/ioctl/syscall.c:77: error: stray '\136' in program
    /home/shabeer/shabeer/dd/ioctl/syscall.c:77: error: stray '\146' in program
    /home/shabeer/shabeer/dd/ioctl/syscall.c:77: warning: comparison between pointer and
    This can happens if you copy and past the source from a pdf file or some other non ASCII file structure .

    please let me know if this is your case .

    Regards
    Linux is not only an operating system, it's a philosophy.
    Archost.

  3. #3
    Hi,

    I think there is an error in the program , please check once again or if you feel its correct please cut and paste here.

  4. $spacer_open
    $spacer_close
  5. #4
    Quote Originally Posted by aliov View Post
    This can happens if you copy and past the source from a pdf file or some other non ASCII file structure .

    please let me know if this is your case .

    Regards
    hai,
    ur assumption is correct, i copy and paste the code from a pdf file..... Is it make any problem?? How can i overcome this???

    regards shabeer

  6. #5
    Linux Engineer aliov's Avatar
    Join Date
    Dec 2006
    Location
    Geneva,Beirut
    Posts
    1,078
    In order to compile the code with gcc the source has to be ASCII , so when you copy past it doesn't convert them correctly to ASCII , the best way it's to write the code also like that you'll have a look and memorize the syntax while writing . this can be done also with a pdf editor have a look to PDFedit .

    Regards.
    Linux is not only an operating system, it's a philosophy.
    Archost.

  7. #6
    hai,
    thankyou ,i type the program and compiled ,i got output
    regards shabeer

  8. #7

    quotation marks

    possibly there have been used any non-standard (i.e. for programming in c++) quotation marks => simply change it in an editor like jedit in text-mode => hth

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •