Compile problem on linux

This is a discussion on Compile problem on linux within the C Programming forums, part of the General Programming Boards category; Hi, what i am trying to do is to compile the iputils from the source code and the reason for ...

  1. #1
    cnb
    cnb is offline
    Registered User
    Join Date
    Sep 2008
    Posts
    14

    Compile problem on linux

    Hi,
    what i am trying to do is to compile the iputils from the source code and the reason for this is that later on i want to make changes to ping.c i.e. add my own functionality so i thought the best way to start is to download the source code and compile it first before making any changes....once it compiles than i will start making my changes....
    So on my linux sever (debian) i have downloaded iputils source code and i also have got linux Kernel source code. Reading the iputils install file it says the following:
    Code:
    make
    make html
    make man
    lynx doc/iputils.html
    Read...
    
    If the first "make" fails, no problems:
    
    make html
    lynx doc/iputils.html
    Read section "Installation notes"...
    
    
    
    But if "make html" fails too, check that DocBook package is installed
    on your machine. If it is installed, and nevertheless "make" does not work,
    delete iputils and go to sleep. The next day repeat. If even full reset
    did not help, I bring apologies. :-)
    Now when i use the make command i get following error message:
    Code:
    Please, set correct KERNEL_INCLUDE
    make: *** [check-kernel] Error 1
    In the make file i have the following configuration:
    Code:
    # Path to parent kernel include files directory
    #KERNEL_INCLUDE=/usr/src/linux/include
    KERNEL_INCLUDE=/usr/src/linux-source-2.6.18
    #LIBC_INCLUDE=/usr/include
    LIBC_INCLUDE=/usr/include
    So in this case i have got the whole of linux kernel source code under /usr/src/linux-source-2.6.18 directory. But i am still unable to compile the iputils files.
    Can someone tell me what am i doing wrong?
    How can i compile this?

    Thanks

    Issue resolved....it was looking for autoconf.h which was in the following directory /usr/include/linux....just changed the KERNEL_INCLUDE=/usr/include and everything worked fine....


    Thanks for all the help
    Last edited by cnb; 09-29-2008 at 08:49 PM. Reason: Issue solved

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Code:
    #KERNEL_INCLUDE=/usr/src/linux/include
    KERNEL_INCLUDE=/usr/src/linux-source-2.6.18
    The second one doesn't look like the correct path to me.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    cnb
    cnb is offline
    Registered User
    Join Date
    Sep 2008
    Posts
    14
    Quote Originally Posted by matsp View Post
    Code:
    #KERNEL_INCLUDE=/usr/src/linux/include
    KERNEL_INCLUDE=/usr/src/linux-source-2.6.18
    The second one doesn't look like the correct path to me.

    --
    Mats
    Hi,
    I have tried both and i get the same error message, are you able to tell me exact steps i can follow to correct this problem....i have also tried using google with the error message but i still cannot see how i can overcome this....Please help.... So i have decompressed or untar'ed the linux source into the following directory /usr/src/linux-source-2.6.18...
    One more question what does the KERNEL_INCLUDE should point to i.e. the whole of linux source directory or just some sub directory...and the same question applies to LIBC_INCLUDE.

    thanks

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    I am not able to reproduce your problem, since I currently haven't got a system with Linux running on it.

    I expect however, that if you search for the error message in the makefile(s), you will find that it searches for some particular header file to determine if it's there. If that file isn't there, it will complain. You need to either find that file, or figure out how it gets created (perhaps you need to build parts of the kernel?)

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Stream function compile problem
    By Know_Your_Role in forum C++ Programming
    Replies: 3
    Last Post: 06-02-2009, 01:03 PM
  2. SSHDOS linux modification GET problem
    By berg in forum C Programming
    Replies: 3
    Last Post: 04-11-2007, 07:13 AM
  3. how to compile C++ file on linux OS
    By singh_nav in forum C++ Programming
    Replies: 4
    Last Post: 08-17-2004, 07:30 AM
  4. gcc compile problem
    By keyz in forum Linux Programming
    Replies: 3
    Last Post: 05-22-2003, 08:14 AM
  5. C++ compile problem
    By Rhuantavan in forum C++ Programming
    Replies: 3
    Last Post: 06-15-2002, 04:29 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21